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.
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: ......