ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P
8-bit Atmel Microcontroller with 16/32/64/128K Bytes
In-System Programmable Flash
DATASHEET
Features
High-performance, low-power 8-bit Atmel
®
AVR
®
Microcontroller
Advanced RISC architecture
̶
131 powerful Instructions – most single-clock cycle execution
̶
32 × 8 general purpose working registers
̶
Fully static operation
̶
Up to 20MIPS throughput at 20MHz
̶
On-chip 2-cycle multiplier
High endurance non-volatile memory segments
̶
16/32/64/128KBytes of In-System Self-programmable Flash program memory
̶
512/1K/2K/4KBytes EEPROM
̶
1/2/4/16KBytes Internal SRAM
̶
Write/Erase Cycles: 10,000 Flash/ 100,000 EEPROM
̶
Data retention: 20 years at 85°C/ 100 years at 25°C
(1)
̶
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
Atmel QTouch
®
library support
̶
Capacitive touch buttons, sliders and wheels
̶
QTouch and QMatrix acquisition
̶
Up to 64 sense channels
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/two 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 1×, 10× or 200×
̶
Byte-oriented Two-wire Serial Interface
̶
Two Programmable Serial USART
̶
Master/Slave SPI Serial Interface
Atmel-8272G-AVR-01/2015
̶
̶
̶
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 Programmable Brown-out Detection
̶
Internal Calibrated RC Oscillator
̶
External and Internal Interrupt Sources
̶
Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby and Extended Standby
I/O and Packages
̶
32 Programmable I/O Lines
̶
40-pin PDIP, 44-lead TQFP, 44-pad VQFN/QFN/MLF
̶
44-pad DRQFN
Operating Voltages
̶
1.8 - 5.5V
Speed Grades
̶
0 - 4MHz @ 1.8 - 5.5V
̶
0 - 10MHz @ 2.7 - 5.5V
̶
0 - 20MHz @ 4.5 - 5.5V
Power Consumption at 1MHz, 1.8V, 25C
̶
Active: 0.4mA
̶
Power-down Mode: 0.1µA
̶
Power-save Mode: 0.6µA (Including 32kHz RTC)
– 49-ball VFBGA
Note:
1. See
”Data retention” on page 9
for details.
ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P [DATASHEET]
Atmel-8272G-AVR-01/2015
2
1.
1.1
Pin configurations
Pinout - PDIP/TQFP/VQFN/QFN/MLF for
ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P
Figure 1-1.
Pinout.
(PCINT8/XCK0/T0) PB0
(PCINT9/CLKO/T1) PB1
(PCINT10/INT2/AIN0) PB2
(PCINT11/OC0A/AIN1) PB3
(PCINT12/OC0B/SS) PB4
(PCINT13/ICP3/MOSI) PB5
(PCINT14/OC3A/MISO) PB6
(PCINT15/OC3B/SCK) PB7
RESET
VCC
GND
XTAL2
XTAL1
(PCINT24/RXD0/T3*) PD0
(PCINT25/TXD0) PD1
(PCINT26/RXD1/INT0) PD2
(PCINT27/TXD1/INT1) PD3
(PCINT28/XCK1/OC1B) PD4
(PCINT29/OC1A) PD5
(PCINT30/OC2B/ICP) PD6
PA0 (ADC0/PCINT0)
PA1 (ADC1/PCINT1)
PA2 (ADC2/PCINT2)
PA3 (ADC3/PCINT3)
PA4 (ADC4/PCINT4)
PA5 (ADC5/PCINT5)
PA6 (ADC6/PCINT6)
PA7 (ADC7/PCINT7)
AREF
GND
AVCC
PC7 (TOSC2/PCINT23)
PC6 (TOSC1/PCINT22)
PC5 (TDI/PCINT21)
PC4 (TDO/PCINT20)
PC3 (TMS/PCINT19)
PC2 (TCK/PCINT18)
PC1 (SDA/PCINT17)
PC0 (SCL/PCINT16)
PD7 (OC2A/PCINT31)
TQFP/QFN/MLF
PB4 (SS/OC0B/PCINT12)
PB3 (AIN1/OC0A/PCINT11)
PB2 (AIN0/INT2/PCINT10)
PB1 (T1/CLKO/PCINT9)
PB0 (XCK0/T0/PCINT8)
GND
VCC
PA0 (ADC0/PCINT0)
PA1 (ADC1/PCINT1)
PA2 (ADC2/PCINT2)
PA3 (ADC3/PCINT3)
(PCINT13/ICP3/MOSI) PB5
(PCINT14/OC3A/MISO) PB6
(PCINT15/OC3B/SCK) PB7
RESET
VCC
GND
XTAL2
XTAL1
(PCINT24/RXD0/T3*) PD0
(PCINT25/TXD0) PD1
(PCINT26/RXD1/INT0) PD2
PA4 (ADC4/PCINT4)
PA5 (ADC5/PCINT5)
PA6 (ADC6/PCINT6)
PA7 (ADC7/PCINT7)
AREF
GND
AVCC
PC7 (TOSC2/PCINT23)
PC6 (TOSC1/PCINT22)
PC5 (TDI/PCINT21)
PC4 (TDO/PCINT20)
Note:
The large center pad underneath the VQFN/QFN/MLF package should be soldered to ground on the board to
ensure good mechanical stability.
ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P [DATASHEET]
Atmel-8272G-AVR-01/2015
(PCINT27/TXD1/INT1)
(PCINT28/XCK1/OC1B)
(PCINT29/OC1A)
(PCINT30/OC2B/ICP)
(PCINT31/OC2A)
PD3
PD4
PD5
PD6
PD7
VCC
GND
(PCINT16/SCL) PC0
(PCINT17/SDA) PC1
(PCINT18/TCK) PC2
(PCINT19/TMS) PC3
*T3 is only available for ATmega1284/1284P
3
1.2
Pinout - DRQFN for Atmel ATmega164A/164PA/324A/324PA
Figure 1-2.
DRQFN - pinout.
Top view
A24
A19
B16
A20
B17
A21
B18
A22
B19
A23
B20
Bottom view
A24
B20
A23
B19
A22
B18
A21
B17
A20
B16
A19
A1
B1
A2
B2
A3
B3
A4
B4
A5
B5
A6
A18
B15
A17
B14
A16
B13
A15
B12
A14
B11
A13
A18
B15
A17
B14
A16
B13
A15
B12
A14
B11
A13
A1
B1
A2
B2
A3
B3
A4
B4
A5
B5
A6
A12
B10
A11
B9
A10
B8
A9
B7
A8
B6
A7
Table 1-1.
A1
B1
A2
B2
A3
B3
A4
B4
A5
B5
A6
DRQFN - pinout.
PB5
PB6
PB7
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
A7
B6
A8
B7
A9
B8
A10
B9
A11
B10
A12
PD3
PD4
PD5
PD6
PD7
VCC
GND
PC0
PC1
PC2
PC3
A13
B11
A14
B12
A15
B13
A16
B14
A17
B15
A18
PC4
PC5
PC6
PC7
AVCC
GND
AREF
PA7
PA6
PA5
PA4
A19
B16
A20
B17
A21
B18
A22
B19
A23
B20
A24
PA3
PA2
PA1
PA0
VCC
GND
PB0
PB1
PB2
PB3
PB4
ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P [DATASHEET]
Atmel-8272G-AVR-01/2015
B8
A10
B9
A11
B10
A12
B6
A7
A8
B7
A9
4
1.3
Pinout - VFBGA for Atmel ATmega164A/164PA/324A/324PA
Figure 1-3.
VFBGA - pinout.
Top view
1
A
B
C
D
E
F
G
2
3
4
5
6
7
7
6
Bottom view
5
4
3
2
1
A
B
C
D
E
F
G
Table 1-2.
BGA - pinout.
1
2
PB4
PB5
RESET
XTAL2
PD1
PD3
PD4
3
PB2
PB3
PB7
PD0
PD5
PD6
VCC
4
GND
PB0
PB1
GND
PD7
PC0
GND
5
VCC
PA0
PA1
PA4
PC5
PC2
PC1
6
PA2
PA3
PA6
PA7
PC7
PC4
PC3
7
GND
PA5
AREF
GND
AVCC
PC6
GND
A
B
C
D
E
F
G
GND
PB6
VCC
GND
XTAL1
PD2
GND
2.
Overview
The Atmel ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P 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 ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P achieves throughputs
approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing
speed.
ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P [DATASHEET]
Atmel-8272G-AVR-01/2015
5