DAC Resolution Calculator Formula

Understand the math behind the dac resolution calculator. Each variable explained with a worked example.

Formulas Used

Output Voltage

output_voltage = digital_code * step_size

Step Size (1 LSB)

step_mv = step_size * 1000

Total Output Levels

total_levels = pow(2, dac_bits)

Maximum Output

max_output = max_code * step_size

Variables

VariableDescriptionDefault
dac_bitsDAC Resolution (bits)10
v_refReference Voltage(V)5
digital_codeDigital Input Code512
max_codeDerived value= pow(2, dac_bits) - 1calculated
step_sizeDerived value= v_ref / pow(2, dac_bits)calculated

How It Works

DAC Resolution and Output

A DAC converts a digital code to a proportional analog voltage. The resolution determines the smallest voltage step.

Formulas

Step Size = V_ref / 2^N

V_out = Digital Code x Step Size

Max Output = (2^N - 1) x Step Size

The output is always one step size less than V_ref because the code range is 0 to 2^N - 1.

Worked Example

10-bit DAC with 5.0 V reference, digital code 512.

dac_bits = 10v_ref = 5digital_code = 512
  1. 01Step size: 5.0 / 1024 = 4.883 mV
  2. 02Output: 512 x 0.004883 = 2.5000 V
  3. 03Max output: 1023 x 0.004883 = 4.9951 V
  4. 04Total levels: 1024

Ready to run the numbers?

Open DAC Resolution Calculator