Chapter 4
Programming
© National Instruments Corporation
4-57
AT-MIO-16D User Manual
Both the OVERFLOW and OVERRUN bits in the Status Register are cleared by writing to the
A/D Clear Register.
An A/D conversion is initiated and stored in the A/D FIFO every time a low-to-high edge is
detected on the EXTCONV* input. See Chapter 2, Configuration and Installation, for
EXTCONV* signal specifications.
Programming Multiple A/D Conversions with Channel Scanning
The data acquisition programming sequences described earlier program the AT-MIO-16D for
multiple A/D conversion on a single input channel. You can also program the AT-MIO-16D for
scanning analog input channels and switching gain settings during the data acquisition operation.
The sequence of A/D channels and gain settings, called the scan sequence, is programmed into
the mux-gain memory.
There are two types of multiple A/D conversions with channel scanning–continuous channel
scanning and interval channel scanning. Continuous channel scanning cycles through the scan
sequence in the mux-gain memory and repeats the scan sequence until the sample counter
terminates the data acquisition. There is no delay between the cycles of the scan sequence.
Continuous channel scanning can be thought of as a round-robin approach to scanning multiple
channels.
Interval channel scanning gives each scan sequence a programmed time interval, called a scan
interval. Each cycle of the scan sequence begins at the time interval specified by the scan
interval. If the sample-interval counter is programmed for the minimum time required to
complete an A/D conversion, interval channel scanning can be thought of as a pseudo-
simultaneous scanning of multiple channels; that is, all channels in the scan sequence are read as
quickly as possible at the beginning of each scan interval.
Multiple A/D Conversions with Continuous Channel Scanning (Round Robin)
Programming continuous scanning of multiple A/D conversions involves the following
programming steps:
1. Set up the analog channel and gain selection sequence.
2. Program the sample-interval counter.
3. Program the sample counter.
4. Clear the A/D circuitry and reset the multiplexer counter.
5. Enable the scanning data acquisition operation.
6. Apply a trigger.
7. Service the data acquisition operation.
Setting the SCANEN bit in Command Register 1 enables scanning during multiple A/D
conversions. You must set this bit regardless of the type of scanning used; otherwise, only a
single channel is scanned. In addition, a channel and gain scan sequence must be stored in the
mux-gain memory.
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: ......