Atmel 8-bit AVR Microcontroller with 512/1024 Bytes In-System
Programmable Flash
ATtiny4 / ATtiny5 / ATtiny9 / ATiny10
DATASHEET SUMMARY
Introduction
The Atmel® ATtiny4/5/9/10 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 ATtiny4/5/9/10 achieves throughputs
close to 1 MIPS per MHz. This empowers system designer to optimize the
device for power consumption versus processing speed.
Feature
•High Performance, Low Power AVR® 8-Bit Microcontroller
•Advanced RISC Architecture
–54 Powerful Instructions
–Most Single Clock Cycle Execution
–16 x 8 General Purpose Working Registers
–Fully Static Operation
–Up to 12 MIPS Throughput at 12 MHz
•Non-volatile Program and Data Memories
–512/1024 Bytes of In-System Programmable Flash Program
Memory
–32 Bytes Internal SRAM
–Flash Write/Erase Cycles: 10,000
–Data Retention: 20 Years at 85°C / 100 Years at 25°C
•Peripheral Features
–QTouch® Library Support for Capacitive Touch Sensing (1
Channel)
–One 16-bit Timer/Counter with Prescaler and Two PWM
Channels
–Programmable Watchdog Timer with Separate On-chip Oscillator
–4-channel, 8-bit Analog to Digital Converter (ATtiny5/10, only)
This is a 4-bit, bi-directional I/O port with internal pull-up resistors, individually selectable for each bit. The
output buffers have symmetrical drive characteristics, with both high sink and source capability. As inputs,
the port pins that are externally pulled low will source current if pull-up resistors are activated. Port pins
are tri-stated when a reset condition becomes active, even if the clock is not running.
Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if
the clock is not running and provided the reset pin has not been disabled. The minimum pulse length is
given in System and Reset Characteristics of Electrical Characteristics. Shorter pulses are not
guaranteed to generate a reset.
The reset pin can also be used as a (weak) I/O pin.
1.For speed vs. supply voltage, see section Speed.
2.All packages are Pb-free, halide-free and fully green and they comply with the European directive
for Restriction of Hazardous Substances (RoHS). NiPdAu finish.
3.Tape and reel.
4.Can also be supplied in wafer form. Contact your local sales office for ordering information and
minimum quantities.
5.Marking details:
–Top mark 1st line: ddddTY
–Top mark 2nd line: wwxxx
dddd= device, special code
T= Type
Y= Year last digit
ww= calendar workweek
xxx = trace code
6.Not recommended for new designs.TPUBSTINY-216
7.Top/bottom markings:
–Top: T4x, where x = die revision
–Bottom: zHzzz or z8zzz, where H = (-40°C to 85°C), and 8 = (-40°C to 125°C)
8.For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10
Specification at 125°C.
Table 2-1. Package Type
6ST16-lead, 2.90 x 1.60 mm Plastic Small Outline Package (SOT23)
8MA48-pad, 2 x 2 x 0.6 mm Plastic Ultra Thin Dual Flat No Lead (UDFN)
1.For speed vs. supply voltage, see section Speed.
2.All packages are Pb-free, halide-free and fully green and they comply with the European directive
for Restriction of Hazardous Substances (RoHS). NiPdAu finish.
3.Tape and reel.
4.Can also be supplied in wafer form. Contact your local sales office for ordering information and
minimum quantities.
5.Marking details:
–Top mark 1st line: ddddTY
–Top mark 2nd line: wwxxx
dddd= device, special code
T= Type
Y= Year last digit
ww= calendar workweek
xxx = trace code
6.Not recommended for new designs.TPUBSTINY-216
7.Top/bottomside markings:
–Top: T5x, where x = die revision
–Bottom: zHzzz or z8zzz, where H = (-40°C to 85°C), and 8 = (-40°C to 125°C)
8.For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10
Specification at 125°C.
Table 2-2. Package Type
6ST16-lead, 2.90 x 1.60 mm Plastic Small Outline Package (SOT23)
8MA48-pad, 2 x 2 x 0.6 mm Plastic Ultra Thin Dual Flat No Lead (UDFN)
1.For speed vs. supply voltage, see section Speed.
2.All packages are Pb-free, halide-free and fully green and they comply with the European directive
for Restriction of Hazardous Substances (RoHS). NiPdAu finish.
3.Tape and reel.
4.Can also be supplied in wafer form. Contact your local sales office for ordering information and
minimum quantities.
5.Marking details:
–Top mark 1st line: ddddTY
–Top mark 2nd line: wwxxx
dddd= device, special code
T= Type
Y= Year last digit
ww= calendar workweek
xxx = trace code
6.Not recommended for new designs.TPUBSTINY-216
7.Top/bottomside markings:
–Top: T9x, where x = die revision
–Bottom: zHzzz or z8zzz, where H = (-40°C to 85°C), and 8 = (-40°C to 125°C)
8.For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10
Specification at 125°C.
Table 2-3. Package Type
6ST16-lead, 2.90 x 1.60 mm Plastic Small Outline Package (SOT23)
8MA48-pad, 2 x 2 x 0.6 mm Plastic Ultra Thin Dual Flat No Lead (UDFN)
1.For speed vs. supply voltage, see section Speed.
2.All packages are Pb-free, halide-free and fully green and they comply with the European directive
for Restriction of Hazardous Substances (RoHS). NiPdAu finish.
3.Tape and reel.
4.Can also be supplied in wafer form. Contact your local sales office for ordering information and
minimum quantities.
5.Marking details:
–Top mark 1st line: ddddTY
–Top mark 2nd line: wwxxx
dddd= device, special code
T= Type
Y= Year last digit
ww= calendar workweek
xxx = trace code
6.Not recommended for new designs.TPUBSTINY-216
7.Top/bottomside markings:
–Top: T10x, where x = die revision
–Bottom: zHzzz or z8zzz, where H = (-40°C to 85°C), and 8 = (-40°C to 125°C)
8.For typical and Electrical characteristics for this device please consult Appendix A, ATtiny4/5/9/10
Specification at 125°C.
Table 2-4. Package Type
6ST16-lead, 2.90 x 1.60 mm Plastic Small Outline Package (SOT23)
8MA48-pad, 2 x 2 x 0.6 mm Plastic Ultra Thin Dual Flat No Lead (UDFN)
This device is low-power CMOS 8-bit microcontrollers based on the compact AVR enhanced RISC
architecture. By executing powerful instructions in a single clock cycle, the device achieve throughputs
approaching 1 MIPS per MHz, allowing the system designer to optimize power consumption versus
processing speed.
3.1. Block Diagram
Figure 3-1. Block Diagram
SRAM
Vcc
RESET
GND
3.1.1. Description
The AVR core combines a rich instruction set with 16 general purpose working registers and system
registers. All 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 compact and code efficient while achieving throughputs up to ten times faster than conventional CISC
microcontrollers.
Clock generation
8MHz Calib Osc
External clock
128 kHz Internal Osc
Power
Supervision
POR & RESET
Power
management
and clock
control
Watchdog
Timer
Internal
Reference
CPU
D
A
T
A
B
U
S
I/O
PORTS
Interrupt
ADC
AC
TC 0
(16-bit)
FLASH
PB[3:0]
PCINT[3:0]
INT0
ADC[7:0]
Vcc
AIN0
AIN1
ACO
ADCMUX
OC0A/B
T0
ICP0
This device provides the following features: 512/1024 byte of In-System Programmable Flash, 32 bytes of
SRAM, four general purpose I/O lines, 16 general purpose working registers, a 16-bit timer/counter with
two PWM channels, internal and external interrupts, a programmable watchdog timer with internal
oscillator, an internal calibrated oscillator, and four software selectable power saving modes. ATtiny5/10
are also equipped with a four-channel and 8-bit Analog to Digital Converter (ADC).
Idle mode stops the CPU while allowing the SRAM, timer/counter, ADC (ATtiny5/10, only), analog
comparator, and interrupt system to continue functioning. ADC Noise Reduction mode minimizes
switching noise during ADC conversions by stopping the CPU and all I/O modules except the ADC. In
Power-down mode registers keep their contents and all chip functions are disabled until the next interrupt
or hardware reset. In Standby mode, the oscillator is running while the rest of the device is sleeping,
allowing very fast start-up combined with low power consumption.
The device is manufactured using Atmel’s high density Non-Volatile Memory (NVM) technology. The onchip, in-system programmable Flash allows program memory to be re-programmed in-system by a
conventional, non-volatile memory programmer.
The ATtiny4/5/9/10AVR are supported by a suite of program and system development tools, including
macro assemblers and evaluation kits.
3.2. Comparison of ATtiny4, ATtiny5, ATtiny9 and ATtiny10
A comparison of the devices is shown in the table below.
Table 3-1. Differences between ATtiny4, ATtiny5, ATtiny9 and ATtiny10
A comprehensive set of development tools, application notes, and datasheets are available for download
on http://www.atmel.com/avr.
4.2. Data Retention
Reliability Qualification results show that the projected data retention failure rate is much less than 1 PPM
over 20 years at 85°C or 100 years at 25°C.
4.3. About Code Examples
This documentation 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. Confirm with the C compiler documentation for more details.
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI” instructions
must be replaced with instructions that allow access to extended I/O. Typically “LDS” and “STS”
combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.
4.4. Capacitive Touch Sensing
4.4.1. QTouch Library
The Atmel® QTouch® Library provides a simple to use solution to realize touch sensitive interfaces on
most Atmel AVR® microcontrollers. The QTouch Library includes support for the Atmel QTouch and Atmel
QMatrix® acquisition methods.
Touch sensing can be added to any application by linking the appropriate Atmel QTouch Library for the
AVR Microcontroller. This is done by using a simple set of APIs to define the touch channels and sensors,
and then calling the touch sensing API’s to retrieve the channel information and determine the touch
sensor states.
The QTouch Library is FREE and downloadable from the Atmel website at the following location: http://
www.atmel.com/technologies/touch/. For implementation details and other information, refer to the Atmel
QTouch Library User Guide - also available for download from the Atmel website.
6S T1, 6-lead, 2.90 x 1.60 mm Plastic Sm all Outline
Package (SOT23)
MAX
NOTE
SYMBOL
MIN
NOM
COMMON DIMENSIONS
(Unit of Mea s ure = mm)
A – – 1 .45
A1 0 – 0.1 5
A2 0.90 – 1 .30
D 2.80 2 .90 3.0 0 2
E 2 .6 0 2.8 0 3.00
E1 1.50 1.60 1 .7 5
L 0 .3 0 0.4 5 0.55
e 0.9 5 BS C
b 0.30 – 0.50 3
c 0 .09 – 0 .2 0
θ0° – 8°
Notes: 1. Th is package is compliant with JEDEC spe cif cation MO-178 Variation AB
2. Dimen sion D doe s not include mo ld Flash, protrusions or ga te burrs.
Mold Flash , protrustion or ga te burrs shall not exceed 0.25 mm per en d.
3. Dimen sion b doe s no t includ e dambar protrusion . Allowab le damb ar
protrusion sha ll no t cau se the lead widt h to excee d the maximum
b dimen sion by more than 0.08 mm
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
6.1.2. Rev. D
• ESD HBM (ESD STM 5.1) level ±1000V
• Programming Lock Bits
1. ESD HBM (ESD STM 5.1) level ±1000V
The device meets ESD HBM (ESD STM 5.1) level ±1000V.
Problem Fix / Workaround
Always use proper ESD protection measures (Class 1C) when handling integrated circuits before and
during assembly.
2. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
6.1.3. Rev. A – C
Not sampled.
6.2. ATtiny5
6.2.1. Rev. E
• Programming Lock Bits
1. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
The device meets ESD HBM (ESD STM 5.1) level ±1000V.
Problem Fix / Workaround
Always use proper ESD protection measures (Class 1C) when handling integrated circuits before and
during assembly.
2. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
6.2.3. Rev. A – C
Not sampled.
6.3. ATtiny9
6.3.1. Rev. E
• Programming Lock Bits
1. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
6.3.2. Rev. D
• ESD HBM (ESD STM 5.1) level ±1000V
• Programming Lock Bits
1. ESD HBM (ESD STM 5.1) level ±1000V
The device meets ESD HBM (ESD STM 5.1) level ±1000V.
Problem Fix / Workaround
Always use proper ESD protection measures (Class 1C) when handling integrated circuits before and
during assembly.
2. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
6.4.2. Rev. C – D
• ESD HBM (ESD STM 5.1) level ±1000V
• Programming Lock Bits
1. ESD HBM (ESD STM 5.1) level ±1000V
The device meets ESD HBM (ESD STM 5.1) level ±1000V.
Problem Fix / Workaround
Always use proper ESD protection measures (Class 1C) when handling integrated circuits before and
during assembly.
2. Programming Lock Bits
Programming Lock Bits to a lock mode equal or lower than the current causes one word of Flash to be
corrupted. The location of the corruption is random.
Problem Fix / Workaround
When programming Lock Bits, make sure lock mode is not set to present, or lower levels.
Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, AVR® and others are registered trademarks or trademarks of Atmel Corporation in
U.S. and other countries. Other terms and product names may be trademarks of others.
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 THE ATMEL TERMS AND
CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, 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 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 AND 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 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 products descriptions at any time without notice. Atmel does not make any commitment to
update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive
applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.
SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any
applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without
an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the
operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments
unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically
designated by Atmel as automotive-grade.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.