Elektra CPU User Manual V1.00
Page 64
14.4 D/A Conversion Formulas and Tables
The formulas below explain how to convert between D/A codes and output voltages.
D/A Conversion Formulas for Unipolar Output Ranges
Output voltage = (D/A code / 4096) * Reference voltage
D/A code = (Output voltage / Reference voltage) * 4096
Example:
Output range in unipolar mode = 0 – 10V
Full-scale range = 10V – 0V = 10V
Desired output voltage = 2.000V
D/A code = 2.000V / 10V * 4096 = 819.2 => 819
Note the output code is always an integer.
For the unipolar output range 0-10V, 1 LSB = 1/4096 * 10V = 2.44mV.
Here is an illustration of the relationship between D/A code and output voltage for a unipolar
output range (V
REF
= Reference voltage):
D/A Code
Output voltage symbolic formula
Output voltage for 0 – 10V range
0
0V
0.0000V
1
1 LSB (V
REF
/ 4096)
0.0024V
…
…
…
2047
V
REF
/ 2 - 1 LSB
4.9976V
2048
V
REF
/ 2
5.0000V
2049
V
REF
/ 2 + 1 LSB
5.0024V
…
…
…
4095
V
REF
- 1 LSB
9.9976V