A-821

Visitor 551 Last updated Monday, 10-Mar-2003 12:26:25 CST

Supported Models
A-626
A-628
A-8111
A-812PG
A-821
A-822
A-823
A-826
DIO-144
DIO-24
DIO-48
DIO-64
DIO-96
ENCODER-300
ISO-730
ISO-813
ISO-AD32
ISO-C64
ISO-DA16
ISO-LD
ISO-P32C32
ISO-P64
P8R8DIO
P16R16DIO
SERVO-300
STEP-200
TMC-10
Valid XHTML 1.0! Valid CSS!

Source Codes Tour
Device File
ioctl Commands
Data Structures
Registers
Examples

Device File

/dev/ixisan

The n is the IxISA device number.

Ioctl Commands

IXISA_ADD_DEV
Add a device (card) to the device list. Example: driver/ixisaadd.cd
IXISA_DEL_DEV
Remove a devive from the device list.
IXISA_GET_INFO
Retrieve a device's information, and put it to a given structure ixisa_devinfo (ixisa_devinfo_t). Example: list.c.
IXISA_READ_REG
Read a specified register's value, and put the value to a given structure ixisa_reg (ixisa_reg_t). Example: a821/dio.c.
IXISA_SET_SIG
Set interrupt signaling conditions. Example: a821/ai_pacer.c.
IXISA_WRITE_REG
Write a given value to a specified register. Example: a821/dio.c.

Data Structures

ixisa_devinfo_t
The data type of structure ixisa_devinfo that contains a device's id, irq, base address, and so on. Example: list.c.
ixisa_reg_t
The data type of structure ixisa_reg that contains a register's id and value. Example: a821/dio.c.
ixisa_signal_t
The data type of structure ixisa_signal that contains process id, signal id, and signaling conditions. Example: a821/ai_pacer.c.

Registers

R=Readable  W=Writable

Available registers which can be used in structure ixisa_reg for A-821.

IXISA_8254C0 R W
8254 Counter 0. IXISA_8254C0 is the short term of IXISA_8254_COUNTER_0.
IXISA_8254C1 R W
8254 Counter 1. IXISA_8254C1 is the short term of IXISA_8254_COUNTER_1.
IXISA_8254C2 R W
8254 Counter 2. IXISA_8254C2 is the short term of IXISA_8254_COUNTER_2.
IXISA_8254CR R W
8254 Control Word Register. IXISA_8254CR is the short term of IXISA_8254_CONTROL_WORD_REG.
IXISA_AI  IXISA_AIH  IXISA_AIL R W
Analog (A/D) Input Buffer Register. IXISA_AIH and IXISA_AIL are the register's high byte and low byte.

IXISA_AI lets you read this 12-bit register at one fell swoop by three modes - IXISA_RM_NORMAL, IXISA_RM_READY, and IXISA_RM_TRIGGER.

IXISA_RM_NORMAL mode read register directly. IXISA_RM_READY mode checks the Ready-bit of high byte and blocks before ADC is ready. IXISA_RM_TRIGGER mode does software trigger and checks the Ready-bit of high byte.

IXISA_AI is the short term of IXISA_ANALOG_INPUT

Example: ai_soft.c, ai_pacer.c.

IXISA_AOL/AO0L/AOH/AO0H R W
Analog (D/A) Output Latch Register. Channel 0, high/low byte.
IXISA_AO R W
12-bit D/A Output Latch Register. The IXISA_AO is equivalent to the IXISA_AO0 - the D/A Channel 0.
IXISA_DI  IXISA_DIH  IXISA_DIL R W
D/I Inputer Buffer Register. IXISA_DIH and IXISA_DIL are the high byte and low byte of the 16-bit register. IXISA_DI lets you read this register at one fell swoop. IXISA_DI is the short term of the IXISA_DIGITAL_INPUT.
IXISA_CIR R W
Clear Interrupt Request. IXISA_CIR is the short term of IXISA_CLEAR_INTERRUPT_REQUEST.
IXISA_ADGCR R W
A/D Gain Control Register. IXISA_ADGCR is the short term of IXISA_AD_GAIN_CONTROL_REG.
IXISA_ADMXCR R W
A/D Multiplex Control Register. IXISA_ADMXCR is the short term of IXISA_AD_MULTIPLEX_CONTROL_REG.
IXISA_ADMCR R W
A/D Mode Control Register. IXISA_ADMCR is the short term of IXISA_AD_MODE_CONTROL_REG.
IXISA_ADSTCR R W
A/D Software Trigger Control Register. IXISA_ADSTCR is the short term of IXISA_AD_SOFTWARE_TRIGGER_CONTROL_REG.
IXISA_DO  IXISA_DOH  IXISA_DOL R W
D/O Output Latch Register. IXISA_DOH and IXISA_DOL are the high byte and low byte of the 16-bit register. IXISA_DO let you write this register at one fell swoop. IXISA_DO is the short term of IXISA_DIGITAL_OUTPUT.

Examples

list.c
An example of ioctl command IXISA_GET_INFO.
a821/dio.c
An example for reading and writing registers by ioctl commands IXISA_READ_REG and IXISA_WRITE_REG.
a821/ai_soft.c
An example for reading the ADC result by software trigger.
a821/ai_pacer.c
An example for reading the ADC result by pacer trigger and interrupt.

Emmy Tsai <emmy@icpdas.com> | Service from ICPDAS <service@icpdas.com>