Programming
Chapter 5
AT-MIO-64F-5 User Manual
5-10
© National Instruments Corporation
Setting the SCN2 bit in Command Register 1 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 channel configuration memory. When the scan sequence terminates, 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.
Data Acquisition Programming Functions
This section provides a detailed explanation of the functions necessary to program the analog
input for single and multiple channel A/D conversions.
Clearing the Analog Input Circuitry
The analog input circuitry can be cleared by strobing the DAQ Clear Register. This operation
leaves the analog input circuitry in the following state:
¥
Analog input error flags OVERFLOW and OVERRUN are cleared.
¥
Pending data acquisition interrupt requests are cleared.
¥
ADC FIFO is emptied.
¥
DAQCOMP flag in the Status Register is cleared.
Empty the ADC FIFO before starting any A/D conversions. This action guarantees that the A/D
conversion results read from the FIFO are the results from the initiated conversions and are not
left over results from previous conversions.
Programming Single Analog Input Channel Configurations
The analog input channel, gain, mode, and range for single conversion and single channel
acquisition are selected by writing a single configuration value to the CONFIGMEM Register.
This register offers a window into the channel configuration memory. The CONFIGMEMLD
Register must then be strobed to load this channel configuration information. See the
CONFIGMEM Register bit description in Chapter 4,
Register Map and Descriptions
, for analog
input channel and configuration bit patterns. Set up the bits as given in the CONFIGMEM
Register bit description and write to the CONFIGMEM Register. Remember that the channel
configuration memory must be first initialized with an access to the CONFIGMEMCLR
Register.
After the channel configuration memory is configured, it needs to be written to only when the
analog input channel or configuration settings need to be changed.
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: ......