Programming
Chapter 4
AT-MIO-16D User Manual
4-62
© National Instruments Corporation
data. This condition occurs if the software loop reading the A/D FIFO Register is not fast
enough to keep up with the A/D conversion rate. When an overflow occurs, at least one A/D
conversion result is lost. An overflow condition has occurred if the OVERFLOW bit in the
Status Register is set.
An overrun condition occurs if a second A/D conversion is initiated before the previous
conversion is finished. This condition may result in one or more missing A/D conversions. This
condition occurs if the sample interval is too small (the sample rate is too high). An overrun
condition has occurred if the OVERRUN bit in the Status Register is set.
Scanned data acquisition requires slower data acquisition rates than single-channel data
acquisition because signals must settle each time channels are switched. See Table 4-4 for the
maximum recommended multiple-channel data acquisition rates.
Both the OVERFLOW and OVERRUN bits in the Status Register are cleared by writing to the
A/D Clear Register.
Multiple A/D Conversions with Interval Channel Scanning (Pseudo-Simultaneous)
Programming scanned multiple A/D conversions with a scan interval 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. Program the scan-interval counter.
5. Clear the A/D circuitry and reset the multiplexer counter.
6. Enable the scanning data acquisition operation.
7. Apply a trigger.
8. 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.
Setting the SCN2 bit in Command Register 2 enables the use of a scan interval during multiple
A/D conversions. The scan-interval counter gives each cycle through the scan sequence a time
interval. The scan-interval counter begins counting at the start of the scan sequence programmed
into the mux-gain memory. When the scan sequence completes, the next cycle through the scan
sequence does not begin until the scan-interval counter has reached its terminal count. Be sure
that the scan-interval counter allows enough time for all conversions in a scan sequence to occur
so that conversions are not missed.
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: ......