Diamond Systems 16-Channel 12-Bit Analog Output PC/104 Module Computer Hardware User Manual


 
Copyright 2001 Diamond Systems Corp. Ruby-MM-1612 User Manual V1.1 P. 14
10. D/A CODE COMPUTATION
Two different methods are used to compute the 12-bit D/A code used for analog output operations.
For unipolar output ranges (positive voltages only), straight binary coding is used.
For bipolar output ranges (both positive and negative voltages), offset binary coding is used.
For any output range, the resolution is equal to the maximum possible range of output voltages divided by
the maximum number of possible steps. For a 12-bit D/A converter as is used on the Ruby-MM-1612, the
maximum number of steps is 2
12
= 4096 (the actual output codes range from 0 to 4095, which is the full
range of possible 12-bit binary numbers). Thus the resolution is equal to 1/4096 times the full-scale
range. This is the smallest possible change in the output and corresponds to a change of 1 in the output
code. Because of this fact the resolution is often referred to as the value of 1 LSB, or 1 least significant
bit.
Straight Binary Coding (for unipolar output ranges)
This is the simplest form of binary coding. The output voltage is given by:
Output Voltage = (Output Code / 4096) x Full-Scale Voltage
Example: Output code = 1024, full-scale voltage = 5V
Output voltage = (1024 / 4096) x 5 = .25 x 5 = 1.250V
Conversely, the output code for a desired output voltage is given by:
Output Code = (Desired Output Voltage / Full-Scale Voltage) x 4096
Example: Desired output voltage = 0.485V, Full-scale voltage = 2.5V
Output Code = (0.485 / 2.5) x 4096 = 0.194 x 4096 = 795 (rounded up)
The relationship between D/A resolution and Full-scale voltage is:
1 LSB = 1/4096 x Full-Scale Voltage
Example: Full-scale voltage = 5V; 1 LSB = 5V / 4096 = 1.22mV
Here is a brief overview of the relationship between output code and output voltage:
Output Code Explanation Output Voltage for 0-5V Range
0 0V 0V
1 1 LSB .0024V (2.44mV)
2048 1/2 positive full scale 2.5V
4095 Positive full scale - 1 LSB 4.9988V
Note: In order to generate an output voltage of positive full scale, you would have to output a code of
4096 (4096 / 4096 x full-scale = full-scale). However, 4096 is a 13-bit number which cannot be
reproduced on a 12-bit D/A converter. The highest number that can be output is 4095, which is 4096 - 1.
This results in a maximum output voltage of full scale minus 1 LSB for any analog output range. This
phenomenon is true for all D/A and A/D converters.