13.1 Compute the D/A code for the desired output voltage
A different formula is required for bipolar and unipolar output ranges.
Unipolar Mode D/A Formula:
Output value = (Output voltage) / (Full-scale voltage) (65536 Standard, 4096 Optional)
Example: Desired output voltage = 2.168V, full-scale voltage = 5V, unipolar mode (0-5V)
Output code = 2.168V / 5V 65536 = 28416 (16-Bit)
= 2.168V / 5V * 4096 = 1776 (12-Bit)
Bipolar Mode D/A Formula:
Output value = (Output voltage) / (Full-scale voltage) 32768 + 32768 (16-Bit)
= (Output voltage) / (Full-scale voltage) 2048 + 2048 (12-Bit)
Example: Desired output voltage = -2.168V, full-scale voltage = 5V, bipolar mode ( +/-5V)
Output code = -2.168V / 5V 32768 + 32768 = 18560 (16-Bit)
= -2.168V / 5V 2048 + 2048 = 1160 (12-bit)
Note: The DAC cannot generate the actual full-scale reference voltage; to do so would require an output code of 65536 (or 4096 with 12-bit option), which is not possible with a 16-bit (or 12-bit) number. The maximum output value is 65535 (or 4095). Therefore the maximum possible output voltage is 1 LSB less than the full-scale reference voltage.
Last updated