Programming
Chapter 4
AT-MIO-16D User Manual
4-46
© National Instruments Corporation
•
Analog input error flags OVERFLOW and OVERRUN are cleared.
•
Pending interrupt requests are cleared.
•
A/D FIFO is emptied.
Empty the A/D FIFO before starting any A/D conversions. This action guarantees that the A/D
conversion results read from the A/D FIFO are the results from the initiated conversions, not
results left over from previous conversions.
To clear the analog input circuitry and the A/D FIFO, write 0 to the A/D Clear Register.
Programming Multiple A/D Conversions on a Single Input Channel
The AT-MIO-16D board can be programmed to execute a multiple A/D conversion sequence
with the following options:
•
A/D conversions can be initiated either by pulses generated by the onboard sample-interval
counter or by pulses applied to the EXTCONV* input. These pulses control the conversion
rate.
•
The entire conversion sequence can be started by a software write operation to the board or
by a signal applied to the START TRIG* input.
•
You can select either posttrigger or pretrigger operation. In posttrigger operation, the sample
counter begins decrementing with each conversion pulse once the conversion sequence is
started. When the sample counter reaches zero, the conversion sequence terminates. Thus,
all acquired data was received after the trigger or software start. In pretrigger operation, the
sample counter does not decrement until a trigger signal is applied to the STOP TRIG input.
When the conversion sequence terminates, some of the acquired data has been received
before the trigger signal and some has been received after this signal.
The most commonly used configuration is for the onboard sample-interval and sample counters
to control the entire data acquisition operation. Programming this configuration is explained
here. The other timing configurations are explained in the External Timing Considerations for
Multiple A/D Conversions section later in this chapter. Multiple-channel scanning is discussed in
the Programming Multiple A/D Conversions with Channel Scanning section later in this chapter.
The following programming sequences for sample counts less than 65,537 allow the data
acquisition circuitry to be retriggered. The sample-interval and sample counters are reloaded at
the end of the data acquisition to prepare for another data acquisition operation. The counters do
not need reprogramming, and the next data acquisition operation starts when a trigger is received.
Programming multiple A/D conversions on a single channel requires the following programming
steps:
1. Select analog input channel and gain.
2. Program the sample-interval counter.
3. Program the sample counter.
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: ......