Features
•
High-performance, Low-power AVR
®
8-bit Microcontroller
•
Advanced RISC Architecture
– 131 Powerful Instructions – Most Single-clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On-chip 2-cycle Multiplier
Nonvolatile Program and Data Memories
– 16/32/64K Bytes of In-System Self-Programmable Flash
Endurance: 10,000 Write/Erase Cycles
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– 512B/1K/2K Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
– 1/2/4K Bytes Internal SRAM
– 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
(1)
– Byte-oriented Two-wire Serial Interface
– Two 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 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
– 44-lead TQFP, and 44-pad QFN/MLF
Operating Voltages
– 2.7 - 5.5V for ATmega164P/324P/644P
Speed Grades
– ATmega164P/324P/644P: 0 - 8MHz @ 2.7 - 5.5V, 0 - 16MHz @ 4.5 - 5.5V
Power Consumption at 8 MHz, 5V, 25⋅C for ATmega644P
– Active mode: 8 mA
– Idle mode: 2.4 mA
– Power-down Mode: 0.8 µA
1. Differential Mode is not recommended above 85°C.
•
•
•
8-bit
Microcontroller
with 16/32/64K
Bytes In-System
Programmable
Flash
ATmega164P
ATmega324P
ATmega644P
Automotive
•
•
•
•
•
Summary
Notes:
7674DS–AVR–08/08
1. Pin Configurations
Figure 1-1.
Pinout ATmega164P/324P/644P
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/MOSI) PB5
(PCINT14/MISO) PB6
(PCINT15/SCK) PB7
RESET
VCC
GND
XTAL2
XTAL1
(PCINT24/RXD0) PD0
(PCINT25/TXD0) PD1
NT/RXD1/26/INT0) PD2
PA4 (ADC4/PCINT
PA5 (ADC5/PCINT
PA6 (ADC6/PCINT
PA7 (ADC7/PCINT
AREF
GND
AVCC
PC7 (TOSC2/PCIN
PC6 (TOSC1/PCIN
PC5 (TDI/PCINT2
PC4 (TDO/PCINT2
Note:
The large center pad underneath the QFN/MLF package should be soldered to ground on the
board to ensure good mechanical stability.
2
ATmega164P/324P/644P
7674DS–AVR–08/08
(PCINT/TXD1/27/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
ATmega164P/324P/644P
2. Overview
The ATmega164P/324P/644P 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
ATmega164P/324P/644P achieves throughputs approaching 1 MIPS per MHz allowing the sys-
tem designer to optimize power consumption versus processing speed.
2.1
Block Diagram
Block Diagram
Figure 2-1.
PA7..0
VCC
PB7..0
RESET
Power
Supervision
POR / BOD &
RESET
PORT A (8)
PORT B (8)
GND
Watchdog
Timer
Watchdog
Oscillator
A/D
Converter
Analog
Comparator
USART 0
XTAL1
Oscillator
Circuits /
Clock
Generation
EEPROM
Internal
Bandgap reference
SPI
XTAL2
8bit T/C 0
CPU
JTAG/OCD
16bit T/C 1
TWI
FLASH
SRAM
8bit T/C 2
USART 1
PORT C (8)
PORT D (8)
TOSC2/PC7
TOSC1/PC6
PC5..0
PD7..0
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 con-
ventional CISC microcontrollers.
3
7674DS–AVR–08/08
The ATmega164P/324P/644P provides the following features: 16/32/64K bytes of In-System
Programmable Flash with Read-While-Write capabilities, 512B/1K/2K bytes EEPROM, 1/2/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 Oscillator, 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 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 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 modules except Asynchronous 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 On-
chip 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 ATmega164P/324P/644P is a powerful microcontroller that provides a highly flexible
and cost effective solution to many embedded control applications.
The ATmega164P/324P/644P AVR is supported with a full suite of program and system devel-
opment tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit
emulators, and evaluation kits.
2.2
Comparison Between ATmega164P, ATmega324P and ATmega644P
Table 2-1.
Device
ATmega164P
ATmega324P
ATmega644P
Differences between ATmega164P and ATmega644P
Flash
16 Kbyte
32 Kbyte
64 Kbyte
EEPROM
512 Bytes
1 Kbyte
2 Kbyte
RAM
1 Kbyte
2 Kbyte
4 Kbyte
Automotive
Quality Grade
The ATmega164P/324P/644P have been developed and manufactured according to the most
stringent requirements of the international standard ISO-TS-16949. This data sheet contains
limit values extracted from the results of extensive characterization (Temperature and Voltage).
The quality and reliability of the ATmega164P/324P/644P have been verified during regular
product qualification as per AEC-Q100 grade 1.
4
ATmega164P/324P/644P
7674DS–AVR–08/08
ATmega164P/324P/644P
As indicated in the ordering information paragraph, the products are available in three different
temperature grades, but with equivalent quality and reliability objectives. Different temperature
identifiers have been defined as listed in
Table 1.
Table 1.
Temperature Grade Identification for Automotive Products
Temperature
Temperature
Identifier
T
T1
Z
Comments
Similar to Industrial Temperature Grade but with
Automotive Quality
Reduced Automotive Temperature Range
Full AutomotiveTemperature Range
-40 ; +85
-40 ; +105
-40 ; +125
5
7674DS–AVR–08/08