A-8111

Visitor 138 Last updated Monday, 05-May-2003 17:42:47 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_GET_INFO
Retrieve a device's information, and put it to a given structure ixisa_devinfo (ixisa_devinfo_t). Example: list.c.
IXISA_SET_SIG
Set interrupt signaling conditions. Example: a8111/ai_pacer.c.
IXISA_READ_REG
Read a specified register's value, and put the value to a given structure ixisa_reg (ixisa_reg_t). Example: a8111/dio.c.
IXISA_WRITE_REG
Write a given value to a specified register. Example: a8111/dio.c.
IXISA_ADD_DEV
Add a device (card) to the device list. Example: driver/ixisaadd.c.
IXIsA_DEL_DEV
Remove a device from the device list.
IXISA_COUNT_CONF
Configure counter's mode and value. Example: ai_pacer/ai_dma.c.
IXISA_AIDMA_CONF (IXISA_AIDMA_START)
Configure and start DMA transfer mode. Example: ai_dma.c.
IXISA_AIDMA_CONF_AUTOINIT (IXISA_AIDMA_START_AUTOINIT)
Configure and start DMA transfer mode with 8237 Autoinitialization. This command co-works with command IXISA_AIDMA_NEXT. Example: ai_dma_next.c.
IXISA_AIDMA_HARVEST
Get the data from the raw DMA buffer. Example: ai_dma.c
IXISA_AIDMA_NEXT
Do next batch of DMA transfer without configuring 8237 again. This command has to work with command IXISA_AIDMA_CONF_AUTOINIT. Example: ai_dma_next.c.
IXISA_AIDMA_STOP
Unconfigure and stop the DMA transfer mode.
IXISA_CLEAR_BOARD_IRQ
Clear board IRQ status. Example: ai_pacer.c.

Data Structures

ixisa_buf16_t
The data type of structure ixisa_buf16 that is used as 16 bit data repository. Example: ai_dma.c.
ixisa_count_t
The data type of structure ixisa_count that contains a counter configuration information. Example: ai_pacer/ai_dma.c.
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_flags_t
The data type for flag macros. Example: ai_dma.c.
ixisa_reg_t
The data type of structure ixisa_reg that contains a register's id and value. Example: a8111/dio.c.
ixisa_signal_t
The data type of structure ixisa_signal that contains process id, signal id, and signaling conditions. Example: a8111/ai_pacer.c.

Registers

R=Readable  W=Writable

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

IXISA_8254C0/C1/C2 R W
8254 Counter 0/1/2. IXISA_8254C0/1/2 is the short term of IXISA_8254_COUNTER_0/1/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 - IXISARM_NORMAL, IXISARM_READY, and IXISARM_TRIGGER.

IXISARM_NORMAL mode read register directly. IXISARM_READY mode checks the Ready-bit of high byte and blocks before ADC is ready. IXISARM_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/AO0H IXISA_AO1L/HR W
Analog (D/A) Output Latch Register, channel 0/1, H/L byte.
IXISA_AO/AO0/AO1 R W
12-bit Analog Output Channel. The IXISA_AO is equivalent to the IXISA_AO0 (D/A Channel 0). The IXISA_AO1 is the D/A Channel 1.
IXISA_DI  IXISA_DIH  IXISAIIBRL 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_DI.
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_DOOLR  IXISA_DOOLRH  IXISA_DOOLRL R W
D/O Output Latch Register. IXISA_DOOLRH and IXISA_DOOLRL are the high byte and low byte of the 16-bit register. IXISA_DOOLR let you write this register at one fell swoop. IXISA_DOOLR is the short term of IXISA_DIGITAL_OUTPUT.

Examples

list.c
An example of ioctl command IXISA_GET_INFO.
a8111/dio.c
An example for reading and writing registers by ioctl commands IXISA_READ_REG and IXISA_WRITE_REG.
a8111/ai_soft.c
An example for reading the ADC result by software trigger.
a8111/ai_pacer.c
An example for reading the ADC result by pacer trigger and interrupt.
a8111/ai_dma.c
An example for DMA transfer mode.
a8111/ai_dma_next.c
An example for DMA transfer mode with 8237 Autoinitialization.

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