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.
Содержание AT-MIO-16D
Страница 16: ......
Страница 23: ......
Страница 185: ......
Страница 206: ......
Страница 207: ......
Страница 208: ......
Страница 209: ......
Страница 210: ......
Страница 211: ......
Страница 212: ......
Страница 213: ......
Страница 214: ......
Страница 215: ......
Страница 216: ......
Страница 217: ......
Страница 218: ......
Страница 219: ......
Страница 220: ......
Страница 221: ......
Страница 222: ......
Страница 223: ......
Страница 224: ......
Страница 225: ......
Страница 226: ......
Страница 227: ......
Страница 228: ......
Страница 229: ......
Страница 230: ......
Страница 231: ......
Страница 232: ......
Страница 233: ......
Страница 234: ......
Страница 235: ......
Страница 236: ......
Страница 237: ......
Страница 238: ......
Страница 239: ......
Страница 240: ......
Страница 241: ......
Страница 242: ......
Страница 243: ......
Страница 244: ......
Страница 246: ......
Страница 247: ......
Страница 248: ......
Страница 249: ......
Страница 250: ......
Страница 251: ......
Страница 252: ......
Страница 253: ......
Страница 254: ......
Страница 255: ......
Страница 256: ......
Страница 257: ......
Страница 258: ......
Страница 259: ......
Страница 260: ......
Страница 261: ......