Programming
Chapter 4
AT-MIO-16D User Manual
4-76
© National Instruments Corporation
To program the RTSI switch, complete these steps:
1. Calculate the 56-bit pattern based on the desired signal routing.
a. Clear the OUTEN bit for all input pins and for all unused pins.
b. Specify the signal source pin for all output pins by setting bits S2 through S0 to the
source pin number.
c. Set the OUTEN bit for all output pins.
2. For i = 0 to 55, do the following.
a. Copy bit i of the 56-bit pattern to bit 0 of an 8-bit temporary variable.
b. Write the temporary variable to the RTSI Switch Shift Register (8-bit write).
3. Write 0 to the RTSI Switch Strobe Register (8-bit write). This operation loads the 56-bit
pattern into the RTSI switch. At this point, the new signal routing goes into effect.
Step 2 above can be completed by simply writing the low-order eight bits of the 56-bit pattern to
the RTSI Switch Shift Register, then shifting the 56-bit pattern right once, and repeating this
two-step operation a total of 56 times. Only bit 0 of the word written to the RTSI Switch Shift
Register is used. The higher-order bits are ignored.
Programming DMA Operations
The AT-MIO-16D can be programmed so that the A/D FIFO generates a DMA request signal
every time one or more A/D conversion values are stored in the A/D FIFO. There are two DMA
modes–single-channel transfer and dual-channel transfer. In single-channel mode, one DMA
channel is used. The DMA channel is selected by the onboard jumper. To program the single-
channel DMA operation, perform the following steps after the circuitry on the AT-MIO-16D is
set up for a data acquisition operation and before the data acquisition operation begins:
1. Set the DMAEN bit in Command Register 1 to enable DMA request generation.
2. Program the DMA controller to service DMA requests from the AT-MIO-16D board. Refer
to the IBM Personal Computer AT Technical Reference manual for more information on
DMA controller programming.
3. If a DMA terminal count is received after the DMA service, write 0 to either the DMATC
Clear Register or the A/D Clear Register to clear the DMATC bit in the Status Register.
Once steps 1 and 2 are completed, the DMA controller automatically reads the A/D FIFO
Register whenever an A/D conversion result is available and then stores the result in a buffer in
memory.
To program the dual-channel DMA operation, perform the following steps:
1. Set the DMAEN and DBDMA bits in Command Register 1.
2. Write 0 to either the DMATC Clear Register or the A/D Clear Register.
Summary of Contents for AT-MIO-16D
Page 16: ......
Page 23: ......
Page 185: ......
Page 206: ......
Page 207: ......
Page 208: ......
Page 209: ......
Page 210: ......
Page 211: ......
Page 212: ......
Page 213: ......
Page 214: ......
Page 215: ......
Page 216: ......
Page 217: ......
Page 218: ......
Page 219: ......
Page 220: ......
Page 221: ......
Page 222: ......
Page 223: ......
Page 224: ......
Page 225: ......
Page 226: ......
Page 227: ......
Page 228: ......
Page 229: ......
Page 230: ......
Page 231: ......
Page 232: ......
Page 233: ......
Page 234: ......
Page 235: ......
Page 236: ......
Page 237: ......
Page 238: ......
Page 239: ......
Page 240: ......
Page 241: ......
Page 242: ......
Page 243: ......
Page 244: ......
Page 246: ......
Page 247: ......
Page 248: ......
Page 249: ......
Page 250: ......
Page 251: ......
Page 252: ......
Page 253: ......
Page 254: ......
Page 255: ......
Page 256: ......
Page 257: ......
Page 258: ......
Page 259: ......
Page 260: ......
Page 261: ......