A DAC (Digital-to-Analog Converter) is the peripheral that does the opposite of the ADC: it turns a number into a real analog voltage, adjustable continuously between zero and full scale. It is the output you need when the shape of the signal matters — generating a sound, a waveform, a setpoint for an analog stage.

In practice

A DAC is a rare thing on microcontrollers: many have none at all (the classic Uno), and the original ESP32 offers two of them, 8 bits wide. For most control needs (speed, brightness) you do without one: PWM — direct or filtered — takes its place. A true DAC only becomes necessary when the signal itself has to be analog (audio, test signals). If the built-in DAC is not enough, an external DAC is driven over a bus (I2C or SPI).

See also

  • ADC — the converter the other way round: reading an analog voltage
  • PWM — the usual stand-in for a DAC when dosing a command
  • O — the family of peripherals
  • Microcontroller — the chip that sometimes integrates a DAC