Datasheet

Table Of Contents
269
ATmega640/V-1280/V-1281/V-2560/V-2561/V [DATASHEET]
2549Q–AVR–02/2014
Figure 26-1. Analog to Digital Converter Block Schematic
26.2 Operation
The ADC converts an analog input voltage to a 10-bit digital value through successive approximation. The mini-
mum value represents GND and the maximum value represents the voltage on the AREF pin minus 1 LSB.
Optionally, AVCC or an internal 1.1V or 2.56V reference voltage may be connected to the AREF pin by writing to
the REFSn bits in the ADMUX Register. The internal voltage reference may thus be decoupled by an external
capacitor at the AREF pin to improve noise immunity.
The analog input channel is selected by writing to the MUX bits in ADMUX and ADCSRB. Any of the ADC input
pins, as well as GND and a fixed bandgap voltage reference, can be selected as single ended inputs to the ADC. A
selection of ADC input pins can be selected as positive and negative inputs to the differential amplifier.
If differential channels are selected, the voltage difference between the selected input channel pair then becomes
the analog input to the ADC. If single ended channels are used, the amplifier is bypassed altogether.
ADC CONVERSION
COMPLETE IRQ
8-BIT DATABUS
15 0
ADIE
ADFR
ADSC
ADEN
ADIF
ADIF
MUX[4:0]
ADPS[2:0]
SAMPLE & HOLD
COMPARATOR
INTERNAL
REFERENCE
(1.1V/2.56V)
AVCC
REFS[1:0]
ADLAR
CHANNEL SELECTION
ADC[9:0]
ADC
MULTIPLEXER
OUTPUT
GAIN
AMPLIFIE
R
AREF
BANDGAP (1.1V)
REFERENCE
GND
CONVERSION LOGIC
ADC CTRL & STATUS
REGISTER B (ADCSRB)
ADC CTRL & STATUS
REGISTER A (ADCSRA)
PRESCALER
ADC MULTIPLEXER
SELECT (ADMUX)
MUX DECODER
DIFF / GAIN SELECT
ADC DATA REGISTER
(ADCH/ADCL)
ADC[2:0]
TRIGGER
SELECT
START
INTERRUPT
FLAGS
ADTS[2:0]
+
-
ADC[15:0]
+
-
10-bit DAC
MUX[5]
ADC[10:8]