ATmega32A Summary
ATmega32A Summary
ATmega32A
DATASHEET SUMMARY
Introduction
®
The Atmel ATmega32A 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 ATmega32A achieves throughputs close to
1MIPS per MHz. This empowers system designer to optimize the device for
power consumption versus processing speed.
Features
• High-performance, Low-power Atmel AVR 8-bit Microcontroller
• Advanced RISC Architecture
– 131 Powerful Instructions - Most Single-clock Cycle Execution
– 32 × 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16MIPS Throughput at 16MHz
– On-chip 2-cycle Multiplier
• High Endurance Non-volatile Memory segments
– 32Kbytes of In-System Self-programmable Flash program
memory
– 1024Bytes EEPROM
– 2Kbytes 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
• JTAG (IEEE std. 1149.1 Compliant) Interface
– Boundary-scan Capabilities According to the JTAG Standard
This is a summary document. A – Extensive On-chip Debug Support
complete document is available – Programming of Flash, EEPROM, Fuses and Lock Bits through
on our Web site at the JTAG Interface
www.atmel.com • Atmel QTouch® library support
Atmel-8155I-ATmega32A_Datasheet_Summary-08/2016
– Capacitive touch buttons, sliders and wheels
– Atmel QTouch and QMatrix acquisition
– Up to 64 sense channels
• 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
– Four PWM Channels
– 8-channel, 10-bit ADC
• 8 Single-ended Channels
• 7 Differential Channels in TQFP Package Only
• 2 Differential Channels with Programmable Gain at 1x, 10x, or 200x
– Byte-oriented Two-wire Serial Interface
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Programmable Watchdog Timer with On-chip Oscillator
– On-chip Analog Comparator
• 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, and 44-pad QFN/MLF
• Operating Voltages
– 2.7 - 5.5V
• Speed Grades
– 0 - 16MHz
• Power Consumption at 1MHz, 3V, 25°C
– Active: 0.6mA
– Idle Mode: 0.2mA
– Power-down Mode: < 1μA
Introduction......................................................................................................................1
Features.......................................................................................................................... 1
1. Description.................................................................................................................4
2. Configuration Summary............................................................................................. 5
3. Ordering Information..................................................................................................6
4. Block Diagram........................................................................................................... 7
5. Pin Configurations..................................................................................................... 8
5.1. VCC............................................................................................................................................... 9
5.2. GND..............................................................................................................................................9
5.3. PortA (PA7:PA0)........................................................................................................................... 9
5.4. Port B (PB7:PB0)........................................................................................................................10
5.5. Port C (PC7:PC0).......................................................................................................................10
5.6. Port D (PD7:PD0).......................................................................................................................10
5.7. RESET........................................................................................................................................10
5.8. XTAL1.........................................................................................................................................10
5.9. XTAL2......................................................................................................................................... 11
5.10. AVCC........................................................................................................................................... 11
5.11. AREF.......................................................................................................................................... 11
6. Resources................................................................................................................12
7. Data Retention.........................................................................................................13
11. Errata....................................................................................................................... 19
11.1. ATmega32A, rev. J to rev. K....................................................................................................... 19
11.2. ATmega32A, rev. G to rev. I........................................................................................................20
1. Description
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 ATmega32A provides the following features: 32Kbytes of In-System Programmable Flash Program
memory with Read-While-Write capabilities, 1024bytes EEPROM, 2048bytes SRAM, 32 general purpose
I/O lines, 32 general purpose working registers, a JTAG interface for Boundary-scan, On-chip Debugging
support and programming, three flexible Timer/Counters with compare modes, Internal and External
Interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit
ADC with optional differential input stage with programmable gain (TQFP package only), a programmable
Watchdog Timer with Internal Oscillator, an SPI serial port, and six software selectable power saving
modes. The Idle mode stops the CPU while allowing the USART, Two-wire interface, A/D Converter,
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
External 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 ATmega32A is a powerful microcontroller that
provides a highly-flexible and cost-effective solution to many embedded control applications.
The Atmel AVR ATmega32A 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.
ATmega32A-AN 44A
ATmega32A-ANR(3) 44A
Extended (-40oC to 105oC)(4)
ATmega32A-MN 44M1
ATmega32A-MNR(3) 44M1
Note:
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.
3. Tape and Reel
4. See characterization specifications at 105°C
Package Type
44A 44-lead, 10 × 10 × 1.0mm, Thin Profile Plastic Quad Flat Package (TQFP)
40P6 40-pin, 0.600” Wide, Plastic Dual Inline Package (PDIP)
44M1 44-pad, 7 × 7 × 1.0mm, Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)
SRAM
TCK
TMS
CPU
TDI
JTAG OCD
FLASH
TDO
PARPROG NVM
MOSI programming EEPROM
EEPROMIF
MISO SPIPROG
SCK
Clock generation
XTAL1 D
8MHz 8MHz Power A
Crystal Osc Calib RC
management T
12MHz A PA[7:0]
XTAL2
External External and clock I/O PB[7:0]
B
RC Osc clock control U PORTS PC[7:0]
TOSC1 PD[7:0]
32.768kHz 1MHz int S
XOSC osc
TOSC2
ExtInt INT[2:0]
VCC
Power Watchdog
Supervision Timer
RESET ADC ADC[7:0]
POR/BOD & AREF
GND RESET
Internal AIN0
Reference AC AIN1
ADCMUX
MISO
MOSI
SCK
SPI TC 0 T0
(8-bit sync) OC0
SS
OC1A/B/C
SDA
TWI TC 1 T1
SCL (16-bit)
ICP1
RxD0
TxD0 USART 0 TC 2 OC2
(8-bit async)
XCK0
PB3 (AIN1/OC0)
PB2 (AIN0/ INT2)
PB0 (XCK/T0)
Ground
PA0 (ADC0)
PA1 (ADC1)
PA2 (ADC2)
PA3 (ADC3)
Programming/debug
PB4 (SS)
PB1 (T1)
Digital
GND
VCC
Analog
Crystal/Osc 44
43
42
41
40
39
38
37
36
35
34
(MOSI) PB5 1 33 PA4 (ADC4)
(MISO) PB6 2 32 PA5 (ADC5)
(SCK) PB7 3 31 PA6 (ADC6)
RESET 4 30 PA7 (ADC7)
VCC 5 29 AREF
GND 6 28 GND
XTAL2 7 27 AVCC
XTAL1 8 26 PC7 (TOSC2)
(RXD) PD0 9 25 PC6 (TOSC1)
(TXD) PD1 10 24 PC5 (TDI)
(INT0) PD2 11 23 PC4 (TDO)
12
13
14
15
16
17
18
19
20
21
22
(INT1) PD3
(OC1B) PD4
(OC1A) PD5
GND
(ICP1) PD6
(OC2) PD7
VCC
(SCL) PC0
(SDA) PC1
(TCK) PC2
(TMS) PC3
AIN0/ INT2
5.1. VCC
Digital supply voltage.
5.2. GND
Ground.
5.7. RESET
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. Shorter
pulses are not guaranteed to generate a reset.
5.8. XTAL1
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
5.10. AVCC
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC,
even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.
5.11. AREF
AREF is the analog reference pin for the A/D Converter.
P IN 1 IDENTIFIER
P IN 1
e B
E1 E
D1
D
C 0°~7°
A1 A2 A
L
COMMON DIMENS IONS
(Unit of Me a s ure = mm)
06/02/2014
D
PIN
1
E1
SEATING PLANE
A1
L
B
B1
e
E
COMMON DIMENSIONS
0º ~ 15º REF (Unit of Measure = mm)
C
SYMBOL MIN NOM MAX NOTE
eB A – – 4.826
A1 0.381 – –
D 52.070 – 52.578 Note 2
E 15.240 – 15.875
E1 13.462 – 13.970 Note 2
B 0.356 – 0.559
B1 1.041 – 1.651
Notes: L 3.048 – 3.556
1. This package conforms to JEDEC reference MS-011, Variation AC. C 0.203 – 0.381
2. Dimensions D and E1 do not include mold Flash or Protrusion.
Mold Flash or Protrusion shall not exceed 0.25mm (0.010"). eB 15.494 – 17.526
e 2.540 TYP
13/02/2014
Marked Pin# 1 I D
SE ATING PLANE
A1
TOP VIEW
A3
A
K
L
Pin #1 Co rne r SIDE VIEW
D2
9/26/08
TITLE GPC DRAWING NO. REV.
Package Drawing Contact: 44M1, 44-pad, 7 x 7 x 1.0mm body, lead
[email protected] pitch 0.50mm, 5.20mm exposed pad, thermally ZWS 44M1 H
enhanced plastic very thin quad flat no
lead package (VQFN)
If the device is powered by a slow rising VCC, the first Analog Comparator conversion will take
longer than
expected on some devices.
Problem Fix/Workaround
When the device has been powered or reset, disable then enable the Analog Comparator before
the first
conversion.
2. Interrupts may be lost when writing the timer registers in the asynchronous timer
The interrupt will be lost if a timer register that is synchronous timer clock is written when the
asynchronous
Timer/Counter register (TCNTx) is 0x00.
Problem Fix/Workaround
Always check that the asynchronous Timer/Counter register neither have the value 0xFF nor 0x00
before writing
to the asynchronous Timer Control Register (TCCRx), asynchronous Timer Counter Register
(TCNTx), or
asynchronous Output Compare Register (OCRx).
3. IDCODE masks data from TDI input
The JTAG instruction IDCODE is not working correctly. Data to succeeding devices are replaced by
all-ones
during Update-DR.
• If ATmega32A is the only device in the scan chain, the problem is not visible.
• Select the Device ID Register of the ATmega32A by issuing the IDCODE instruction or by
entering the Test-Logic-Reset state of the TAP controller to read out the contents of its Device
ID Register and possibly data from succeeding devices of the scan chain. Issue the BYPASS
instruction to the ATmega32A while reading the Device ID Registers of preceding devices of
the boundary scan chain.
• If the Device IDs of all devices in the boundary scan chain must be captured simultaneously,
the ATmega32A must be the fist device in the chain.
4. Reading EEPROM by using ST or STS to set EERE bit triggers unexpected interrupt request.
If the device is powered by a slow rising VCC, the first Analog Comparator conversion will take
longer than
expected on some devices.
Problem Fix/Workaround
When the device has been powered or reset, disable then enable the Analog Comparator before
the first
conversion.
2. Interrupts may be lost when writing the timer registers in the asynchronous timer
The interrupt will be lost if a timer register that is synchronous timer clock is written when the
asynchronous
Timer/Counter register (TCNTx) is 0x00.
Problem Fix/Workaround
Always check that the asynchronous Timer/Counter register neither have the value 0xFF nor 0x00
before writing
to the asynchronous Timer Control Register (TCCRx), asynchronous Timer Counter Register
(TCNTx), or
asynchronous Output Compare Register (OCRx).
3. IDCODE masks data from TDI input
The JTAG instruction IDCODE is not working correctly. Data to succeeding devices are replaced by
all-ones
during Update-DR.
– If ATmega32A is the only device in the scan chain, the problem is not visible.
– Select the Device ID Register of the ATmega32A by issuing the IDCODE instruction or by
entering the Test-Logic-Reset state of the TAP controller to read out the contents of its Device
ID Register and possibly data from succeeding devices of the scan chain. Issue the BYPASS
instruction to the ATmega32A while reading the Device ID Registers of preceding devices of
the boundary scan chain.
Reading EEPROM by using the ST or STS command to set the EERE bit in the EECR register
triggers an
unexpected EEPROM interrupt request.
® ® ®
Atmel , Atmel logo and combinations thereof, Enabling Unlimited Possibilities , AVR , and others are registered trademarks or trademarks of Atmel Corporation in
U.S. and other countries. Other terms and product names may be trademarks of others.
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 in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND
CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, 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 INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS
INTERRUPTION, 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 products descriptions at any time without notice. Atmel does not make any commitment to
update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive
applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.
SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any
applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without
an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the
operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments
unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically
designated by Atmel as automotive-grade.
Mouser Electronics
Authorized Distributor
Microchip:
ATMEGA32A-MUR ATMEGA32A-AUR ATMEGA32A-AN ATMEGA32A-ANR ATMEGA32A-MN ATMEGA32A-MNR
ATMEGA32A-PN ATMEGA32A-PU ATMEGA32A-AU ATMEGA32A-MU