DAC Resolution Calculator Formula
Understand the math behind the dac resolution calculator. Each variable explained with a worked example.
Formulas Used
Step Size (LSB)
step_size_mv = v_ref / pow(2, bits) * 1000Output Voltage
v_output = digital_code * v_ref / pow(2, bits)Maximum Output
v_max = (pow(2, bits) - 1) * v_ref / pow(2, bits)Variables
| Variable | Description | Default |
|---|---|---|
bits | DAC Bits(bits) | 10 |
v_ref | Reference Voltage(V) | 5 |
digital_code | Digital Input Code | 512 |
How It Works
DAC Resolution
Formulas
Step Size = V_ref / 2^N
V_out = Code x V_ref / 2^N
V_max = (2^N - 1) x V_ref / 2^N
The DAC converts a digital number into an analog voltage. Each increment of the digital code changes the output by one LSB.
Worked Example
10-bit DAC with 5 V reference, digital code = 512.
bits = 10v_ref = 5digital_code = 512
- 01Step size = 5 / 1024 = 4.883 mV
- 02V_out = 512 x 5 / 1024 = 2.500 V
- 03V_max = 1023 x 5 / 1024 = 4.995 V
Ready to run the numbers?
Open DAC Resolution Calculator