– 130 Powe rful Instructions – Most Single Clock Cy cle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On-Chip 2-cycle Multiplier
• High Endurance Non-volatile Memory Segments
– In-System Self-programmable Flash Program Memory
• 32K Bytes (ATmega329/ATmega3290)
• 64K Bytes (ATmega649/ATmega6490)
– EEPROM
• 1K bytes (ATmega329/ATmega3290)
• 2K bytes (ATmega649/ATmega6490)
– Internal SRAM
• 2K bytes (ATmega329/ATmega3290)
• 4K bytes (ATmega649/ATmega6490)
– Write/Erase Cycles: 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
– 4 x 25 Segment LCD Driver (ATmega329/ATmega649)
– 4 x 40 Segment LCD Driver (ATmega3290/ATmega6490)
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
– Real Time Counter with Separate Oscillator
–Four PWM Channels
– 8-channel, 10-bit ADC
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Universal Serial Interface with Start Condition Detector
– 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 Oscillator
– External and Internal Interrupt Sources
– Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and
Note:The large center pad underneath the QFN/MLF pa ckages is made of metal and internally con-
nected to GND. It should be soldered or glued to the board to ensure good mechanical stability. If
the center pad is left unconnected, the package might loosen from the board.
2.Disclaimer
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.
3.Overview
The ATmega329/3290/649/6490 is a low-power CMOS 8-bit micr ocontroller based on the AVR e nhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega329/3290/649/6490 achieves throughputs
approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.
2552JS–AVR–08/07
3
ATmega329/3290/649/6490
3.1Block Diagram
Figure 3-1.Block Diagram
AVCC
AGND
AREF
PH0 - PH7
PORTH DRIVERS
VCCGND
DATA DIR.
REG. PORTH
PORTH
DATA REGISTER
DATA DIR.
REG. PORTJ
DATA REGISTER
JTAG TAP
ON-CHIP DEBUG
BOUNDARY-
SCAN
PROGRAMMING
LOGIC
PORTF DRIVERS
PORTF
AVR CPU
DATA DIR.
REG. PORTF
ADC
PROGRAM
COUNTER
PROGRAM
FLASH
INSTRUCTION
REGISTER
INSTRUCTION
DECODER
CONTROL
LINES
DATA REGISTER
PORTA
STACK
POINTER
SRAM
GENERAL
PURPOSE
REGISTERS
X
Y
Z
ALU
STATUS
REGISTER
PA0 - PA7PF0 - PF7
PORTA DRIVERS
DATA DIR.
REG. PORTA
8-BIT DATA BUS
INTERNAL
OSCILLATOR
WATCHDOG
TIMER
MCU CONTROL
REGISTER
TIMER/
COUNTERS
INTERRUPT
UNIT
EEPROM
PORTC DRIVERS
DATA REGISTER
PORTC
CALIB. OSC
OSCILLATOR
TIMING AND
CONTROL
PC0 - PC7
DATA DIR.
REG. PORTC
CONTROLLER/
LCD
DRIVER
XTAL1
XTAL2
RESET
4
PJ0 - PJ6
PORTJ DRIVERS
PORTJ
DATA REGISTER
ANALOG
COMPARATOR
DATA REGISTER
+
-
USART
PORTE
UNIVERSAL
SERIAL INTERFACE
REG. PORTE
PORTE DRIVERS
DATA DIR.
DATA REGISTER
PORTB
PORTB DRIVERS
PB0 - PB7PE0 - PE7
DATA DIR.
REG. PORTB
SPI
DATAREGISTER
PORTD
PORTD DRIVERS
PD0 - PD7
DATA DIR.
REG. PORTD
DATAREG.
PORTG
PORTG DRIVERS
DATA DIR.
REG. PORTG
PG0 - PG4
2552JS–AVR–08/07
ATmega329/3290/649/6490
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 ATmega329/3290/649/6490 provides the following features: 32/64K bytes of In-System
Programmable Flash with Read-While-Write capabilities, 1/2K bytes EEPROM, 2/4K byte
SRAM, 54/69 general purpose I/O lines, 32 general purpose working registers, a JTAG interface
for Boundary-scan, On-chip Debugg ing support and program ming, a complete On-chip L CD
controller with internal contrast control, three flexible Time r/Counters wit h compa re modes, in ternal and external interrupts, a serial programmable USART, Universal Serial Interface with Start
Condition Detector, an 8-channel, 10-bit ADC, a programmable Watchdog Timer with internal
Oscillator, an SPI serial port, and five software selectable power saving modes. The Idle mode
stops the CPU while 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 and the LCD controller continues to run, allowing the user to maintain a
timer base and operate the LCD display while the rest of the device is sleeping. The ADC Noise
Reduction mode stops the CPU and all I/O modules except asynchronous timer, LCD controller
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.
The device is manufactured using Atmel’s high density non-volatile memory technology. The
On-chip In-System re-Programmable (ISP) Flash allows the program memory to be reprogrammed In-System through an SPI serial interface, by a conventional non-volatile memory
programmer, or by an On-chip Boot program running on the AVR core. The Bo ot 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 ATmega329/3290/649/6490 is a powerful microcontroller that provides a highly flexible and cost effective solut ion to many embed ded
control applications.
The ATmega329/3290/649/6490 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.
2552JS–AVR–08/07
5
ATmega329/3290/649/6490
3.2Comparison between ATmega329, ATmega3290, ATmega649 and ATmega6490
The ATmega329, ATmega3290, ATmega649, and ATmega6490 differs only in memory sizes,
pin count and pinout. Table 3-1 on page 6 summarizes the different configurations for the four
devices.
Table 3-1.Configuration Summary
DeviceFlashEEPROMRAM
ATmega32932K bytes1K bytes2K bytes4 x 2554
ATmega329032K bytes1K bytes2K bytes4 x 4069
ATmega64964K bytes2K bytes4K bytes4 x 2554
ATmega649064K bytes2K bytes4K bytes4 x 4069
3.3Pin Descriptions
The following section describes the I/O-pin special funct ion s.
3.3.1V
3.3.2GND
3.3.3Port A (PA7..PA0)
CC
Digital supply voltage.
Ground.
Port A is 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 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.
LCD
Segments
General Purpose
I/O Pins
Port A also serves the function s of various special features of the ATmega329/3290/649/6490
as listed on page 67.
3.3.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 has better driving capabilities than the other ports.
Port B also serves the function s of various special features of the ATmega329/3290/649/6490
as listed on page 68.
6
2552JS–AVR–08/07
3.3.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.
Port C also serves the functions of special features of the ATmega329/3290/649/6490 as listed
on page 71.
3.3.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 ATmega329/3290/649/6490
as listed on page 73.
ATmega329/3290/649/6490
3.3.7Port E (PE7..PE0)
Port E is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port E output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port E pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port E pins are tri-stated when a reset co ndition becomes active,
even if the clock is not running.
Port E also serves the function s of various special features of the ATmega329/3290/649/6490
as listed on page 75.
3.3.8Port F (PF7..PF0)
Port F serves as the analog inputs to the A/D Converter.
Port F also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins
can provide internal pull-up resistors (selected for each bit) . The Por t F outpu t buffers ha ve symmetrical drive characteristics with both high sink and source capability. As inputs, Port F pins
that are externally pulled low will source current if the pull-up resistors are activated. The Port F
pins are tri-stated when a res et cond ition beco mes a ctive, ev en if th e clock is not ru nning. If the
JTAG interface is enabled, the pull-up resistors on pins PF7(TDI), PF5(TMS), and PF4(TCK) will
be activated even if a reset occurs.
Port F also serves the functions of the JTAG interface.
2552JS–AVR–08/07
7
ATmega329/3290/649/6490
3.3.9Port G (PG5..PG0)
Port G is a 6-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port G output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port G pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port G pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port G also serves the functions of various specia l features of the ATmega3 29/3290/649/6490
as listed on page 75.
3.3.10Port H (PH7..PH0)
Port H is a 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port H output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port H pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port H pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port H also serves the functions of various special features of the ATmega3290/6490 as listed
on page 75.
3.3.11Port J (PJ6..PJ0)
Port J is a 7-bit bi-directional I/O port with internal pull-up re sistors (selected for each bit). The
Port J output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port J pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port J pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
3.3.12RESET
3.3.13XTAL1
3.3.14XTAL2
3.3.15AVCC
3.3.16AREF
Port J also serves the functions of various special features of the ATmega3290/64 90 as listed on
page 75.
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 330. Shorter pulses are not guaranteed to generate a reset.
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
Output from the inverting Oscillator amplifier.
AVCC is the supply voltage pin for Port F and the A/D Converter. It should be externally connected to V
, even if the ADC is not used. If the ADC is used, it should be connected to V
CC
CC
through a low-pass filter.
This is the analog reference pin for the A/D Converter.
8
2552JS–AVR–08/07
3.3.17LCDCAP
4.Resources
5.Data Retention
ATmega329/3290/649/6490
An external capacitor (typical > 470 nF) must be connected to the LCDCAP pin as shown in Fig-
ure 24-2. This capacitor acts as a reservoir for LCD power (V
ripple on V
A comprehensive set of development tools, application notes and datasheets are available for
download on http://www.atmel.com/avr.
Note:1.
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.
but increases the time until V
LCD
reaches its target value.
LCD
). A large capacitance reduces
LCD
2552JS–AVR–08/07
9
ATmega329/3290/649/6490
6.Register Summary
Note:Registers with bold type only available in ATmega3290/6490.
PORTAPORTA7PORTA6PORTA5PO RTA4PORTA3PORTA2PORTA 1P ORTA 087
DDRADDA7DDA6DDA5DDA4DDA3DDA2DDA1DDA087
PINAPINA7PINA6PINA5PINA4PINA3PINA2PINA1PINA087
----EERIEEEMWEEEWEEERE22
---INT055
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 operate on 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.
4. When using the I/O specific commands IN and OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O
Registers as data space using LD and ST instructions, 0x20 must be added to these addresses. The
ATmega329/3290/649/6490 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 0x60 - 0xFF in SRAM, only
the ST/STS/STD and LD/LDS/LDD instructions can be used.
2552JS–AVR–08/07
13
ATmega329/3290/649/6490
7.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 + 1None3
ICALLIndirect Call to (Z)PC ← ZNone3
CALLkDirect Subroutine Call PC ← kNone4
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 + 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
14
2552JS–AVR–08/07
ATmega329/3290/649/6490
MnemonicsOperandsDescriptionOperationFlags#Clocks
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) ← 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
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 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)Non e2
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
SPMStore Program Memory(Z) ← R1:R0None-
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
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.
3. For Speed vs. V
see Figure 29-1 on page 328 and Figure 29-2 on page 328.
CC
(1)
Operational Range
Industrial
0°C to 85°C)
(-4
Industrial
0°C to 85°C)
(-4
Package Type
64A64-lead, 14 x 14 x 1.0 mm, Thin Profile Plastic Quad Flat Package (TQFP)
64M164-pad, 9 x 9 x 1.0 mm, Quad Flat No-Lead/Micro Lead Frame Pack age (QFN/MLF)
100A100-lead, 14 x 14 x 1.0 mm, 0.5 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
2552JS–AVR–08/07
17
ATmega329/3290/649/6490
8.2ATmega3290
Speed (MHz)
Notes: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 alternative, complies to the European Directive for Restriction of Hazardous Substances (RoHS direc-
3. For Speed vs. VCC see Figure 29-1 on page 328 and Figure 29-2 on page 328.
(3)
81.8 - 5.5V
162.7 - 5.5V
and minimum quantities.
tive). Also Halide free and fully Green.
Power SupplyOrdering CodePackage Type
ATmega3290V -8AI
ATmega3290V-8AU
ATmega3290-16AI
ATmega3290-16AU
(2)
(2)
100A
100A
100A
100A
(1)
Operational Range
Industrial
0°C to 85°C)
(-4
Industrial
(-4
0°C to 85°C)
64A64-lead, 14 x 14 x 1.0 mm, Thin Profile Plastic Quad Flat Package (TQFP)
64M164-pad, 9 x 9 x 1.0 mm, Quad Flat No-Lead/Micro Lead Frame Pack age (QFN/MLF)
100A100-lead, 14 x 14 x 1.0 mm, 0.5 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
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.
3. For Speed vs. V
see Figure 29-1 on page 328 and Figure 29-2 on page 328.
CC
(1)
Operational Range
Industrial
0°C to 85°C)
(-4
Industrial
(-40°C to 85°C)
Package Type
64A64-lead, 14 x 14 x 1.0 mm, Thin Profile Plastic Quad Flat Package (TQFP)
64M164-pad, 9 x 9 x 1.0 mm, Quad Flat No-Lead/Micro Lead Frame Pack age (QFN/MLF)
100A100-lead, 14 x 14 x 1.0 mm, 0.5 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
2552JS–AVR–08/07
19
ATmega329/3290/649/6490
8.4ATmega6490
Speed (MHz)
Notes: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 alternative, complies to the European Directive for Restriction of Hazardous Substances (RoHS direc-
3. For Speed Grades see Figure 29-1 on page 328 and Figure 29-2 on page 328.
(3)
81.8 - 5.5V
162.7 - 5.5V
and minimum quantities.
tive). Also Halide free and fully Green.
Power SupplyOrdering CodePackage Type
ATmega6490V -8AI
ATmega6490V-8AU
ATmega6490-16AI
ATmega6490-16AU
(2)
(2)
100A
100A
100A
100A
(1)
Operational Range
Industrial
0°C to 85°C)
(-4
Industrial
(-4
0°C to 85°C)
64A64-lead, 14 x 14 x 1.0 mm, Thin Profile Plastic Quad Flat Package (TQFP)
64M164-pad, 9 x 9 x 1.0 mm, Quad Flat No-Lead/Micro Lead Frame Pack age (QFN/MLF)
100A100-lead, 14 x 14 x 1.0 mm, 0.5 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
20
Package Type
2552JS–AVR–08/07
9.Packaging Information
9.164A
PIN 1
PIN 1 IDENTIFIER
ATmega329/3290/649/6490
B
e
E1E
D1
D
C
0°~7°
A1
L
Notes:
1.This package conforms to JEDEC reference MS-026, Variation AEB.
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
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A – – 1.20
A1 0.05 – 0.15
A2 0.95 1.00 1.05
D 15.75 16.00 16.25
D1 13.90 14.00 14.10 Note 2
E 15.75 16.00 16.25
E1 13.90 14.00 14.10 Note 2
B 0.30 – 0.45
C 0.09 – 0.20
L 0.45 – 0.75
e 0.80 TYP
MIN
NOM
MAX
NOTE
2552JS–AVR–08/07
2325 Orchard Parkway
R
San Jose, CA 95131
TITLE
64A, 64-lead, 14 x 14 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.
64A
REV.
B
21
ATmega329/3290/649/6490
9.264M1
D
Marked Pin# 1 ID
E
SEATING PLANE
C
TOP VIEW
A1
A
K
L
D2
E2
K
b
e
BOTTOM VIEW
1. JEDEC Standard MO-220, (SAW Singulation) Fig. 1, VMMD.
Note:
2. Dimension and tolerance conform to ASMEY14.5M-1994.
Pin #1 Corner
1
2
3
Option A
Option B
Option C
Pin #1
Triangle
Pin #1
Chamfer
(C 0.30)
Pin #1
Notch
(0.20 R)
SIDE VIEW
SYMBOL
A 0.80 0.90 1.00
A1 – 0.02 0.05
b 0.180.250.30
D
D2 5.205.405.60
E
E2 5.205.405.60
e 0.50 BSC
L0.35 0.40 0.45
K1.251.401.55
0.08
C
COMMON DIMENSIONS
(Unit of Measure = mm)
MIN
8.909.009.10
8.909.009.10
NOM
MAX
NOTE
2325 Orchard Parkway
R
San Jose, CA 95131
TITLE
64M1, 64-pad, 9 x 9 x 1.0 mm Body, Lead Pitch 0.50 mm,
5.40 mm Exposed Pad, Micro Lead Frame Package (MLF)
22
5/25/06
DRAWING NO.
64M1
REV.
G
2552JS–AVR–08/07
9.3100A
ATmega329/3290/649/6490
PIN 1
B
PIN 1 IDENTIFIER
e
E1E
D1
D
C
0˚~7˚
A1
L
Notes:1. This package conforms to JEDEC reference MS-026, Variation AED.
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.08 mm maximum.
A2A
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A––1.20
A10.05–0.15
A2 0.951.001.05
D15.7516.0016.25
D113.9014.0014.10Note 2
E15.7516.0016.25
E113.9014.0014.10Note 2
B 0.17–0.27
C0.09–0.20
L0.45– 0.75
e0.50 TYP
MIN
NOM
MAX
NOTE
2552JS–AVR–08/07
2325 Orchard Parkway
R
San Jose, CA 95131
TITLE
100A, 100-lead, 14 x 14 mm Body Size, 1.0 mm Body Thickness,
0.5 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
10/5/2001
DRAWING NO.
100A
REV.
C
23
ATmega329/3290/649/6490
10. Errata
10.1ATmega329
10.1.1ATmega329 rev. C
•
1.Interrupts may be lost when writing the timer registers in the asynchronous timer
10.1.2ATmega329 rev. B
Not sampled.
10.1.3ATmega329 rev. A
•
• Interrupts may be lost when writing the timer registers in the asynchronous timer
1.LCD contrast voltage too high
Interrupts may be lost when writing the timer registers in the asynchronous timer
If one of the timer registers which is synchronized to the asynchronous timer2 clock is written in the cycle before a overflow interrupt occurs, the interrupt may be lost.
Problem Fix/Wortkaround
Always check that the Timer2 Timer/Counter register, TCNT2, does not have the value 0xFF
before writing the Timer2 Control Register, TCCR2, or Output Compare Register, OCR2.
LCD contrast volta ge too high
When the LCD is active and using low power wavefor m, the LCD contrast volt age can b e too
high. This occurs when V
Problem Fix/Workaround
There are several possible workarounds:
- Use normal waveform instead of low power waveform
- Use drivetime of 375 µs or longer
is higher than V
CC
, and when using low LCD drivetime.
LCD
24
2.Interrupts may be lost when writing the timer registers in the asynchronous timer
If one of the timer registers which is synchronized to the asynchronous timer2 clock is written in the cycle before a overflow interrupt occurs, the interrupt may be lost.
Problem Fix/Wortkaround
Always check that the Timer2 Timer/Counter register, TCNT2, does not have the value 0xFF
before writing the Timer2 Control Register, TCCR2, or Output Compare Register, OCR2.
2552JS–AVR–08/07
10.2ATmega3290
10.2.1ATmega3290 rev. C
•
Interrupts may be lost when writing the timer registers in the asynchronous timer
1.Interrupts may be lost when writing the timer registers in the asynchronous timer
10.2.2ATmega3290 rev. B
Not sampled.
10.2.3ATmega3290 rev. A
•
LCD contrast volta ge too high
• Interrupts may be lost when writing the timer registers in the asynchronous timer
ATmega329/3290/649/6490
If one of the timer registers which is synchronized to the asynchronous timer2 clock is written in the cycle before a overflow interrupt occurs, the interrupt may be lost.
Problem Fix/Wortkaround
Always check that the Timer2 Timer/Counter register, TCNT2, does not have the value 0xFF
before writing the Timer2 Control Register, TCCR2, or Output Compare Register, OCR2.
1.LCD contrast voltage too high
When the LCD is active and using low power wavefor m, the LCD contrast volt age can b e too
high. This occurs when V
is higher than V
CC
, and when using low LCD drivetime.
LCD
Problem Fix/Workaround
There are several possible workarounds:
- Use normal waveform instead of low power waveform
- Use drivetime of 375 µs or longer
2.Interrupts may be lost when writing the timer registers in the asynchronous timer
If one of the timer registers which is synchronized to the asynchronous timer2 clock is written in the cycle before a overflow interrupt occurs, the interrupt may be lost.
Problem Fix/Wortkaround
Always check that the Timer2 Timer/Counter register, TCNT2, does not have the value 0xFF
before writing the Timer2 Control Register, TCCR2, or Output Compare Register, OCR2.
2552JS–AVR–08/07
25
ATmega329/3290/649/6490
10.3ATmega649
10.3.1ATmega649 rev. A
•
Interrupts may be lost when writing the timer registers in the asynchronous timer
1.Interrupts may be lost when writing the timer registers in the asynchronous timer
10.4ATmega6490
10.4.1ATmega6490 rev. A
Interrupts may be lost when writing the timer registers in the asynchronous timer
•
1.Interrupts may be lost when writing the timer registers in the asynchronous timer
If one of the timer registers which is synchronized to the asynchronous timer2 clock is written in the cycle before a overflow interrupt occurs, the interrupt may be lost.
Problem Fix/Wortkaround
Always check that the Timer2 Timer/Counter register, TCNT2, does not have the value 0xFF
before writing the Timer2 Control Register, TCCR2, or Output Compare Register, OCR2.
If one of the timer registers which is synchronized to the asynchronous timer2 clock is written in the cycle before a overflow interrupt occurs, the interrupt may be lost.
Problem Fix/Wortkaround
Always check that the Timer2 Timer/Counter register, TCNT2, does not have the value 0xFF
before writing the Timer2 Control Register, TCCR2, or Output Compare Register, OCR2.
26
2552JS–AVR–08/07
11. Datasheet Revision History
Please note that the referring page numbers in this section are referring to this document.The
referring revision in this section are referring to the document revision.
11.1Rev. 2552J – 08/07
1.Updated “Features” on page 1.
2.Added “Data Retention” on page 9.
3.Updated “Serial Programming Algorithm” on page 309.
4.Updated “Speed Grades” on page 328.
5.Updated “System and Reset Characteristics” on page 330.
6.Moved Register Descriptions to the end of each chapter.
11.2Rev. 2552I – 04/07
ATmega329/3290/649/6490
1.Updated date in backpage
2.Updated column in Table 29-5 on page 330.
11.3Rev. 2552H – 11/06
1.Updated Table 29-7 on page 333.
2.Updated note in Table 29-7 on page 333 and Table 29-2 on page 329.
11.4Rev. 2552G – 07/06
1.Updated Table 15-2 on page 104, Table 15-4 on page 104, Table 17-3 on
2.Updated “Fast PWM Mode” on page 124.
3.Updated Features in “USI – Universal Serial Interface” on page 195.
4.Added “Clock speed considerations.” on page 202.
5.“Errata” on page 24.
11.5Rev. 2552F – 06/06
page 133, Table 17-5 on page 134, Table 17-5 on page 134, Table 18-2 on
page 153 and Table 18-4 on page 154.
2552JS–AVR–08/07
1.Updated “Calibrated Internal RC Oscillator” on page 29.
2.Updated “OSCCAL – Oscillator Calibration Register” on page 32
3.Added Table 29-2 on page 329.
27
ATmega329/3290/649/6490
11.6Rev. 2552E – 04/06
1.Updated “Calibrated Internal RC Oscillator” on page 29.
11.7Rev. 2552D – 03/06
1.Updated “Errata” on page 24.
11.8Rev. 2552C – 03/06
1.Added “Resources” on page 9.
2.Added Addresses in Registers.
3.Updated number of General Purpose I/O pins.
4.Updated code example in “Bit 0 – IVCE: Interrupt Vector Change Enable”
5.Updated Introduction in “I/O-Ports” on page 59.
6.Updated “SPI – Serial Peripheral Interface” on page 158.
7.Updated “Bit 6 – ACBG: Analog Comparator Bandgap Select” on page
8.Updated Features in “Analog to Digital Converter” on page 211.
9.Updated “Prescaling and Conversion Timing” on page 214.
10.Updated features in “LCD Controller” on page 228.
11.Updated “ATmega329/3290/649/6490 Boot Loader Parameters” on page
12.Updated “DC Characteristics” on page 310.
13.Updated “LCD Controller Characteristics – Preliminary Data – TBD” on
on page 53.
209.
290.
page 334.
11.9Rev. 2552B – 05/05
1.MLF-package alternative changed to “Q uad Flat No-Lead/Micro Lead
2.Added “Pin Change Interrupt Timing” on page 54.
3.Updated Table 24-6 on page 242, Table 24-7 on page 243 and Table 28-15
4.Added Figure 28-12 on page 312.
5.Updated Figure 23-9 on page 219 and Figure 28-5 on page 304.
6.Updated algorithm “Enter Programming Mode” on page 299.
7.Added “Supply Current of I/O modules” on page 340.
8.Updated “Ordering Information” on page 17.
11.10 Rev. 2552A –11/04
1.Initial version.
28
Frame Package QFN/MLF”.
on page 310.
2552JS–AVR–08/07
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.