– 118 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
• Data and Non-volatile Program Memory
– 2K Bytes of In-System Programmable Program Memory Flash
Endurance: 10,000 Write/Erase Cycles
– 128 Bytes of In-System Programmable EEPROM
Endurance: 100,000 Write/Erase Cycles
– 128 Bytes Internal SRAM
– Programming Lock for Flash Program and EEPROM Data Security
• Peripheral Features
– 8-bit Timer/Counter with Separate Prescaler
– 8-bit High-speed Timer with Separate Prescaler
2 High Frequency PWM Outputs with Separate Output Compare Registers
Non-overlapping Inverted PWM Output Pins
– Universal Serial Interface with Start Condition Detector
– 10-bit ADC
11 Single Ended Channels
8 Differential ADC Channels
7 Differential ADC Channel Pairs with Programmable Gain (1x, 20x)
– On-chip Analog Comparator
– External Interrupt
– Pin Change Interrupt on 11 Pins
– Programmable Watchdog Timer with Separate On-chip Oscillator
• Special Microcontroller Features
– Low Power Idle, Noise Reduction, and Power-down Modes
– Power-on Reset and Programmable Brown-out Detection
– External and Internal Interrupt Sources
– In-System Programmable via SPI Port
– Internal Calibrated RC Oscillator
Note:The bottom pad under the QFN/MLF package should be soldered to ground.
2
ATtiny26(L)
1477IS–AVR–10/06
ATtiny26(L)
DescriptionThe ATtiny26(L) is a low-power CMOS 8-bit microcontroller based on the AVR
enhanced RISC architecture. By executing powerful instructions in a single clock cycle,
the ATtiny26(L) achieves throughputs approaching 1 MIPS per MHz allowing the system
designer to optimize power consumption versus processing speed.
The AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing
two independent registers to be accessed in one single instruction executed in one clock
cycle. The resulting architecture is more code efficient while achieving throughputs up to
ten times faster than conventional CISC microcontrollers. The ATtiny26(L) has a high
precision ADC with up to 11 single ended channels and 8 differential channels. Seven
differential channels have an optional gain of 20x. Four out of the seven differential
channels, which have the optional gain, can be used at the same time. The ATtiny26(L)
also has a high frequency 8-bit PWM module with two independent outputs. Two of the
PWM outputs have inverted non-overlapping output pins ideal for synchronous rectification. The Universal Serial Interface of the ATtiny26(L) allows efficient software
implementation of TWI (Two-wire Serial Interface) or SM-bus interface. These features
allow for highly integrated battery charger and lighting ballast applications, low-end thermostats, and firedetectors, among other applications.
The ATtiny26(L) provides 2K bytes of Flash, 128 bytes EEPROM, 128 bytes SRAM, up
to 16 general purpose I/O lines, 32 general purpose working registers, two 8-bit
Timer/Counters, one with PWM outputs, internal and external Oscillators, internal and
external interrupts, programmable Watchdog Timer, 11-channel, 10-bit Analog to Digital
Converter with two differential voltage input gain stages, and four software selectable
power saving modes. The Idle mode stops the CPU while allowing the Timer/Counters
and interrupt system to continue functioning. The ATtiny26(L) also has a dedicated ADC
Noise Reduction mode for reducing the noise in ADC conversion. In this sleep mode,
only the ADC is functioning. The Power-down mode saves the register contents but
freezes the oscillators, disabling all other chip functions until the next interrupt or hardware reset. The Standby mode is the same as the Power-down mode, but external
oscillators are enabled. The wakeup or interrupt on pin change features enable the
ATtiny26(L) to be highly responsive to external events, still featuring the lowest power
consumption while in the Power-down mode.
1477IS–AVR–10/06
The device is manufactured using Atmel’s high density non-volatile memory technology.
By combining an enhanced RISC 8-bit CPU with Flash on a monolithic chip, the
ATtiny26(L) is a powerful microcontroller that provides a highly flexible and cost effective solution to many embedded control applications.
The ATtiny26(L) AVR is supported with a full suite of program and system development
tools including: Macro assemblers, program debugger/simulators, In-circuit emulators,
and evaluation kits.
3
Block DiagramFigure 1. The ATtiny26(L) Block Diagram
VCC
GND
AVCC
PROGRAM
COUNTER
PROGRAM
FLASH
INSTRUCTION
REGISTER
INSTRUCTION
DECODER
CONTROL
LINES
PROGRAMMING
LOGIC
STACK
POINTER
SRAM
GENERAL
PURPOSE
REGISTERS
X
Y
Z
ALU
STATUS
REGISTER
ISP INTERFACE
8-BIT DATA BUS
INTERNAL
OSCILLATOR
WATCHDOG
TIMER
MCU CONTROL
REGISTER
MCU STATUS
REGISTER
TIMER/
COUNTER0
TIMER/
COUNTER1
UNIVERSAL
SERIAL
INTERFACE
INTERRUPT
UNIT
EEPROM
INTERNAL
CALIBRATED
OSCILLATOR
TIMING AND
CONTROL
OSCILLATORS
+
-
ANALOG
DATA REGISTER
PORT A
COMPARATOR
DATA DIR.
REG.PORT A
PORT A DRIVERS
PA0-PA7
ADC
DATA REGISTER
PORT B
PORT B DRIVERS
PB0-PB7
DATA DIR.
REG.PORT B
2
ATtiny26(L)
1477IS–AVR–10/06
ATtiny26(L)
Pin Descriptions
VCCDigital supply voltage pin.
GNDDigital ground pin.
AVCCAVCC is the supply voltage pin for Port A and the A/D Converter (ADC). It should be
externally connected to V
connected to V
ADC.
Port A (PA7..PA0)Port A is an 8-bit general purpose I/O port. PA7..PA0 are all I/O pins that can provide
internal pull-ups (selected for each bit). Port A has alternate functions as analog inputs
for the ADC and analog comparator and pin change interrupt as described in “Alternate
Port Functions” on page 48.
Port B (PB7..PB0)Port B is an 8-bit general purpose I/O port. PB6..0 are all I/O pins that can provide inter-
nal pull-ups (selected for each bit). PB7 is an I/O pin if not used as the reset. To use pin
PB7 as an I/O pin, instead of RESET pin, program (“0”) RSTDISBL Fuse. Port B has
alternate functions for the ADC, clocking, timer counters, USI, SPI programming, and
pin change interrupt as described in “Alternate Port Functions” on page 48.
through a low-pass filter. See page 96 for details on operating of the
CC
, even if the ADC is not used. If the ADC is used, it should be
CC
An External Reset is generated by a low level on the PB7/RESET
longer than 50 ns will generate a reset, even if the clock is not running. Shorter pulses
are not guaranteed to generate a reset.
XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2Output from the inverting oscillator amplifier.
pin. Reset pulses
1477IS–AVR–10/06
3
Resources A comprehensive set of development tools, application notes and datasheets are avail-
able for download on http://www.atmel.com/avr.
2
ATtiny26(L)
1477IS–AVR–10/06
ATtiny26(L)
About Code
Examples
This datasheet contains simple code examples that briefly show how to use various
parts of the device. These code examples assume that the part specific header file is
included before compilation. Be aware that not all C compiler vendors include bit definitions in the header files and interrupt handling in C is compiler dependent. Please
confirm with the C compiler documentation for more details.
Notes:1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information
and minimum quantities.
2. Pb-free packaging alternative, complies to the European Directive for Restriction of Hazardous Substances (RoHS directive). Also Halide free and fully Green.
Note: JEDEC Standard MO-220, Fig. 2 (Anvil Singulation), VHHD-2.
0
SIDE VIEW
A3
A1
0.08
SYMBOL
A 0.80 0.90 1.00
A1 – 0.02 0.05
A2 – 0.65 1.00
A3 0.20 REF
b 0.180.230.30
D
D1
D2 2.953.103.25
E
E1
E2 2.953.103.25
e 0.50 BSC
L 0.30 0.40 0.50
P – – 0.60
– – 12o
0
COMMON DIMENSIONS
C
K0.20––
(Unit of Measure = mm)
MIN
4.905.005.10
4.704.754.80
4.905.005.10
4.704.754.80
NOM
MAX
NOTE
5/25/06
2325 Orchard Parkway
R
San Jose, CA 95131
2
ATtiny26(L)
TITLE
32M1-A, 32-pad, 5 x 5 x 1.0 mm Body, Lead Pitch 0.50 mm,
3.10 mm Exposed Pad, Micro Lead Frame Package (MLF)
DRAWING NO.
32M1-A
1477IS–AVR–10/06
REV.
E
ErrataThe revision letter refers to the revision of the device.
ATtiny26 Rev. B/C/D• First Analog Comparator conversion may be delayed
1.First Analog Comparator conversion may be delayed
If the device is powered by a slow rising VCC, the first Analog Comparator conversion will take longer than expected on some devices.
Problem Fix/Workaround
When the device has been powered or reset, disable then enable the Analog Comparator before the first conversion.
ATtiny26(L)
1477IS–AVR–10/06
3
Datasheet Revision
History
Please note that the referring page numbers in this section are referred to this document. The referring revision in this section are referring to the document revision.
Rev. 1477I-10/061. Updated “Errata” on page 15
Rev. 1477H-04/061. Updated typos.
2. Added “Resources” on page 6.
3. Updated features in “System Control and Reset” on page 33.
4. Updated “Prescaling and Conversion Timing” on page 98.
5. Updated algorithm for “Enter Programming Mode” on page 114.
Rev. 1477G-03/051. MLF-package alternative changed to “Quad Flat No-Lead/Micro Lead Frame
Package QFN/MLF”.
2. Updated “Electrical Characteristics” on page 128
3. Updated “Ordering Information” on page 11
Rev. 1477F-12/041.Updated Table 16 on page 34, Table 9 on page 29, and Table 29 on page 59.
2. Added Table 20 on page 41.
3. Added “Changing Channel or Reference Selection” on page 100.
4. Updated “Offset Compensation Schemes” on page 107.
5. Updated “Electrical Characteristics” on page 128.
6. Updated package information for “20P3” on page 12.
7. Rearranged some sections in the datasheet.
Rev. 1477E-10/031.Removed Preliminary references.
2. Updated “Features” on page 1.
3. Removed SSOP package reference from “Pin Configuration” on page 2.
4. Updated V
5.Updated “Calibrated Internal RC Oscillator” on page 30.
6. Updated DC Characteristics for V
trical Characteristics” on page 128.
RST
and t
in Table 16 on page 34.
RST
, IIL, IIH, I
OL
Power Down and
CC
VACIO
in “Elec-
7. Updated V
page 132. Fixed typo in “Absolute Accuracy” on page 132.
2
ATtiny26(L)
, INL and Gain Error in “ADC Characteristics” on page 131 and
INT
1477IS–AVR–10/06
8. Added Figure 106 in “Pin Driver Strength” on page 148, Figure 120, Figure 121
and Figure 122 in “BOD Thresholds and Analog Comparator Offset” on page
157. Updated Figure 117 and Figure 118.
9. Removed LPM Rd, Z+ from “Instruction Set Summary” on page 9. This
instruction is not supported in ATtiny26.
Rev. 1477D-05/031. Updated “Packaging Information” on page 12.
2. Removed ADHSM from “ADC Characteristics” on page 131.
3. Added section “EEPROM Write During Power-down Sleep Mode” on page 21.
4. Added section “Default Clock Source” on page 27.
5. Corrected PLL Lock value in the “Bit 0 – PLOCK: PLL Lock Detector” on page
76.
6. Added information about conversion time when selecting differential channels on page 99.
ATtiny26(L)
7. Corrected {DDxn, PORTxn} value on page 45.
8. Added section “Unconnected Pins” on page 48.
9. Added note for RSTDISBL Fuse in Table 50 on page 110.
10. Corrected DATA value in Figure 61 on page 118.
11. Added WD_FUSE period in Table 60 on page 125.
12. Updated “ADC Characteristics” on page 131 and added Table 66, “ADC Characteristics, Differential Channels, TA = -40×C to 85×C,” on page 132.
13. Updated “ATtiny26 Typical Characteristics” on page 133.
14. Added LPM Rd, Z and LPM Rd, Z+ in “Instruction Set Summary” on page 9.
Rev. 1477C-09/021. Changed the Endurance on the Flash to 10,000 Write/Erase Cycles.
Rev. 1477B-04/021.Removed all references to Power Save sleep mode in the section “System
Clock and Clock Options” on page 24.
2. Updated the section “Analog to Digital Converter” on page 96 with more
details on how to read the conversion result for both differential and singleended conversion.
3. Updated “Ordering Information” on page 11 and added QFN/MLF package
information.
Rev. 1477A-03/021. Initial version.
1477IS–AVR–10/06
3
Atmel CorporationAtmel Operations
Atmel CorporationAtmel Operations
2325 Orchard Parkway
2325 Orchard Parkway
San Jose, CA 95131, USA
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Fax: 1(408) 487-2600
Regional Headquarters
Regional Headquarters
Europe
Europe
Atmel Sarl
Atmel Sarl
Route des Arsenaux 41
Route des Arsenaux 41
Case Postale 80
Case Postale 80
CH-1705 Fribourg
CH-1705 Fribourg
Switzerland
Switzerland
Tel: (41) 26-426-5555
Tel: (41) 26-426-5555
Fax: (41) 26-426-5500
Fax: (41) 26-426-5500
Asia
Asia
Room 1219
Room 1219
Chinachem Golden Plaza
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
77 Mody Road Tsimshatsui
East Kowloon
East Kowloon
Hong Kong
Hong Kong
Tel: (852) 2721-9778
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Fax: (852) 2722-1369
Japan
Japan
9F, Tonetsu Shinkawa Bldg.
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Chuo-ku, Tokyo 104-0033
Japan
Japan
Tel: (81) 3-3523-3551
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Fax: (81) 3-3523-7581
Memory
Memory
2325 Orchard Parkway
2325 Orchard Parkway
San Jose, CA 95131, USA
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
Fax: 1(408) 436-4314
Microcontrollers
Microcontrollers
2325 Orchard Parkway
2325 Orchard Parkway
San Jose, CA 95131, USA
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
Fax: 1(408) 436-4314
La Chantrerie
La Chantrerie
BP 70602
BP 70602
44306 Nantes Cedex 3, France
44306 Nantes Cedex 3, France
Tel: (33) 2-40-18-18-18
Tel: (33) 2-40-18-18-18
Fax: (33) 2-40-18-19-60
Fax: (33) 2-40-18-19-60
ASIC/ASSP/Smart Cards
ASIC/ASSP/Smart Cards
Zone Industrielle
Zone Industrielle
13106 Rousset Cedex, France
13106 Rousset Cedex, France
Tel: (33) 4-42-53-60-00
Tel: (33) 4-42-53-60-00
Fax: (33) 4-42-53-60-01
Fax: (33) 4-42-53-60-01
1150 East Cheyenne Mtn. Blvd.
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906, USA
Colorado Springs, CO 80906, USA
Tel: 1(719) 576-3300
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Fax: 1(719) 540-1759
Scottish Enterprise Technology Park
Scottish Enterprise Technology Park
Maxwell Building
Maxwell Building
East Kilbride G75 0QR, Scotland
East Kilbride G75 0QR, Scotland
Tel: (44) 1355-803-000
Tel: (44) 1355-803-000
Fax: (44) 1355-242-743
Fax: (44) 1355-242-743
RF/Automotive
RF/Automotive
Theresienstrasse 2
Theresienstrasse 2
Postfach 3535
Postfach 3535
74025 Heilbronn, Germany
74025 Heilbronn, Germany
Tel: (49) 71-31-67-0
Tel: (49) 71-31-67-0
Fax: (49) 71-31-67-2340
Fax: (49) 71-31-67-2340
1150 East Cheyenne Mtn. Blvd.
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906, USA
Colorado Springs, CO 80906, USA
Tel: 1(719) 576-3300
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Fax: 1(719) 540-1759
Biometrics/Imaging/Hi-Rel MPU/
Biometrics/Imaging/Hi-Rel MPU/
High Speed Converters/RF Datacom
High Speed Converters/RF Datacom
Avenue de Rochepleine
Avenue de Rochepleine
BP 123
BP 123
38521 Saint-Egreve Cedex, France
38521 Saint-Egreve Cedex, France
Tel: (33) 4-76-58-30-00
Tel: (33) 4-76-58-30-00
Fax: (33) 4-76-58-34-80
Fax: (33) 4-76-58-34-80
Literature Requests
Literature Requests
www.atmel.com/literature
www.atmel.com/literature
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any
intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI-
intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI-
TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDEN-
PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT
TAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT
OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications
and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Atmel’s products are not
and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Atmel’s products are not
intended, authorized, or warranted for use as components in applications intended to support or sustain life.
intended, authorized, or warranted for use as components in applications intended to support or sustain life.