Electronics & Circuits · Study deck
DAC and PWM: Output Foundations
A digital pin cannot make every analog voltage on its own.
Voltage Vera is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Explain: With a 12-bit DAC (212:1=4095), step size shrinks to 5/4095=1.22 mV -- 16× finer than 8-bit, enabling smooth audio waveforms where 8-bit would sound grainy.
- Explain: With the illustrated 5 V reference, dividing the reference range by the code count gives 5 V/16=0.3125 V per step, or 312.5 mV.
- Explain: For an 8-bit DAC with Vref=5 V, the step size (resolution) is Vstep=Vref/(2n:1)=5/255=19.6 mV.
- Compute DAC resolution and quantization error.
Major section
Start Simple
The two open paths therefore cannot be labelled DAC or PWM until the load's ripple, delay, drive, and safety limits are known.
- The panel leaves the two output paths unresolved.
- The computer holds a number, but the lamp needs voltage, current, and safe timing.
- The path between them decides whether the physical result matches the command.
Major section
Start Simple (continued)
Modulation means changing a signal to carry or control information.
- The lamp, reference dial, and actuator do not all respond to the same electrical property: one may tolerate switched average power, another needs a stable voltage, and another brings current, inertia, and timing constraints.
- An analog-to-digital converter means a circuit that turns a voltage into a number; it is called an ADC.
- An actuator means a part that creates a physical action.
Major section
Start Simple (continued)
A digital-to-analog converter (DAC) means a circuit that turns a number into a voltage or current.
- Pulse-width modulation means control made by changing how long a signal stays on; it is called PWM.
- This runway does not size a driver or prove smooth motion.
- A DAC produces a stepped analog voltage directly, while PWM makes a fast digital pulse train that a load or filter averages.
Major section
Phoebe's Field Notes: Why PWM Can Behave Like a DAC
The mathematical gist: An 8-bit endpoint DAC on 5 V has step q=5/255=19.6 mV and code 153 gives 3.00 V.
- PWM instead gives Vavg=DVhigh.
Major section
Digital-to-Analog Converters (DAC)
The drawing communicates dAC conversion contract from bounded digital code through reference and transfer function to measured analog output.
- For digital-to-analog converters (dac), these labels identify the boundary where an assumption must become a calculation or measurement.
Major section
Putting Numbers to It
For an 8-bit DAC with Vref=5 V, the step size (resolution) is Vstep=Vref/(2n:1)=5/255=19.6 mV.
- To output 3.0V, you need digital value D=⌊Vout×(2n:1)/Vref⌋=⌊3.0×255/5⌋=153.
- Actual output is Vactual=153×5/255=3.0 V exactly.
- With a 12-bit DAC (212:1=4095), step size shrinks to 5/4095=1.22 mV -- 16× finer than 8-bit, enabling smooth audio waveforms where 8-bit would sound grainy.
Major section
DAC Circuit Architecture
With the illustrated 5 V reference, dividing the reference range by the code count gives 5 V/16=0.3125 V per step, or 312.5 mV.
- Each code therefore selects one discrete output level rather than an arbitrary continuous voltage.
Major section
Quantization Error in DAC
Quantization appears because an N-bit DAC can produce only one of 2N code levels.
- Increasing bit depth reduces that vertical step; increasing update rate reduces the time between code changes but does not create new voltage levels.
- A low-pass filter can attenuate step edges and PWM carrier energy, yet it also changes bandwidth, settling time, and load response.
- Problem: DAC output is not truly analog - it's discrete steps.
Major section
Worked Example: DAC vs PWM Output Tradeoff
The first panel establishes ripple and response time before a technology is chosen.
- The third panel places the selected path on the real load and keeps it only when the trace fits those limits.
Deck summary
Key takeaways
The two open paths therefore cannot be labelled DAC or PWM until the load's ripple, delay, drive, and safety limits are known.
- Modulation means changing a signal to carry or control information.
- A digital-to-analog converter (DAC) means a circuit that turns a number into a voltage or current.
- The mathematical gist: An 8-bit endpoint DAC on 5 V has step q=5/255=19.6 mV and code 153 gives 3.00 V.
- The drawing communicates dAC conversion contract from bounded digital code through reference and transfer function to measured analog output.
Retrieval practice
Recall check 1 of 2

Voltage Vera says: answer from memory, then check your reasoning.
Q1A plant lamp receives a PWM command. What should the designer examine to predict its physical output?
Show answer
Answer: D PWM creates pulses that the load or filter averages; the load’s response matters.
Retrieval practice
Recall check 2 of 2

Voltage Vera says: answer from memory, then check your reasoning.
Q2A design smooths PWM pulses into an analog-like control signal. What choice does the chapter ask the learner to evaluate?
Show answer
Answer: C The chapter compares output methods and the trade-off introduced by filtering pulses.
Q3An ideal 8-bit DAC uses a 2.56 V reference and the chapter’s Vref/2^N convention. What is one voltage step?
Show answer
Answer: C In this convention, 2.56 V divided by 256 possible codes is 10 mV per code step.
Print reference
Answers
Answer key.
- D · PWM creates pulses that the load or filter averages; the load’s response matters.
- C · The chapter compares output methods and the trade-off introduced by filtering pulses.
- C · In this convention, 2.56 V divided by 256 possible codes is 10 mV per code step.