Chapter 4
Programming
© National Instruments Corporation
4-71
AT-MIO-16D User Manual
Programming the Analog Output Circuitry
The voltage at the analog output circuitry output pins (pins DAC0 OUT and DAC1 OUT on the
AT-MIO-16D MIO-16 I/O connector) is controlled by loading the DAC in the analog output
channel with a 12-bit digital code. This DAC is loaded by writing the digital code to the DAC0
and DAC1 Registers. Writing to the DAC0 Register controls the voltage at the DAC0 OUT pin
on the MIO-16 I/O connector. Writing to the DAC1 Register controls the voltage at the DAC1
OUT pin. The analog output on pins DAC0 OUT and DAC1 OUT can be updated in one of two
ways: immediately when DAC0 or DAC1 is written, or when an active low pulse is detected on
the OUT2 pin of the Am9513A Counter/Timer. The LDAC bit in Command Register 2 selects
which update method is used.
The output voltage generated from the digital code depends on the configuration, unipolar or
bipolar, of the associated analog output channel. This configuration is determined by
configuration jumpers on the AT-MIO-16D board. In bipolar mode, configuration jumpers also
determine if the digital code written to the DACs is in straight binary form or in a two's
complement form. The factory default is the bipolar configuration in two's complement mode.
See the Analog Input Configuration section in Chapter 2, Configuration and Installation, for
more information. Table 4-5 shows the output voltage versus digital code for a unipolar analog
output configuration. Table 4-6 shows the voltage versus digital code for a bipolar analog output
configuration.
The formula for the voltage output versus digital code for a unipolar analog output configuration
is as follows:
V
out
= V
ref
* (digital code)
4,096
where V
ref
is the reference voltage applied to the analog output channel. The digital code in the
above formula is a decimal value ranging from 0 to 4,095.
Table 4-5. Analog Output Voltage Versus Digital Code (Unipolar Mode)
Digital Code
Voltage Output
Decimal
Hex
V
ref = 10 V
V
out
0
0
0
0 V
1
1
Vref 2.44
mV
4,096
1,024
0400
Vref 2.5
V
4
2,048
0800
Vref 5
V
2
3,072
0C00
Vref * 3
7.5 V
4
4,095
0FFF
Vref * 4,095
9.9976 V
4,096
Содержание 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: ......