Datasheet

136
2586D–AVR–02/06
ATtiny25/45/85
20.7.4 ADMUX – ADC Multiplexer Selection Register
Bit 7:6,4 – REFS2:REFS0: Voltage Reference Selection Bits
These bits select the voltage reference (V
REF
) for the ADC, as shown in Table 20-2. If these bits
are changed during a conversion, the change will not go in effect until this conversion is
complete (ADIF in ADCSR is set). Whenever these bits are changed, the next conversion will
take 25 ADC clock cycles. If active channels are used, using V
CC
or an external AREF higher
than (V
CC
- 1V) as a voltage reference is not recommended, as this will affect the ADC accuracy.
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-
sions. For a comple te description of this bit, see ”ADCL and ADCH – The ADC Data Register”
on page 139.
Bits 3:0 – MUX3:0: Analog Channel and Gain Selection Bits
The value of these bits selects which combination of analog inputs are connected to the ADC. In
case of differential input (ADC0 - ADC1 or ADC2 - ADC3), gain selection is also made with these
bits. Selecting ADC2 or ADC0 as both inputs to the differential gain stage enables offset mea-
surements. Selecting the single-ended channel ADC4 enables the temperature sensor. Refer to
Table 20-3 for details. If these bits are changed during a conversion, the change will not go into
effect until this conversion is complete (ADIF in ADCSRA is set).
Bit 76543210
0x07 REFS1 REFS0 ADLAR REFS2 MUX3 MUX2 MUX1 MUX0 ADMUX
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Table 20-2. Voltage Reference Selections for ADC
REFS2 REFS1 REFS0 Voltage Reference (V
REF
) Selection
000V
CC
used as Voltage Reference, disconnected from PB0 (AREF).
001
External Voltage Reference at PB0 (AREF) pin, Internal Voltage
Reference turned off.
010
Internal 1.1V Voltage Reference without external bypass capacitor,
disconnected from PB0 (AREF).
011
Internal 1.1V Voltage Reference with external bypass capacitor at
PB0 (AREF) pin.
110
Internal 2.56V Voltage Reference without external bypass
capacitor, disconnected from PB0 (AREF).
111
Internal 2.56V Voltage Reference with external bypass capacitor at
PB0 (AREF) pin.