– 120 Powe rful Instructions – Most Single Clock Cy cle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
• Non-Volatile Program and Data Memories
– 2/4/8K Bytes of In-System Programmable Program Memory Flash
• Endurance: 10,000 Write/Erase Cycles
– 128/256/512 Bytes of In-System Programmable EEPROM
• Endurance: 100,000 Write/Erase Cycles
– 128/256/512 Bytes of Internal SRAM
– Data retention: 20 years at 85°C / 100 years at 25°C
– Programming Lock for Self-Programming Flash & EEPROM Data Security
• Peripheral Features
– One 8-Bit and One 16-Bit Timer/Counter with Two PWM Channels, Each
– 10-bit ADC
• 8 Single-Ended Channels
• 12 Differential ADC Channel Pairs with Programmable Gain (1x / 20x)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-Chip Analog Comparator
– Universal Serial Interface
• Special Microcontroller Features
– debugWIRE On-chip Debug System
– In-System Programmable via SPI Port
– Internal and External Interrupt Sources: Pin Change Interrupt on 12 Pins
– Low Power Idle, ADC Noise Reduction, Standby and Power-Do wn Modes
– Enhanced Power-on Reset Circuit
– Programmable Brown-Out Detection Circuit
– Internal Calibrated Oscillator
– On-Chip Temperat ure Sensor
• I/O and Pac kages
– Available in 20-Pin QFN/MLF & 14-Pin SOIC and PDIP
– Twelve Programmable I/O Lines
• Operating Voltage:
– 1.8 – 5.5V for ATtiny24V/44V/84V
– 2.7 – 5.5V for ATtiny24/44/84
• Speed Grade
– ATtiny24V/44V/84V
• 0 – 4 MHz @ 1.8 – 5.5V
• 0 – 10 MHz @ 2.7 – 5.5V
– ATtiny24/44/84
• 0 – 10 MHz @ 2.7 – 5.5V
• 0 – 20 MHz @ 4.5 – 5.5V
• Industrial Temperature Range: -40°C to +85°C
• Low Power Consumption
– Active Mode (1 MHz System Clock): 300 µA @ 1.8V
– Power-down Mode: 0.1 µA @ 1.8V
®
8-Bit Microcontroller
8-bit
Microcontroller
with 2/4/8K
Bytes In-System
Programmable
Flash
Port B is a 4-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability except PB3 which has the RESET
RESET pin, program (‘0’) RSTDISBL fuse. As inputs, Port B pins that are externally pulled low
will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the cloc k is not ru nn in g.
capability. To use pin PB3 as an I/O pin, instead of
8006GS–AVR–01/08
Port B also serves the functions of various special features.
1.1.4RESET
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. Shorter
pulses are not guaranteed to generate a reset.
The reset pin can also be used as a (weak) I/O pin.
1.1.5Port A (PA7...PA0)
Port A is a 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port A output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port A pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port A pins are tri-stated when a reset co ndition becomes active,
even if the clock is not running.
Port A has alternate functions as analog inputs for the ADC, analog comparator, timer/counter,
SPI and pin change interrupt.
ATtiny24/44/84
8006GS–AVR–01/08
3
ATtiny24/44/84
2.Overview
The ATtiny24/44/84 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 ATt iny24/ 44/ 84
achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize
power consumption versus processing speed.
Figure 2-1.Block Diagram
VCC
GND
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 DATABUS
INTERNAL
OSCILLATOR
WATCHDOG
TIMER
MCU CONTROL
REGISTER
MCU STATUS
REGISTER
TIMER/
COUNTER0
TIMER/
COUNTER1
INTERRUPT
UNIT
EEPROM
INTERNAL
CALIBRATED
OSCILLATOR
TIMING AND
CONTROL
OSCILLATORS
4
DATA REGISTER
+
-
PORT A
ANALOG
COMPARATOR
PORT A DRIVERS
PA7-PA0
DATA DIR.
REG.PORT A
ADC
DATA REGISTER
PORT B
PORT B DRIVERS
PB3-PB0
DATA DIR.
REG.PORT B
The AVR core combines a rich instruction set with 32 general purpose working registers. All 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.
8006GS–AVR–01/08
ATtiny24/44/84
The ATtiny24/44/84 provides the following features: 2/4/8K byte of In-System Programmable
Flash, 128/256/512 bytes EEPROM, 128/256/512 bytes SRAM, 12 general purpose I/ O lines, 32
general purpose working registers, a 8-bit Timer/Counter with two PWM channels, a 16-bit
timer/counter with two PWM channels, Internal and External Interrupts, a 8-channel 10-bit ADC,
programmable gain stage (1x, 20x) for 12 differential ADC channel pairs, a programmable
Watchdog Timer with internal Oscillator, internal calibrated oscillator, and four software selectable power saving modes. Idle mode stops the CPU while allowing the SRAM, Timer/Counter,
ADC, 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 disbaled until the next interrupt or hardware reset. In Standby mode, the crystal/resonator
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 no n-volat ile mem ory tech nology. The onchip ISP Flash allows the Program memory to be re-programmed in-system through an SPI
serial interface, by a conventional non-volatile memory programmer or by an on-chip boot code
running on the AVR core.
The ATtiny24/44/84 AVR is supported with a full suite of pr ogram and system d evelopment tools
including: C Compilers, Macro Assemblers, Program Debugger/Simulators and Evaluation kits.
8006GS–AVR–01/08
5
ATtiny24/44/84
3.About
3.1Resources
A comprehensive set of drivers, application notes, data sheet s and descr iption s on development
tools are available for download at http://www.atmel.com/avr.
3.2Code Examples
This documentation contains simple code examples t hat brief ly show h ow to us e various parts of
the device. These code examples assume that the part specific header file is included b efore
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 con firm wit h the C com piler d ocume ntation for more details.
For I/O Registers located in the 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, this
means “LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”. Note that not all
AVR devices include an extended I/O map.
3.3Data Retention
3.4Disclaimer
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.
Typical values contained in this datasheet are based on simulations and characterization of
other AVR microcontrollers manufactured o n th e same proce ss te ch nolo gy. Min a nd Ma x valu es
will be available after the device is characterized.
Note:1. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addresses
should never be written.
2. I/O Registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these
registers, the value of single bits can be checked by using the SBIS and SBIC instructions.
3. Some of the Status Flags are cleared by writing a logical one to them. Note that, unlike most other AVRs, the CBI and SBI
instructions will only operation the specified bit, and can therefore be used on registers containing such Status Flags. The
CBI and SBI instructions work with registers 0x00 to 0x1F only.
8
8006GS–AVR–01/08
ATtiny24/44/84
5.Instruction Set Summary
MnemonicsOperandsDescriptionOperationFlags#Clocks
ARITHMETIC AND LOGIC INSTRUCTIONS
ADDRd, RrAdd two RegistersRd ← Rd + RrZ,C,N,V,H1
ADCRd, RrAdd with Carry two RegistersRd ← Rd + Rr + CZ,C,N,V,H1
ADIWRdl,KAdd Immediate to WordRd h:Rdl ← Rdh:Rdl + KZ,C,N,V,S2
SUBRd, RrSubtract two RegistersRd ← Rd - RrZ,C,N,V,H1
SUBIRd, KSubtract Constant from Register Rd ← Rd - KZ,C,N,V,H1
SBCRd, RrSubtract with Carry two RegistersRd ← Rd - Rr - CZ,C,N,V,H1
SBCIRd, KSubtract with Carry Constant from Reg.Rd ← Rd - K - CZ,C,N,V,H1
SBIWRdl,KSubtract Immediate from WordRdh:Rdl ← Rdh:Rdl - KZ,C,N,V,S2
ANDRd, RrLogical AND RegistersRd ← Rd • RrZ,N,V1
ANDIRd, KLogical AND Register and ConstantRd ← Rd • KZ,N,V1
ORRd, RrLogical OR RegistersRd ← Rd v RrZ,N,V1
ORIRd, KLogical OR Register and ConstantRd ← Rd v KZ,N,V1
EORRd, RrExclusive OR RegistersRd ← Rd ⊕ RrZ,N,V1
COMRdOne’s ComplementRd ← 0xFF − RdZ,C,N,V1
NEGRdTwo’s ComplementRd ← 0x00 − RdZ,C,N,V,H1
SBRRd,KSet Bit(s) in RegisterRd ← Rd v KZ,N,V1
CBRRd,KClear Bit(s) in RegisterRd ← Rd • (0xFF - K)Z,N,V1
INCRdIncrementRd ← Rd + 1Z,N,V1
DECRdDecrementRd ← Rd − 1 Z,N,V1
TSTRdTest for Zero or MinusRd ← Rd • Rd Z,N,V1
CLRRdClear RegisterRd ← Rd ⊕ RdZ,N,V1
SERRdSet RegisterRd ← 0xFFNone1
BRANCH INSTRUCTIONS
RJMPkRelative JumpPC ← PC + k + 1None2
IJMPIndirect Jump to (Z)PC ← Z None2
RCALLkRelative Subroutine Call PC ← PC + k + 1None3
ICALLIndirect Call to (Z)PC ← ZNone3
RETSubroutine ReturnPC ← STACKNone4
RETIInterrupt ReturnPC ← STACKI4
CPSERd,RrCompare, Skip if Equalif (Rd = Rr) PC ← PC + 2 or 3None1/2/3
CPRd,RrCompareRd − RrZ, N,V,C,H1
CPCRd,RrCompare with CarryRd − Rr − CZ, N,V,C,H1
CPIRd,KCompare Register with ImmediateRd − KZ, N,V,C,H1
SBRCRr, bSkip if Bit in Register Clearedif (Rr(b)=0) PC ← PC + 2 or 3 None1/2/3
SBRSRr, bSkip if Bit in Register is Setif (Rr(b)=1) PC ← PC + 2 or 3None1/2/3
SBICP, bSkip if Bit in I/O Register Clearedif (P(b)=0) PC ← PC + 2 or 3 None1/2/3
SBISP, bSkip if Bit in I/O Register is Setif (P(b)=1) PC ← PC + 2 or 3None1/2/3
BRBSs, kBranch if Status Flag Setif (SREG(s) = 1) then PC←PC+k + 1None1/2
BRBCs, kBranch if Status Flag Clearedif (SREG(s) = 0) then PC←PC+k + 1None1/2
BREQ kBranch if Equal if (Z = 1) then PC ← PC + k + 1None1/2
BRNE kBranch if Not Equalif (Z = 0) then PC ← PC + k + 1None1/2
BRCS kBranch if Carry Setif (C = 1) then PC ← PC + k + 1None1/2
BRCC kBranch if Carry Clearedif (C = 0) then PC ← PC + k + 1None1/2
BRSH kBranch if Same or Higher if (C = 0) then PC ← PC + k + 1None1/2
BRLO kBranch if Lowerif (C = 1) then PC ← PC + k + 1Non e1/2
BRMI kBranch if Minusif (N = 1) then PC ← PC + k + 1None1 /2
BRPL kBranch if Plus if (N = 0) then PC ← PC + k + 1None1/2
BRGE kBranch if Greater or Equal, Signedif (N ⊕ V= 0) then PC ← PC + k + 1None1/2
BRLT kBranch if Less Than Zero, Signedif (N ⊕ V= 1) then PC ← PC + k + 1None1/2
BRHS kBranch if Half Carry Flag Setif (H = 1) then PC ← PC + k + 1None1/2
BRHC kBranch if Half Carry Flag Clearedif (H = 0) then PC ← PC + k + 1None1/2
BRTS kBranch if T Flag Setif (T = 1) then PC ← PC + k + 1None1/2
BRTC kBranch if T Flag Clearedif (T = 0) then PC ← PC + k + 1None1/2
BRVS kBranch if Overflow Flag is Setif (V = 1) then PC ← PC + k + 1None1/2
BRVC kBranch if Overflow Flag is Clearedif (V = 0) then PC ← PC + k + 1None1/2
BRIE kBranch if Interrupt Enabledif ( I = 1) then PC ← PC + k + 1None1/2
BRID kBranch if Interrupt Disabledif ( I = 0) then PC ← PC + k + 1None1/2
BIT AND BIT-TEST INSTRUCTIONS
SBIP,bSet Bit in I/O RegisterI/O(P,b) ← 1None2
CBIP,bClear Bit in I/O RegisterI/O(P,b) ← 0None2
LSLRdLogical Shift LeftRd(n+1) ← Rd(n), Rd(0)
LSRRdLogical Shift RightRd(n) ← Rd(n+1), Rd(7) ← 0Z,C,N,V1
ROLRdRotate Left Through CarryRd(0)←C,Rd(n+1)← Rd(n),C←Rd(7)Z,C,N,V1
← 0Z,C,N,V1
8006GS–AVR–01/08
9
ATtiny24/44/84
MnemonicsOperandsDescriptionOperationFlags#Clocks
RORRdRo ta te Right Through CarryRd(7)←C,Rd(n)← Rd(n+1),C←Rd(0)Z,C,N,V1
ASRRdArithmetic Shift RightRd(n) ← Rd(n+1), n=0..6Z,C,N,V1
SWAPRdSwap NibblesRd(3..0)←Rd(7..4),Rd(7..4)←Rd(3..0)None1
BSETsFlag SetSREG(s) ← 1SREG(s)1
BCLRsFlag ClearSREG(s) ← 0 SREG(s)1
BSTRr, bBit Store from Register to TT ← Rr(b)T1
BLDRd, bBit load from T to RegisterRd(b) ← TNone1
SECSet CarryC ← 1C1
CLCClear CarryC ← 0 C1
SENSet Negative FlagN ← 1N1
CLNClear Negative FlagN ← 0 N1
SEZSet Zero FlagZ ← 1Z1
CLZClear Zero FlagZ ← 0 Z1
SEIGlobal Interrupt EnableI ← 1I1
CLIGlobal Interrupt DisableI ← 0 I1
SESSet Signed Test FlagS ← 1S1
CLSClear Signed Test FlagS ← 0 S1
SEVSet Twos Complement Overflow.V ← 1V1
CLVClear Twos Complement OverflowV ← 0 V1
SETSet T in SREGT ← 1T1
CLTClear T in SREGT ← 0 T1
SEHSet Half Carry Flag in SREGH ← 1H1
CLHClear Half Carry Flag in SREGH ← 0 H
DATA TRANSFER INSTRUCTIONS
MOVRd, RrMove Between RegistersRd ← RrNone1
MOVWRd, RrCopy Register Word
LDIRd, KLoad ImmediateRd ← KNone1
LDRd, XLoad IndirectRd ← (X)None2
LDRd, X+Load Indirect and Post-Inc.Rd ← (X), X ← X + 1None2
LDRd, - XLoad Indirect and Pre-Dec.X ← X - 1, Rd ← (X)None2
LDRd, YLoad IndirectRd ← (Y)None2
LDRd, Y+Load Indirect and Post-Inc.Rd ← (Y), Y ← Y + 1None2
LDRd, - YLoad Indirect and Pre-Dec.Y ← Y - 1, Rd ← (Y)None2
LDDRd,Y+qLoad Indirect with DisplacementRd ← (Y + q)None2
LDRd, ZLoad Indirect Rd ← (Z)None2
LDRd, Z+Load Indirect and Post-Inc.Rd ← (Z), Z ← Z+1None2
LDRd, -ZLoad Indirect and Pre-Dec.Z ← Z - 1, Rd ← (Z)None2
LDDRd, Z+qLoad Indirect with DisplacementRd ← (Z + q)None2
LDSRd, kLoad Direct from SRAMRd ← (k)None2
STX, RrStore Indirect(X) ← RrNone2
STX+, RrStore Indirect and Post-Inc.(X) ← Rr, X ← X + 1None2
ST- X, RrStore Indirect and Pre-Dec.X ← X - 1, (X) ← RrNone2
STY, RrStore Indirect(Y) ← RrNone2
STY+, RrStore Indirect and Post-Inc.(Y) ← Rr, Y ← Y + 1None2
ST- Y, RrStore Indirect and Pre-Dec.Y ← Y - 1, (Y) ← RrNone2
STDY+q,RrStore Indirect with Displacement(Y + q) ← RrNone2
STZ, RrStore Indirect(Z) ← RrNone2
STZ+, RrStore Indirect and Post-Inc.(Z) ← Rr, Z ← Z + 1None2
ST-Z, RrStore Indirect and Pre-Dec.Z ← Z - 1, (Z) ← RrNone2
STDZ+q,RrStore Indirect with Displacement(Z + q) ← RrNone2
STSk, RrStore Direct to SRAM(k) ← RrNone2
LPMLoad P rogram MemoryR0 ← (Z)None3
LPMRd, ZLoad Program MemoryRd ← (Z)None3
LPMRd, Z+Load Program Memory and Post-IncRd ← (Z), Z ← Z+1None3
SPMStore Program Memory(z) ← R1:R0None
INRd, PIn PortRd ← PNone1
OUTP, RrOut PortP ← RrNone1
PUSHRrPush Register on StackSTACK ← RrNone2
POPRdPop Register from StackRd ← STACKNone2
MCU CONTROL INSTRUCTIONS
NOPNo OperationNone1
SLEEPSleep(see specific descr. for Sleep function)None1
WDRWatchdog Reset(see specific descr. for WDR/Timer)None1
BREAKBreakFor On-chip Debug OnlyNoneN/A
Rd+1:Rd ← Rr+1:Rr
None1
1
10
8006GS–AVR–01/08
ATtiny24/44/84
6.Ordering Information
6.1ATtiny24
Speed (MHz)Power SupplyOrdering Code
ATtiny24V-10SSU
101.8 - 5.5V
202.7 - 5.5V
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, complies to the European Directive for Restriction of Hazardous Substances (RoHS directive). Also
Halide free and fully Green.
ATtiny24V-10PU
ATtiny24V-10MU
ATtiny24-20SSU
ATtiny24-20PU
ATtiny24-20MU
(1)
Package
14S1
14P3
20M1
14S1
14P3
20M1
(2)
Operational Range
Industrial
(-40°C to 85°C)
Industrial
(-40°C to 85°C)
Package Type
14S1
14P3
20M120-pad, 4 x 4 x 0.8 mm Body, Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)
Reference JEDEC Standard MO-220, Fig. 1 (SAW Singulation) WGGD-5.
Note:
SIDE VIEW
A2
A1
A
0.08
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A 0.70 0.75 0.80
A1 – 0.01 0.05
A2 0.20 REF
b 0.18 0.23 0.30
D 4.00 BSC
D2 2.45 2.60 2.75
E 4.00 BSC
E2 2.45 2.60 2.75
e0.50 BSC
L 0.35 0.40 0.55
MIN
NOM
C
MAX
NOTE
2325 Orchard Parkway
R
San Jose, CA 95131
14
TITLE
20M1, 20-pad, 4 x 4 x 0.8 mm Body, Lead Pitch 0.50 mm,
2.6 mm Exposed Pad, Micro Lead Frame Package (MLF)
DRAWING NO.
20M1
8006GS–AVR–01/08
10/27/04
REV.
A
7.214P3
PIN
1
E1
A1
B
E
B1
C
L
SEATING PLANE
A
ATtiny24/44/84
D
e
eC
eB
Notes: 1. This package conforms to JEDEC reference MS-001, Variation AA.
2. Dimensions D and E1 do not include mold Flash or Protrusion.
Mold Flash or Protrusion shall not exceed 0.25 mm (0.010").
TITLE
2325 Orchard Parkway
R
San Jose, CA 95131
14P3, 14-lead (0.300"/7.62 mm Wide) Plastic Dual
Inline Package (PDIP)
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A – – 5.334
A1 0.381 – –
D 18.669 – 19.685 Note 2
E 7.620 – 8.255
E1 6.096 – 7.112 Note 2
B 0.356 – 0.559
B1 1.143 – 1.778
L 2.921 – 3.810
C 0.203 – 0.356
eB – – 10.922
eC 0.000 – 1.524
e 2.540 TYP
MIN
NOM
MAX
DRAWING NO.
14P3
NOTE
11/02/05
REV.
A
8006GS–AVR–01/08
15
ATtiny24/44/84
7.314S1
1
E
H
E
N
L
Top View
COMMON DIMENSIONS
e
A1
D
Side View
Notes:1. This drawing is for general information only; refer to JEDEC Drawing MS-012, Variation AB for additional information.
2. Dimension D does not include mold Flash, protrusions or gate burrs. Mold Flash, protrusion and gate burrs shall not
exceed 0.15 mm (0.006") per side.
3. Dimension E does not include inter-lead Flash or protrusion. Inter-lead flash and protrusions shall not exceed 0.25 mm
(0.010") per side.
4. L is the length of the terminal for soldering to a substrate.
5. The lead width B, as measured 0.36 mm (0.014") or greater above the seating plane, shall not exceed a maximum value
of 0.61 mm (0.024") per side.
The revision letters in this section refer to the revision of the corresponding ATtiny24/44/84
device.
No known errata.
No known errata.
Reading EEPROM when system clock frequency is below 900 kHz may not work
•
1.Reading EEPROM when s ystem clock frequency is below 900 kHz may not work
Reading data from the EEPROM at system clock frequency below 900 kHz may result in
wrong data read.
Problem Fix/Work around
Avoid using the EEPROM at clock frequency below 900 kHz.
8.1.4Rev. B
8.1.5Rev. A
EEPROM read from application code does not work in Lock Bit Mode 3
•
• Reading EEPROM when system clock frequency is below 900 kHz may not work
1.EEPROM read from application code does not work in Lock Bit Mode 3
When the Memory Lock Bits LB2 and LB1 are programmed to mode 3, EEPROM read does
not work from the application code.
Problem Fix/Work around
Do not set Lock Bit Protection Mode 3 when the application code needs to rea d from
EEPROM.
2.Reading EEPROM when s ystem clock frequency is below 900 kHz may not work
Reading data from the EEPROM at system clock frequency below 900 kHz may result in
wrong data read.
Problem Fix/Work around
Avoid using the EEPROM at clock frequency below 900 kHz.
Not sampled.
8006GS–AVR–01/08
17
ATtiny24/44/84
8.2ATtiny44
8.2.1Rev. D
8.2.2Rev. C
8.2.3Rev. B
8.2.4Rev. A
No known errata.
No known errata.
No known errata.
•
Reading EEPROM when system clock frequency is below 900 kHz may not work
1.Reading EEPROM when s ystem clock frequency is below 900 kHz may not work
Reading data from the EEPROM at system clock frequency below 900 kHz may result in
wrong data read.
Problem Fix/Work around
Avoid using the EEPROM at clock frequency below 900 kHz.
18
8006GS–AVR–01/08
8.3ATtiny84
8.3.1Rev. B
8.3.2Rev. A
ATtiny24/44/84
No known errata.
No known errata.
8006GS–AVR–01/08
19
ATtiny24/44/84
9.Datasheet Revision History
9.1Rev G. 01/08
1.Updated sections:
– “Features” on page 1
– “RESET” on page 3
– “Overview” on page 4
– “About” on page 6
– “SPH and SPL — Stack Pointer Register” on page 11
– “Atomic Byte Programming” on page 17
– “Write” on pa ge 17
– “Clock Sources” on page 24
– “Default Clock Source” on page 28
– “Sleep Modes” on page 32
– “So ftware BOD Disable” on page 33
– “External Interrupts” on page 48
– “USIBR – USI Data Buffer” on page 124
– “USIDR – USI Data Register” on page 124
– “DIDR0 – Digital Input Disable Register 0” on page 131
– “Features” on page 132
– “Prescaling and Conversion Timing” on page 135
– “Temperature Measurement” on page 144
– “ADMUX – ADC Multiplexer Selection Register” on page 145
– “Limitations of debugWIRE” on page 152
– “Reading Lock, Fuse and Signature Data from Software” on page 155
– “Device Signature Imprint Table” on page 161
– “Enter High-voltage Serial Programming Mode” on page 168
– “Absolute Maximum Ratings*” on page 175
– “DC Characteristics” on page 175
– “Speed Grades” on page 177
– “Clock Characteristics” on page 177
– “Calibrated Internal RC Oscillator Accuracy” on page 177
– “System and Reset Characteristics” on page 179
– “Supply Current of I/O Modules” on page 186
– “ATtiny24” on page 17
– “ATtiny44” on page 18
– “ATtiny84” on page 19
2.Updated bit defin itions in sections:
– “MCUCR – MCU Control Register” on page 35
– “MCUCR – MCU Control Register” on page 50
– “MCUCR – MCU Control Register” on page 66
20
8006GS–AVR–01/08
ATtiny24/44/84
– “PINA – Port A Input Pins” on page 67
– “SPMCSR – Store Program Memory Control and Status Register” on page 157
– “Register Summary” on page 7
3.Updated Figures:
– “Reset Logic” on page 38
– “Watchdog Reset During Operation” on page 41
– “Compare Match Output Unit, Schematic (non-PWM Mode)” on page 97
– “Analog to Digital Converter Block Schematic” on page 133
– “ADC Timing Diagram, Free Running Conversion” on page 13 7
– “Analog Input Circuitry” on page 140
– “High-voltage Serial Programming” on page 167
– “Serial Programming Timing” on page 184
– “High-voltage Serial Programming Timing” on page 185
– “Active Supply Current vs. Lo w Frequency (0.1 - 1.0 MHz)” on page 187
– “Active Supply Current vs. frequency (1 - 20 MHz)” on page 188
– “Active Supply Current vs. VCC (Internal RC Oscillator, 8 MHz)” on page 188
– “Active Supply Current vs. VCC (Internal RC Oscillator, 1 MHz)” on page 189
– “Active Supply Current vs. VCC (Internal RC Oscillator, 128 kHz)” on page 189
– “Idle Supply Current vs. Low Frequency (0.1 - 1.0 MHz)” on page 190
– “Idle Supply Current vs. Frequency (1 - 20 MHz)” on page 190
– “Idle Supply Current vs. VCC (Internal RC Oscillator, 8 MHz)” on page 191
– “Idle Supply Current vs. VCC (Internal RC Oscillator, 1 MHz)” on page 191
– “Idle Supply Current vs. VCC (Internal RC Oscillator, 128 MHz)” on page 192
– “Power-down Supply Current vs. VCC (Watchdog Timer Disabled)” on page 192
– “Power-down Supply Current vs. VCC (Watchdog Timer Enabled)” on page 193
– “Reset Pin Input Hysteresis vs. VCC” on page 203
– “Reset Pin Input Hysteresis vs. VCC (Reset Pin Used as I/O)” on page 204
– “Watchdog Oscillator Frequency vs . VCC” on page 206
– “Watchdog Oscillator Frequency vs. Temperature” on page 206
– “Calibrated 8 MHz RC Oscillator Frequency vs. VCC” on page 207
– “Calibrated 8 MHz RC oscillator Frequency vs. Temperature” on page 207
– “ADC Current vs. VCC” on page 208
– “Programming Current vs. VCC (ATtiny24)” on page 210
– “Programming Current vs. VCC (ATtiny44)” on page 210
– “Programming Current vs. VCC (ATtiny84)” on page 211
4.Added Figures:
– “Re set Pin Output Voltage vs. Sink Current (VCC = 3V)” on page 199
– “Re set Pin Output Voltage vs. Sink Current (VCC = 5V)” on page 199
– “Reset Pin Output Voltage vs. Source Current (VCC = 3V)” on page 20 0
– “Reset Pin Output Voltage vs. Source Current (VCC = 5V)” on page 20 0
5.Updated Tables:
8006GS–AVR–01/08
21
ATtiny24/44/84
– “Device Clocking Options Select” on page 24
– “Start-up Times for the Crystal Oscillator Clock Selection” on page 28
– “Start-up Times for the Internal Calibrated RC Oscillator Clock Selection” on page 26
– “Start-up Times for the External Clock Selection” on page 25
– “Start-up Times for the 128 kHz Internal Oscillator” on page 26
– “Activ e Cloc k Domains and W a ke-up Sou rces in the Diff erent Sleep Modes” on page
32
– “Watchdog Timer Prescale Select” on page 46
– “Reset and Interrupt Vectors” on page 47
– “Overriding Signals for Alternate Functions in PA7..PA5” on page 62
– “Overriding Signals for Alternate Functions in PA4..PA2” on page 63
– “Overriding Signals for Alternate Functions in PA1..PA0” on page 63
– “Port B Pins Alternate Functions” on page 64
– “Overriding Signals for Alternate Functions in PB3..PB2” on page 65
– “Overriding Signals for Alternate Functions in PB1..PB0” on page 66
– “Waveform Generation Modes” on page 109
– “ADC Conversion Time” on page 138
– “Temperature vs. Sensor Output Voltage (Typical Case)” on page 144
– “DC Characteristics. TA = -40×C to +85×C (1)” on page 175
– “Calibration Accuracy of Internal RC Oscillator” on page 178
– “Reset, Brown-out, and Internal Voltage Characteristics” on page 179
– “VBOT vs. BODLEVEL Fuse Coding” on page 180
– “ADC Characteristics, Single Ended Channels. -40×C - 85×C” on page 181
– “ADC Characteristics, Diff erential Channels (B ipolar Mode) , TA = -40×C to 85×C” on
page 183
– “Serial Prog ramming Characteristics , TA = -40×C to 85×C, VCC = 1.8 - 5.5V (Unless
Otherwise Noted)” on page 184
– “High-voltage Serial Programming Characteristics TA = 25×C, VCC = 5V (Unless
otherwise noted)” on page 185
6.Updated code examples in sections:
– “Write” on pa ge 17
– “SPI Master Operation Example” on page 119
7.Updated “Ordering Information” in
– “ATtiny84” on page 13
9.2Rev F. 02/07
22
1.Updated Figure 1-1 on page 2, Figure 8-7 on page 42, Figure 20-6 on page 185.
2.Updated Table 9-1 on page 47, Table 10-7 on page 64, Table 11-2 on page 79, Table
11-3 on page 80, Table 11-5 on page 80, Ta ble 11-6 on page 81, T able 11-7 on page
81, Table 11-8 on page 82, Table 20-10 on page 183, Table 20-12 on page 185.
3.Updated table references in “TCCR0A – Timer/Counter Control Register A” on page 79.
8006GS–AVR–01/08
9.3Rev E. 09/06
ATtiny24/44/84
4.Updated Port B, Bit 0 functions in “Alternate Functions of Port B” on page 64.
5.Updated WDTCR bit name to WDTCSR in assembly code examples.
6.Updated bit5 name in “TIFR1 – Timer/Counter Interrupt Flag Register 1” on page 113.
7.Updated bit5 in “TIFR1 – Timer/Counter Interrupt Flag Register 1” on page 113.
8.Updated “SPI Master Operation Example” on page 119.
9.Updated step 5 in “Enter High-voltage Serial Programming Mode” on page 168.
1.All characterization data moved to “Electrical Characteristics” on page 175.
2.All Register Descriptions gathered up in separate sections at the end of each chapter.
3.Updated “System Control and Reset” on page 38.
4.Updated Table 11-3 on page 80, Table 11-6 on page 81, Table 11-8 on page 82, Table
12-3 on page 108 and Table 12-5 on page 109.
5.Updated “Fast PWM Mode” on page 99.
6.Updated Figure 12-7 on page 100 and Figure 16-1 on page 133.
7.Updated “Analog Comparator Multiplexed Input” on page 129.
8.Added note in Table 19-12 on page 165.
9.Updated “Electrical Characteristics” on page 175.
10.Updated “Typical Characteristics” on page 186.
9.4Rev D. 08/06
9.5Rev C. 07/06
9.6Rev B. 05/06
1.Updated “Calibrated Internal 8 MHz Oscillator” on page 25.
2.Updated “OSCCAL – Oscillator Calibration Register” on page 29.
3.Added Table 20-2 on page 178.
4.Updated code examples in “SPI Master Operation Example” on page 119.
5.Updated code examples in “SPI Slave Operation Example” on page 120.
6.Updated “Signature Bytes” on page 162.
1.Updated Features in “USI – Universal Serial Interface” on page 117.
2.Added “Clock speed considerations” on page 123.
3.Updated Bit description in “ADMUX – ADC Multiplexer Selection Register” on page 145.
4.Added note to Table 18-1 on page 157.
1.Updated “Default Clock Source” on page 28
2.Updated “Power Reduction Register” on page 34.
3.Updated Table 20-4 on page 179, Table 9-4 on page 42, Table 16-3 on page 145,
Table 19-5 on page 161, Tab le 19-12 on page 165
10 on page 183.
4.Updated Features in “Analog to Digital Converter” on page 132.
, Table 19-16 on page 172, Table 20-
8006GS–AVR–01/08
23
ATtiny24/44/84
9.7Rev A. 12/05
5.Updated Operation in “Analog to Digital Converter” on page 132.
6.Updated “Temperature Measurement” on page 144.
7.Updated DC Characteristics in “Electrical Characteristics” on page 175.
8.Updated “Typical Characteristics” on page 186.
9.Updated “Errata” on pa g e 17.
Initial revision.
24
8006GS–AVR–01/08
ATtiny24/44/84
8006GS–AVR–01/08
25
HeadquartersInternational
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131
USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Atmel Asia
Room 1219
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
East Kowloon
Hong Kong
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Product Contact
Web Site
www.atmel.com
Literature Requests
www.atmel.com/literature
Atmel Europe
Le Krebs
8, Rue Jean-Pierre Timbaud
BP 309
78054 Saint-Quentin-enYvelines Cedex
France
Tel: (33) 1-30-60-70-00
Fax: (33) 1-30-60-71-11
Technical Support
avr@atmel.com
Atmel Japan
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Sales Contact
www.atmel.com/contacts
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 r ight 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
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 INCIDENT AL DAMAGES (INCLUDING, WITHOUT LIMITATION, D AMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INF ORMATION) 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 product descriptions at any time without notice. Atmel does not make any commitment to update the information contained here in. Unless specifically provided
otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for use
as components in applications intended to suppor t or sustain life.