![National Instruments AT-MIO-64F-5 User Manual Download Page 149](http://html1.mh-extra.com/html/national-instruments/at-mio-64f-5/at-mio-64f-5_user-manual_3417320149.webp)
Chapter 5
Programming
© National Instruments Corporation
5-5
AT-MIO-64F-5 User Manual
Generating a Single Conversion
An A/D conversion can be initiated in one of two waysÐa software-generated pulse or a
hardware pulse. To initiate a single A/D conversion through software, access the Single
Conversion Register. To initiate a single A/D conversion through hardware, apply an active low
pulse to the EXTCONV* pin on the AT-MIO-64F-5 I/O connector. See the
Data Acquisition
and Analog Output Timing Connections
section in Chapter 2,
Configuration and Installation
, for
EXTCONV* signal specifications. After an A/D conversion is initiated, the ADC automatically
stores the result in the ADC FIFO at the end of its conversion cycle.
Reading a Single Conversion Result
A/D conversion results are available when ADCFIFOEF* is set in the Status Register and can be
obtained by reading the ADC FIFO Register.
To read the A/D conversion result, use the following steps:
1. Read the Status Register (16-bit read).
2. If the OVERRUN or OVERFLOW bits are set, an error occurred and data was lost.
3. If the ADCFIFOEF* bit is set, read the ADC FIFO Register to obtain the result.
Reading the ADC FIFO Register removes the A/D conversion result from the ADC FIFO and
clears the ADCFIFOEF* bit if no more values remain in the FIFO.
The ADCFIFOEF* bit indicates whether one or more A/D conversion results are stored in the
ADC FIFO. If the ADCFIFOEF* bit is not set, the ADC FIFO is empty and reading the ADC
FIFO Register returns meaningless data. After an A/D conversion is initiated, the ADCFIFOEF*
bit is set approximately 10 µsec after initiating the conversion, indicating that the data
conversion result can be read from the FIFO.
An ADC FIFO overflow condition occurs if more than 512 conversions are initiated and stored
in the ADC FIFO before the ADC FIFO Register is read. If this condition occurs, the
OVERFLOW bit is set in the Status Register to alert you that one or more A/D conversion
results have been lost because of FIFO overflow. Strobing the DAQ Clear Register resets this
error flag.
An ADC overrun condition occurs if an attempt is made to start a new conversion while the
previous conversion is being completed. If this condition occurs, the OVERRUN bit is set in
Status Register 1 to indicate an error condition or that an invalid operation occurred. Strobing
the DAQ Clear Register resets this error flag.
Programming a Single-Channel Data Acquisition Sequence
The following programming sequence for sample counts less than 65,537 leaves the data
acquisition circuitry in a retriggerable state. 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 another
trigger condition is received.
Summary of Contents for AT-MIO-64F-5
Page 13: ......
Page 16: ......
Page 200: ......
Page 201: ......
Page 202: ......
Page 203: ......
Page 204: ......
Page 205: ......
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: ......