EasyManuals Logo

Atmel AVR ATtiny15L User Manual

Atmel AVR ATtiny15L
85 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #49 background imageLoading...
Page #49 background image
49
ATtiny15L
1187H–AVR–09/07
The ADC Data Register –
ADCL and ADCH
ADLAR = 0
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. 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 ADMUX affects 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.
ADC9..0: ADC Conversion Result
These bits represent the result from the conversion. For the differential channel, this is
the value after gain adjustment, as indicated in Table 20 on page 47. For single-ended
conversion, or if ADLAR or SIGN is zero, $000 represents ground and $3FF represents
the selected reference voltage minus one LSB.
Scanning Multiple Channels Since change of analog channel always is delayed until a conversion is finished, the
Free Running mode can be used to scan multiple channels without interrupting the con-
verter. Typically, the ADC Conversion Complete Interrupt will be used to perform the
channel shift. However, the user should take the following fact into consideration:
The interrupt triggers once the result is ready to be read. In Free Running mode, the
next conversion will start immediately when the interrupt triggers. If ADMUX is
changed after the interrupt triggers, the next conversion has already started, and the
old setting is used.
Bit 151413121110 9 8
$05 ADC9 ADC8 ADCH
$04 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0 ADCL
76543210
Read/WriteRRRRRRRR
RRRRRRRR
Initial Value00000000
00000000
Bit 151413121110 9 8
$05 ADC9 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADCH
$04 ADC1 ADC0 –––––ADCL
76543210
Read/WriteRRRRRRRR
RRRRRRRR
Initial Value00000000
00000000

Table of Contents

Other manuals for Atmel AVR ATtiny15L

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR ATtiny15L and is the answer not in the manual?

Atmel AVR ATtiny15L Specifications

General IconGeneral
BrandAtmel
ModelAVR ATtiny15L
CategoryMicrocontrollers
LanguageEnglish

Related product manuals