Home / Learn Embedded C / What Is a DAC?
What Is a DAC?
A Digital-to-Analog Converter — the reverse of an ADC, producing a real voltage from a digital number.
Theory in plain words
Definition
A DAC (Digital-to-Analog Converter) takes a digital number and produces a corresponding continuous analog voltage output — the reverse operation of an ADC.
Why you need this
Generating an actual analog waveform (an audio tone, a smoothly varying control voltage) needs a true DAC output, which behaves differently from the simulated-analog PWM technique covered earlier.
How it works
Unlike PWM (which approximates an average voltage by fast switching), a DAC outputs a genuinely continuous voltage directly, without needing any external filtering to "smooth out" switching edges.
Where you'll see this
- Audio generation
- Analog control signals
- Waveform synthesis
Try it
Both land near the same value here, but the PWM figure is only a time-averaged approximation while the DAC value is a direct, continuous voltage.
Try it: sweeping a DAC through several direct voltage levels
Each code here produces an immediate, continuous output voltage — no switching or averaging involved, unlike PWM.
Test what you just read
1. How does a true DAC output differ fundamentally from a PWM "simulated analog" signal?
PWM approximates an average analog-like effect through fast digital switching; a true DAC directly outputs a real, continuously-variable voltage.