This exercise will further help with understanding of the DAC.
Given: 8-Bit Voltage Output DAC with G = 1, VREF = 3.3V, Desired Output = 1.500V.
Question: What binary input code will give an output voltage closest to that desired?
What is the percentage error from the desired output voltage?
Solution:
D = 2n x VOUT / VREF
D = 256 x 1.500V / 3.3V
D = 116.3636d; round to 116d = 0111 0100b.
DAC Output = G x D x VREF / 2n
= 1 x 116 x 3.3 / 28 = 1.4953125V
Error = (1.5V - 1.4953125V) / 1.5V
= 0.003125 = 0.3125% Error