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.
- 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
Frequently Asked Questions
Why can the DAC not reach full Vref?
The maximum code is 2^N - 1, so V_max = Vref x (2^N-1)/2^N, which is one LSB below Vref.
What is glitch energy?
A brief output spike during code transitions caused by internal switch timing. It matters in high-speed and audio applications.
R-2R vs resistor string DAC?
R-2R ladder is compact and monotonic. Resistor string (thermometer) has guaranteed monotonicity and better DNL but more components.
Ready to run the numbers?
Open DAC Resolution Calculator