10.D/A CODE COMPUTATION
Two different methods are used to compute the
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
maximum number of steps is 212 = 4096 (the actual output codes range from 0 to 4095, which is the full range of possible
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, |
| 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, |
| Output Code = (0.485 / 2.5) x 4096 = 0.194 x 4096 = 795 (rounded up) |
The relationship between D/A resolution and
1 LSB = 1/4096 x Full-Scale Voltage
Example:
Here is a brief overview of the relationship between output code and output voltage:
Output Code | Explanation | Output Voltage for |
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
Copyright 2001 Diamond Systems Corp. |