
111
ATtiny40 [DATASHEET]
8263B–AVR–01/2013
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).
15.13.2
ADCL and ADCH – ADC Data Register
15.13.2.1
ADLAR = 0
15.13.2.2
ADLAR = 1
When an ADC conversion is complete, the result is found in these two registers.
When ADCL is read, the ADC Data Register is not updated until ADCH is read. Consequently, if the result is left
adjusted and no more than 8-bit precision is required, it is sufficient to read ADCH. Otherwise, ADCL must be read
first, then ADCH.
The ADLAR bit in ADCSRB, and the MUX bits in ADMUX affect the way the result is read from the registers. If
ADLAR is set, the result is left adjusted. If ADLAR is cleared (default), the result is right adjusted.
ADC[9:0]: ADC Conversion Result
15.13.3
ADCSRA – ADC Control and Status Register A
Bit 7 – ADEN: ADC Enable
Writing this bit to one enables the ADC. By writing it to zero, the ADC is turned off. Turning the ADC off while a con-
version is in progress, will terminate this conversion.
Bit 6 – ADSC: ADC Start Conversion
In Single Conversion mode, write this bit to one to start each conversion. In Free Running mode, write this bit to
one to start the first conversion. The first conversion after ADSC has been written after the ADC has been enabled,
or if ADSC is written at the same time as the ADC is enabled, will take 25 ADC clock cycles instead of the normal
13. This first conversion performs initialization of the ADC.
Bit
151413121110
9
8
–
ADC9
ADC8
ADCH
ADC7
ADC6
ADC5
ADC4
ADC3
ADC2
ADC1
ADC0
ADCL
765
43
21
0
Read/Write
RR
R
RR
R
Initial Value
000
00
0
000
00
0
Bit
151413121110
9
8
ADC9
ADC8
ADC7
ADC6
ADC5
ADC4
ADC3
ADC2
ADCH
ADC1
ADC0
–
ADCL
765
43
21
0
Read/Write
RR
Initial Value
000
00
0
000
00
0
Bit
765
4321
0
ADEN
ADSC
ADATE
ADIF
ADIE
ADPS2
ADPS1
ADPS0
ADCSRA
Read/Write
R/W
Initial Value
000
0000
0