2 Overview
The Analog-to-Digital Converter (ADC) peripheral produces 10-bit results on tinyAVR and megaAVR microcontrollers and 10-bit/12-bit result on AVR DA microcontrollers. The ADC input can either be internal (e.g,. a voltage reference), or external through the analog input pins. The ADC is connected to an analog multiplexer, which allows the selection of multiple single-ended voltage inputs. The single-ended voltage inputs refer to 0V (GND).
The ADC supports sampling in bursts where a configurable number of conversion results are accumulated into a single ADC result (Sample Accumulation). The ADC input signal is fed through a sample-and-hold circuit that ensures the input voltage to the ADC is held at a constant level during sampling.
Selectable voltage references from the internal Voltage Reference (VREF) peripheral, VDD supply voltage, or external VREF pin (VREFA).
The analog input channel is selected by writing to the MUXPOS bits in the MUXPOS
(ADCn.MUXPOS) register. Any of the ADC input pins, GND, internal Voltage Reference
(VREF), or temperature sensor, can be selected as single-ended input to
the ADC. The ADC is enabled by writing a ‘1
’ to the ADC ENABLE bit in
the Control A (ADCn.CTRLA) register. Voltage reference and input channel selections will
not go into effect before the ADC is enabled. The ADC does not consume power when the
ENABLE bit in ADCn.CTRLA is zero.
The ADC generates a 10-bit result on tinyAVR and megaAVR microcontrollers and a 10-bit/12-bit result on AVR DA microcontrollers. It can be read from the Result (ADCn.RES) register. The result is presented right adjusted.