attiny13-20ss ATMEL Corporation, attiny13-20ss Datasheet - Page 92

no-image

attiny13-20ss

Manufacturer Part Number
attiny13-20ss
Description
8-bit Microcontroller With 1k Bytes In-system Programmable Flash - Atmel Corporation
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
attiny13-20ssI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny13-20ssJ
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny13-20ssU
Quantity:
2 180
Company:
Part Number:
attiny13-20ssU
Quantity:
100
Company:
Part Number:
attiny13-20ssU
Quantity:
739
Part Number:
attiny13-20ssU-SL383
Manufacturer:
ATMEL
Quantity:
4 132
ADC Control and Status
Register A – ADCSRA
92
ATtiny13
This bit selects the voltage reference for the ADC, as shown in Table 37. If this bit is
changed during a conversion, the change will not go in effect until this conversion is
complete (ADIF in ADCSRA is set).
Table 37. Voltage Reference Selections for ADC
• 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 conversions. For a complete description of this bit, see “The
ADC Data Register – ADCL and ADCH” on page 93.
• Bits 4:2 – Res: Reserved Bits
These bits are reserved bits in the ATtiny13 and will always read as zero.
• Bits 1:0 – MUX1:0: Analog Channel Selection Bits
The value of these bits selects which combination of analog inputs are connected to the
ADC. See Table 38 for details. 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).
Table 38. Input Channel Selections
• Bit 7 – ADEN: ADC Enable
Writing this bit to one enables the ADC. By writing it to zero, the ADC is turned off. Turn-
ing the ADC off while a conversion 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 Run-
ning 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.
ADSC will read as one as long as a conversion is in progress. When the conversion is
complete, it returns to zero. Writing zero to this bit has no effect.
• Bit 5 – ADATE: ADC Auto Trigger Enable
Bit
Read/Write
Initial Value
MUX1..0
REFS0
00
01
10
11
ADEN
0
1
R/W
7
0
ADSC
R/W
6
0
ADATE
R/W
5
0
Voltage Reference Selection
V
Internal Voltage Reference.
Single Ended Input
ADC0 (PB5)
ADC1 (PB2)
ADC2 (PB4)
ADC3 (PB3)
CC
used as analog reference.
ADIF
R/W
4
0
ADIE
R/W
3
0
ADPS2
R/W
2
0
ADPS1
R/W
1
0
ADPS0
R/W
0
0
2535G–AVR–01/07
ADCSRA

Related parts for attiny13-20ss