Chapter 4
Programming
© National Instruments Corporation
4-43
AT-MIO-16D User Manual
Initializing the Analog Output Circuitry
The AT-MIO-16D powers up with the analog output circuitry at an unknown voltage. For most
applications, the analog output circuitry should be initialized to 0 V.
If the analog output channel is configured for unipolar operation, write 0 to the DAC Register
(16-bit write) for that channel.
If the analog output channel is configured for two's complement bipolar output, write 0 to the
DAC Register (16-bit write) for that channel.
Programming the Analog Input Circuitry
Programming the analog input circuitry to obtain a single A/D conversion involves the following
sequence of steps:
1. Select the analog input channel and gain.
2. Initiate an A/D conversion.
3. Read the A/D conversion result.
In addition, you can program the binary format of the A/D conversion result and you can reset
the analog input circuitry.
1. Select analog input channel and gain.
The analog input channel and gain are selected by writing to the Mux-Gain Register. Bits 7 and
6 control the gain, and bits 3 through 0 select the analog input channel. See the Mux-Gain
Register bit description earlier in this chapter for gain and analog input channel bit patterns. Set
up the bits as given in the Mux-Gain Register bit description and write to the Mux-Gain Register.
Once the Mux-Gain Register is set up, it needs to be written to only when you need to change the
analog input channel or gain setting.
2. Initiate an A/D conversion.
An A/D conversion can be initiated in one of two ways–a software-generated pulse or a hardware
pulse.
To initiate an A/D conversion through software, write 0 to the A/D Start Convert Register.
To initiate an A/D conversion through hardware, apply an active low pulse to the EXTCONV*
pin on the AT-MIO-16D I/O connector. See the Data Acquisition Timing Connections section in
Chapter 2, Configuration and Installation, for EXTCONV* signal specifications.
Once an A/D conversion is initiated, the ADC automatically stores the result in the A/D FIFO at
the end of its conversion cycle.
Содержание AT-MIO-16D
Страница 16: ......
Страница 23: ......
Страница 185: ......
Страница 206: ......
Страница 207: ......
Страница 208: ......
Страница 209: ......
Страница 210: ......
Страница 211: ......
Страница 212: ......
Страница 213: ......
Страница 214: ......
Страница 215: ......
Страница 216: ......
Страница 217: ......
Страница 218: ......
Страница 219: ......
Страница 220: ......
Страница 221: ......
Страница 222: ......
Страница 223: ......
Страница 224: ......
Страница 225: ......
Страница 226: ......
Страница 227: ......
Страница 228: ......
Страница 229: ......
Страница 230: ......
Страница 231: ......
Страница 232: ......
Страница 233: ......
Страница 234: ......
Страница 235: ......
Страница 236: ......
Страница 237: ......
Страница 238: ......
Страница 239: ......
Страница 240: ......
Страница 241: ......
Страница 242: ......
Страница 243: ......
Страница 244: ......
Страница 246: ......
Страница 247: ......
Страница 248: ......
Страница 249: ......
Страница 250: ......
Страница 251: ......
Страница 252: ......
Страница 253: ......
Страница 254: ......
Страница 255: ......
Страница 256: ......
Страница 257: ......
Страница 258: ......
Страница 259: ......
Страница 260: ......
Страница 261: ......