User`s guide
Operation Theorem 37
4.1.5 A/D Data Transfer Modes
The A/D data must be transferred to CPU for processing. On the ACL-8316,
many AD data transfer modes can be used. Note that there are only two
kinds of operation can transfer AD data from port into PC's memory. The
data can be either read by I/O instruction (‘inport’ in terms of C language),
which is handled directly by software, or transferred to memory by the DMA
controller. Combing with programming the AD mode control register and the
interrupt source control register, the ACL-8316 provides the following transfer
modes:
Software Data Read
It is very simple to read A/D data through the A/D data register. Usually, this
mode is used combining with software trigger mode. Because of the A/D
conversion time will not excess 10
s on ACL-8316, after software triggering,
the software can just wait for 10
s then A/D data will be available in the A/D
data register. The software can read the data simply by using the inport
instruction.
Software Data Polling
In this mode, A/D data is also read through the A/D data register but check
the
AD_BUSY bit. After the A/D conversion triggering, the software can poll
the
AD_BUSY bit in the A/D status register until AD_BUSY becomes to high
level. The newest A/D data is stored in the A/D data register now, then the
software can read data simply by using the inport instruction.
Software Data Polling from FIFO
The A/D data can also be read from FIFO buffer if FIFO is enable. In this
mode, the A/D data is read from FIFO after check the FF_EF bit of the A/D
status register. As the FF_EF is set (1), the FIFO is not empty and to read
A/D value through the FIFO register is available.
EOC Interrupt Transfer
By properly programming the interrupt control register, the ACL-8316
provides end of conversion (EOC) interrupt. It is useful to combine the EOC
interrupt transfer with the timer pacer trigger. The data transfer is essentially
asynchronous with the control software under this mode. Users must set the
IRQ level by hardware jumper as installing. Please refer section 2.x for IRQ
jumper setting. After the A/D conversion completing, a hardware interrupt will
be inserted and its corresponding ISR (Interrupt Service Routine) will be
invoked and executed. The converted data can be transferred by the ISR
program.