– 131 Powe rful Instructions – Most Single-c lo ck Cycle Execut ion
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 20 MIPS Throughput at 20 MHz
• High Endurance Non-volatile Memory segments
– 64K Bytes of In-System Self-programmable Flash program memory
– 2K Bytes EEPROM
– 4K Bytes Internal SRAM
– Write/Erase cyles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– Programming Lock for Software Security
• JTAG (IEEE std. 1149.1 Compliant) Interface
– Boundary-scan Capabilities According to the JTAG Standard
– Extensive On-chip Debug Support
– Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface
• Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel, 10-bit ADC
Differential mode with selectable gain at 1x, 10x or 200x
– Byte-oriented Two-wire Serial Interface
– One Programmable Serial USART
– Master/Slave SPI Serial Interface
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
• Special Microcontroller Features
– Power-on Reset and Pr ogrammab l e Brown-out Detection
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby
Note:The large center pad underneath the QFN/MLF package should be soldered to ground on the
board to ensure good mechanical stability.
2
2593MS–AVR–08/07
1.1Disclaimer
PC7..0
PA7..0
PB7..0
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.
2.Overview
The ATmega644 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 ATmeg a644
achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize
power consumption versus processing speed.
2.1Block Diagram
Figure 2-1.Block Diagram
VCC
ATmega644
RESET
XTAL1
GND
XTAL2
Power
Supervision
POR / BOD &
RESET
Watchdog
Timer
Watchdog
Oscillator
Oscillator
Circuits /
Clock
Generation
PORT A (8)
A/D
Converter
EEPROM
JTAG
TWI
Internal
Bandgap reference
CPU
SRAMFLASH
PORT B (8)
Analog
Comparator
SPI
16bit T/C 1
8bit T/C 0
8bit T/C 2
USART 0
2593MS–AVR–08/07
PORT C (8)
PORT D (8)
PD7..0
3
ATmega644
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 ATmega644 provides the following features: 64K bytes of In-System Programmable Flash
with Read-While-Write capabilities, 2K bytes EEPROM, 4K bytes SRAM, 32 general purpose I/O
lines, 32 general purpose working registers, Real Time Counter (RTC), three flexible
Timer/Counters with compare modes and PWM, 2 USARTs, a byte oriented 2-wire Serial Interface, a 8-channel, 10-bit ADC with optional differential input stage with programmable gain,
programmable Watchdog Timer with Internal Oscilla tor, an SPI serial port, IEEE std. 1149. 1
compliant JTAG test interface, also used for accessing the On-chip Debug system and programming and six software selectable power saving modes. The Idle mode stops the CPU wh ile
allowing the SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The
Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip
functions until the next interrupt or Hardware Reset. In Power-save mode, the asynchronous
timer continues to run, allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modu les except Asynchr onous Timer and ADC, to minimize switching noise during ADC conversions. In Standby mode,
the Crystal/Resonator Oscillator is running while the rest of the device is sleeping. This allows
very fast start-up combined with low power consumption. In Extended Standby mode, both the
main Oscillator and the Asynchronous Timer continue to run.
The device is manufactured using Atmel’s high-density nonvolatile memory technology. The Onchip ISP Flash allows the program memory to be reprogrammed in-system through an SPI serial
interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot program
running on the AVR core. The boot program can use any interface to download the application
program in the application Flash memory. Software in the Boot Flash section will continue to run
while the Application Flash section is updated, providing true Read-While-Write operation. By
combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip,
the Atmel ATmega644 is a powerful microcontroller that pro vides a highly flexible and co st effective solution to many embedded control applications.
The ATmega644 AVR is supported with a full suite of program and system development tools
including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators,
and evaluation kits.
2.2Pin Descriptions
2.2.1VCC
Digital supply voltage.
2.2.2GND
Ground.
2.2.3Port A (PA7:PA0)
4
Port A serves as analog inputs to the Analog-to-digital Conver ter.
Port A also serves as an 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
2593MS–AVR–08/07
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-st ated when a reset co ndition becomes
active, even if the clock is not running.
Port A also serves the functions of various special features of the ATmega644 as listed on page
73.
2.2.4Port B (PB7:PB0)
Port B is an 8-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. 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 co ndition becomes active,
even if the clock is not running.
Port B also serves the functions of various special features of the ATmega644 as listed on page
75.
2.2.5Port C (PC7:PC0)
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port C output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port C pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
ATmega644
Port C also serves the functions of the JTAG interface, along with special features of the
ATmega644 as listed on page 78.
2.2.6Port D (PD7:PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port D output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port D also serves the functions of various special features of the ATmega644 as listed on page
80.
2.2.7RESET
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. The minimum pulse length is given in ”System and Reset
Characteristics” on page 320. Shorter pulses are not guaranteed to generate a reset.
2.2.8XTAL1
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
2.2.9XTAL2
Output from the inverting Oscillator amplifier.
2593MS–AVR–08/07
5
ATmega644
2.2.10AVCC
2.2.11AREF
3.Resources
AVCC is the supply voltage pin for Port F and the Analog-to-digital Convert er. It should be exte rnally connected to V
to V
through a low-pass filter.
CC
This is the analog reference pin for the Analog-to-digital Converter.
A comprehensive set of development tools, application notes and datasheetsare available for
download on http://www.atmel.com/avr.
, even if the ADC is not used. If the ADC is used, it should be connected
Notes: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 $00 - $1F 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 the CBI and SBI instructions will operate on
all bits in the I/O register, writing a one back into any flag read as set, thus clearing the flag. The CBI and SBI instructions
work with registers 0x00 to 0x1F on ly.
4. When using the I/O specific commands IN and OUT, the I/O addresses $00 - $3F must be used. When addressing I/O registers as data space using LD and ST instructions, $20 must be added to these addresses. The ATmega644 is a complex
microcontroller with more peripheral units than can be supported within the 64 location reserved in Opcode for the IN and
OUT instructions. For the Extended I/O space from $60 - $FF, only the ST/STS/STD and LD/LDS/LDD instructions can be
used.
10
2593MS–AVR–08/07
ATmega644
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 WordRdh: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
MULRd, RrMultiply UnsignedR1:R0 ← Rd x RrZ,C2
MULSRd, RrMultiply SignedR1:R0 ← Rd x RrZ,C2
MULSURd, RrMultiply Signed with UnsignedR1:R0 ← Rd x RrZ,C2
FMULRd, RrFractional Multiply UnsignedR1:R0 ← (Rd x Rr) << 1Z,C2
FMULSRd, RrFractional Multiply SignedR1:R0 ← (Rd x Rr) << 1Z,C2
FMULSURd, RrFractional Multiply Signed with UnsignedR1:R0 ← (Rd x Rr) << 1Z,C2
BRANCH INSTRUCTIONS
RJMPkRelative JumpPC ← PC + k + 1None2
IJMPIndirect Jump to (Z)PC ← Z None2
JMPkDirect JumpPC ← kNone3
RCALLkRelative Subroutine Call PC ← PC + k + 1None4
ICALLIndirect Call to (Z)PC ← ZNone4
CALLkDirect Su broutine Call PC ← kNone5
RETSubroutine ReturnPC ← STACKNone5
RETIInterrupt ReturnPC ← STACKI5
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 Registe r 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 Stat us 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 + 1N one1/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 + 1None1/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
2593MS–AVR–08/07
11
ATmega644
MnemonicsOperandsDescriptionOperationFlags#Clocks
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) ← 0Z,C,N,V1
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
RORRdRotate 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
SEIGlo ba l Interru pt Ena bleI ← 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 H1
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 Program MemoryR0 ← (Z)None3
LPMRd, ZLoad Program MemoryRd ← (Z)None3
LPMRd, Z+Load Program Memory and Post-IncRd ← (Z), Z ← Z+1None3
ELPMRd, ZExtended Load Program MemoryRd ← (Z)None3
SPMStore Program Memory(Z) ← R1:R0NoneINRd, PIn PortRd ← PNone1
Rd+1:Rd ← Rr+1:Rr
None1
12
2593MS–AVR–08/07
ATmega644
MnemonicsOperandsDescriptionOperationFlags#Clocks
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
2593MS–AVR–08/07
13
ATmega644
6.Ordering Information
6.1ATmega644
Speed (MHz)
Note:1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information
2. Pb-free packaging, complies to the European Directive for Restriction of Hazardous Substances (RoHS directive). Also
3. For Speed vs. VCC see ”Speed Grades” on page 318.
(3)
101.8 - 5.5V
202.7 - 5.5V
and minimum quantities.
Halide free and fully Green.
Power SupplyOrdering Code
ATmega644V-10AU
ATmega644V-10PU
ATmega644V-10MU
ATmega644-20AU
ATmega644-20PU
ATmega644-20MU
(2)
Package
44A
40P6
44M1
44A
40P6
44M1
(1)
Operational Range
Industrial
(-40oC to 85oC)
Industrial
o
C to 85oC)
(-40
44A44-lead, Thin (1.0 mm) Plastic Gull Wing Quad Flat Package (TQFP)
40P640-pin, 0.600” Wide, Plastic Dual Inline Package (PDIP)
44M144-pad, 7 x 7 x 1.0 mm body, lead pitch 0.50 mm, Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)
14
Package Type
2593MS–AVR–08/07
7.Packaging Information
7.144A
PIN 1
PIN 1 IDENTIFIER
ATmega644
B
e
E1E
D1
D
C
0˚~7˚
A1
L
Notes:1. This package conforms to JEDEC reference MS-026, Variation ACB.
2. Dimensions D1 and E1 do not include mold protrusion. Allowable
protrusion is 0.25 mm per side. Dimensions D1 and E1 are maximum
plastic body size dimensions including mold mismatch.
3. Lead coplanarity is 0.10 mm maximum.
A2A
SYMBOL
COMMON DIMENSIONS
(Unit of Measure = mm)
MIN
A––1.20
A10.05–0.15
A2 0.951.001.05
D11.7512.0012.25
D19.9010.0010.10Note 2
E11.7512.0012.25
E19.9010.0010.10Note 2
B 0.30–0.45
C0.09–0.20
L0.45– 0.75
e0.80 TYP
NOM
MAX
NOTE
2325 Orchard Parkway
R
San Jose, CA 95131
2593MS–AVR–08/07
TITLE
44A, 44-lead, 10 x 10 mm Body Size, 1.0 mm Body Thickness,
0.8 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
10/5/2001
DRAWING NO.
44A
REV.
B
15
ATmega644
7.240P6
PIN
1
E1
A1
B
REF
E
B1
C
L
SEATING PLANE
A
D
e
0º ~ 15º
eB
Notes:1. This package conforms to JEDEC reference MS-011, Variation AC.
2. Dimensions D and E1 do not include mold Flash or Protrusion.
Mold Flash or Protrusion shall not exceed 0.25 mm (0.010").
2325 Orchard Parkway
R
San Jose, CA 95131
TITLE
40P6, 40-lead (0.600"/15.24 mm Wide) Plastic Dual
Inline Package (PDIP)
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A––4.826
A10.381––
D52.070–52.578Note 2
E15.240–15.875
E113.462–13.970Note 2
B0.356–0.559
B11.041–1.651
L3.048–3.556
C0.203– 0.381
eB15.494–17.526
e2.540 TYP
MIN
NOM
MAX
DRAWING NO.
40P6
NOTE
09/28/01
REV.
B
16
2593MS–AVR–08/07
7.344M1
ATmega644
D
Marked Pin# 1 ID
E
SEATING PLANE
TOP VIEW
K
L
D2
Pin #1 Corner
1
2
3
Option A
E2
Option B
K
b
e
Option C
BOTTOM VIEW
Note: JEDEC Standard MO-220, Fig. 1 (SAW Singulation) VKKD-3.
Pin #1
Triangle
Pin #1
Chamfer
(C 0.30)
Pin #1
Notch
(0.20 R)
A1
A3
A
SIDE VIEW
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A 0.80 0.90 1.00
A1 – 0.02 0.05
A3 0.25 REF
b 0.180.230.30
D
D2 5.005.205.40
E
E2 5.005.205.40
e 0.50 BSC
L 0.59 0.64 0.69
K0.200.260.41
MIN
6.907.007.10
6.907.007.10
NOM
MAX
NOTE
2325 Orchard Parkway
R
San Jose, CA 95131
2593MS–AVR–08/07
TITLE
44M1, 44-pad, 7 x 7 x 1.0 mm Body, Lead Pitch 0.50 mm,
5.20 mm Exposed Pad, Micro Lead Frame Package (MLF)
DRAWING NO.
44M1
5/27/06
REV.
G
17
ATmega644
8.Errata
8.1Rev. C
8.2Rev. B
8.3Rev. A
• Inaccurate ADC conversion in differential mode with 200x gain.
1.Inaccurate ADC conversion in differential mode with 200x gain
With AVCC < 3.6V, random conversions will be inaccurate. Typical absolute accuracymay
reach 64 LSB.
Problem Fix/Workaround
None
Not sampled
• EEPROM read from application code does not work in Lock Bit Mode 3.
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.
18
2593MS–AVR–08/07
9.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.
9.1Rev. 2593M - 08/07
1.Updated ”Features” on page 1.
2.Updated description in ”Stack Pointer” on page 13.
3.Updated ”Power-on Reset” on page 46.
4.Updated ”Brown-out Detection” on page 47.
5.Updated ”Internal Volta ge Reference” on page 48.
6.Updated code example in ”MCUCR – MCU Control Register” on page 58.
7.Added ”System and Reset Characteristics” on page 320.
8.All Register Descriptions moved to the end of their respective chapters.
9.2Rev. 2593L - 02/07
ATmega644
1.Updated bit description on page 153
2.Updated typos in “External Interrupts” Section 11.1.6 on page 63
3.UpdatedTable 24-8 on page 280
4.Updated Table 24-7 on page 280.
9.3Rev. 2593K - 01/07
1Removed the “Not recommended in new designs“ notice on page 1.
2.Updated Figure 2-1 on page 3.
3.Updated ”PCIFR – Pin Change Inte rrupt Flag Register” on page 62.
4.Updated Table 21-4 on page 248.
5.Added note to ”DC Characteristics” on page 316.
9.4Rev. 2593J - 09/06
1.Updated ”Calibrated Internal RC Oscillator” on page 33.
2.Updated ”Fast PWM Mode” on page 117.
3.Updated ”Device Identificati on Register” on page 260.
4.Updated ”Signature Bytes” on page 287.
5.Updated Tab le 13-3 on pag e 97,Table 1 3-6 on page 98, Table 14-3 on page 126, Table
14-4 on page 126, Table 14-5 on page 127, Table 15-3 on page 146, Table 15-6 on
page 147 and Table 15-8 on page 148.
2593MS–AVR–08/07
19
ATmega644
9.5Rev. 2593I - 08/06
1.Updated note in ”Pin Configurations” on page 2.
2.Updated Table 7-2 on page 29, Table 12-11 on page 80 and Table 24-7 on page 280.
3.Updated ”Timer/Counter Prescaler” on page 145.
9.6Rev. 2593H - 07/06
1.Updated ”Fast PWM Mode” on page 117.
2.Updated Figure 14-7 on page 118.
3.Updated Table 24-7 on page 280.
4.Updated ”Packaging Information” on page 362.
9.7Rev. 2593G - 06/06
1.Updated ”Calibrated Internal RC Oscillator” on page 33.
2.Updated ”OSCCAL – Oscillator Calibration Register” on page 37.
3.Updated Table 26-1 on page 319.
9.8Rev. 2593F - 04/06
1.Updated typos.
2.Updated ”ADC Noise Reduction Mode” on page 40.
3.Updated ”Power-down Mode” on page 40.
9.9Rev. 2593E - 04/06
1.Updated ”Calibrated Internal RC Oscillator” on page 33.
9.10Rev. 2593D - 04/06
1.Updated ”Bit 6 – ACBG: Analog Comparator Bandgap Select” on page 231.
2.Updated ”Prescaling and Conversion Timing” on page 236.
9.11Rev. 2593C - 03/06
1.Added “Not recommended in new designs” .
2.Removed RAMPZ– Extended Z-pointer Register for ELPM/SPM from datasheet.
3.Updated Table 10-1 on page 55.
20
2593MS–AVR–08/07
4.Updated code example in ”Interrupt Vectors in ATmega644” on page 55.
5.Updated ”Setting the Boot Loader Lock Bits by SPM” on page 276.
6.Updated ”Register Summary” on page 354.
9.12Rev. 2593B - 03/06
1.Removed the occurancy of ATmega164 and ATmega324.
2.Updated Adresses in Registers.
3.Updated ”Architectural Overview” on page 9.
4.Updated SRAM sizes in ”SRAM Data Memory” on page 18.
5.Updated ”I/O Memory” on page 20.
6.Updated ”PRR – Power Reduction Register” on page 44.
7.Updated Register bit Discription in ”Register Description” on page 146.
8.Updated Note in ”Overview of the TWI Module” on page 206.
9.Updated Feauters in ”Analo g-to-digital Converter” on page 233.
10.Changed name from “SFIOR“ to “ADCSRB“ in ”Starting a Conversion” on page 235, in
11.Updated ”Signature Bytes” on page 287.
12.Updated ”DC Characteristics” on page 316.
13.Updated ”Typical Characteristics” on page 326.
14.Updated Example in ”Supply Current of IO modules” on page 331.
15.Updated ”Register Summary” on page 354.
16.Updated Figure 6-2 on page 18 and Figure 21-1 on page 234.
17.Updated ”Errata” on page 365.
18.Updated Table 9-1 on page 47, Table 9-4 on page 51,Table 10-1 on page 55,Table 23-
ATmega644
”Bit 5 – ADATE: ADC Auto Trigger Enable” on page 250 and ”Bit 7, 5:3 – Res:
Reserved Bits” on page 251.
1 on page 260, Table 25-7 on page 287, Table 25-15 on page 299,Table 26-6 on page
322, Table 27-1 on page 331, Table 27-2 on pag e 332.
9.13Rev. 2593A-06/05
1.Initial revision.
2593MS–AVR–08/07
21
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 right is granted by this document or i n 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 (INCL UDING, WIT HOUT LI MITATION, D AMAGES FOR LOSS OF PROF ITS, BUSI NESS IN TERR UPTION, 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 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.