
Chapter 5 Programming
AT-MIO-16X User Manual 5-42
©
National Instruments Corporation
3. Program the DMA controller to service DMA requests from the
AT-MIO-16X board. Refer to the IBM Personal Computer AT
Technical Reference manual for more information on DMA
controller programming.
4. If a DMA terminal count is received after the DMA service, write0
to either the appropriate DMATC C le a r Re gis ter to cl e ar th e
DMATCA or DMATCB bits in Status Register 1.
Once steps 1 through 3 are completed, the DMA controller is
programmed to acknowledge requests. If analog input DMA is
programmed, the DMA controller automatically reads the ADC FIFO
Register whenever an A/D conversion result is available and then stores
the result in a buffer in memory. If the DMA controller has been
programmed for analog output updating, values from the b uffe r in
memory are automatically written to the DAC upon receipt of a DMA
request. If both analog input and output DMA is selected, then the DMA
controller reads the FIFO or writes to the DACs depending on w hich
channel requested a DMA transfer.
If single-channel interleaved DMA is selected for writing data to the
DACs, then one buffer services both DAC 0 a nd DA C 1 . Th is is
accomplished by interleaving the data in the buffer. The first location in
the buffer should hold the first value to be transferred to DAC 0, the
second should hold the first value to be transferred to DAC 1, the third
should hold the second value to be transferred to DAC 0 , an d s o o n.
If dual-channel DMA operation has been selected for DMA requesting
service, DMA Channel A and memory buffer A (DMA A) are served
first. When a DMA terminal count is received, the board automatically
switches the DMA operation to DMA Channel B and memory buffer B
(DMA B). Therefore, the board can collect data to or from one buffer
and simultaneously service data in another buffer. If the DMA
controller is programmed for auto-reinitialize mode, DMA A and DMA
B are continuously served in turn.
If dual-channel DMA operation has been selecte d to service bo th analog
outputs, memory buffer A (DMA Channel A) and m e mory buf fe r B
(DMA Channel B) are concurrently serviced, with buffer A serving
DAC 0 and buffer B serving DAC 1.