![](http://datasheet.mmic.net.cn/Atmel/AT32AP7000-CTUR_datasheet_96418/AT32AP7000-CTUR_255.png)
255
2545T–AVR–05/11
ATmega48/88/168
24.7
ADC conversion result
After the conversion is complete (ADIF is high), the conversion result can be found in the ADC
Result Registers (ADCL, ADCH).
For single ended conversion, the result is
where V
IN is the voltage on the selected input pin and VREF the selected voltage reference (see
sents the selected reference voltage minus one LSB.
24.8
Register description
24.8.1
ADMUX – ADC multiplexer selection register
Bit 7:6 – REFS1:0: Reference selection bits
These bits select the voltage reference for the ADC, as shown in
Table 24-2. If these bits are
changed during a conversion, the change will not go in effect until this conversion is complete
(ADIF in ADCSRA is set). The internal voltage reference options may not be used if an external
reference voltage is being applied to the AREF pin.
Bit 5 – ADLAR: ADC left adjust result
The ADLAR bit affects the presentation of the ADC conversion result in the ADC Data Register.
Write one to ADLAR to left adjust the result. Otherwise, the result is right adjusted. Changing the
ADLAR bit will affect the ADC Data Register immediately, regardless of any ongoing conver-
Bit 4 – Res: Reserved bit
This bit is an unused bit in the Atmel ATmega48/88/168, and will always read as zero.
ADC
VIN 1024
VREF
--------------------------
=
Bit
765
4321
0
REFS1
REFS0
ADLAR
–
MUX3
MUX2
MUX1
MUX0
ADMUX
Read/write
R/W
R
R/W
Initial value
000
0000
0
Table 24-2.
Voltage reference selections for ADC.
REFS1
REFS0
Voltage reference selection
0
AREF, internal V
ref turned off
01
AV
CC with external capacitor at AREF pin
10
Reserved
1
Internal 1.1V voltage reference with external capacitor at AREF pin