What is an ADC?
An ADC, or Analog to Digital Converter, converts an analog voltage into a digital number that a microcontroller can process.
ADC Voltage Formula
n is the ADC resolution in bits. Vref is the ADC reference voltage.
ADC Count Formula
ADC Resolution
Example
Consider a 12-bit ADC with a 3.3 V reference. If the ADC returns a count of 2048:
The measured voltage is approximately 1.6504 V.
Common ADC Resolutions
- 8-bit ADC: 256 levels
- 10-bit ADC: 1024 levels
- 12-bit ADC: 4096 levels
- 14-bit ADC: 16384 levels
- 16-bit ADC: 65536 levels
ADC in Embedded Systems
Microcontrollers such as STM32, ESP32, AVR and PIC commonly include ADC peripherals for measuring sensors, batteries, potentiometers and other analog signals.
The actual ADC behavior can depend on the MCU, reference source, input range, calibration and ADC configuration.