Spark Logic

ATmega1284 / ATmega1284P / ATmega644 / ATmega32 pinout

Package pin assignments for ATmega1284, ATmega1284P, ATmega644, ATmega32, with peripheral signals, clock grades and a serial programming guide.

TQFP-44 44 contacts
PDIP-40 40 contacts

QFN-44

45 contacts Current package

Microchip Technology · 44 numbered contacts. The underside pad appears below the contact map. See the individual package drawings for footprint dimensions.

64 KiB flash · 4 KiB SRAM · 2 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.

QFN-44 pinout

Top view · Pin 1 at the upper left · Schematic outline
EP is the exposed center pad on the underside.
Selected pin details

4 · RESET

Input · Reset / preset

Active-low reset input. The in-system programmer uses this pin to enter serial programming mode.

2593O · Pinout and peripheral signal descriptions

Electrical limits · Link to this pin

All 45 pins

PinSignalDirectionFunction
1PB5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT13 (EXINT), MOSI (SPI).
2PB6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT14 (EXINT), MISO (SPI).
3PB7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT15 (EXINT), SCK (SPI).
4RESET InputInput Active-low reset input. The in-system programmer uses this pin to enter serial programming mode.
5VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
6GND ReturnReturn Supply return. Connect every ground pin.
7XTAL2 OutputOutput Oscillator amplifier output. Follow the selected clock mode before attaching a circuit.
8XTAL1 InputInput Oscillator amplifier input or external clock input, depending on clock fuses.
9PD0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: RXD (USART0), PCINT24 (EXINT).
10PD1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TXD (USART0), PCINT25 (EXINT).
11PD2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT26 (EXINT), INT0 (EXINT).
12PD3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT27 (EXINT), INT1 (EXINT).
13PD4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT28 (EXINT), OCB (TC1).
14PD5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT29 (EXINT), OCA (TC1).
15PD6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ICP (TC0), OCB (TC2), PCINT30 (EXINT), ICP (TC1).
16PD7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC2), PCINT31 (EXINT).
17VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
18GND ReturnReturn Supply return. Connect every ground pin.
19PC0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT16 (EXINT), SCL (TWI).
20PC1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT17 (EXINT), SDA (TWI).
21PC2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TCK (JTAG), PCINT18 (EXINT).
22PC3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TMS (JTAG), PCINT19 (EXINT).
23PC4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TDO (JTAG), PCINT20 (EXINT).
24PC5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TDI (JTAG), PCINT21 (EXINT).
25PC6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT22 (EXINT).
26PC7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT23 (EXINT).
27AVCC SupplySupply Analog supply. Connect it to the supply even if analog conversion is unused. Follow the data sheet’s filtering guidance for precision conversion.
28GND ReturnReturn Supply return. Connect every ground pin.
29AREF Analog referenceAnalog reference ADC voltage reference terminal. Check the reference selection before driving this pin from an external voltage.
30PA7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT7 (EXINT), ADC7 (ADC).
31PA6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT6 (EXINT), ADC6 (ADC).
32PA5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT5 (EXINT), ADC5 (ADC).
33PA4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT4 (EXINT), ADC4 (ADC).
34PA3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT3 (EXINT), ADC3 (ADC).
35PA2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT2 (EXINT), ADC2 (ADC).
36PA1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT1 (EXINT), ADC1 (ADC).
37PA0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT0 (EXINT), ADC0 (ADC).
38VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
39GND ReturnReturn Supply return. Connect every ground pin.
40PB0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: XCK (USART0), T (TC0), PCINT8 (EXINT).
41PB1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT9 (EXINT), T (TC1), CLKO0 (CPU).
42PB2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN0 (AC), PCINT10 (EXINT), INT2 (EXINT).
43PB3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN1 (AC), OCA (TC0), PCINT11 (EXINT).
44PB4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC0), PCINT12 (EXINT), SS (SPI).
EPEP Ground padGround pad Solder the exposed center pad to ground as shown in the package pinout notes. Connect the numbered ground contacts too.

Signal assignments

Analog comparator

Review each signal assignment and the peripheral enable conditions in the data sheet. AIN0 → PB2 · AIN1 → PB3

USART0 · Serial

Use TXD and RXD for asynchronous serial. XCK is for synchronous mode. The signal levels follow the microcontroller supply domain. TXD → PD1 · RXD → PD0 · XCK → PB0

Timer/Counter 0

Review each signal assignment and the peripheral enable conditions in the data sheet. T → PB0 · OCB → PB4 · OCA → PB3 · ICP → PD6

Timer/Counter 2

Review each signal assignment and the peripheral enable conditions in the data sheet. OCA → PD7 · OCB → PD6

JTAG

Check the JTAG fuse and enable state before using the pins for GPIO. JTAG uses TCK, TMS, TDI and TDO. TCK → PC2 · TMS → PC3 · TDO → PC4 · TDI → PC5

External interrupts

Review each signal assignment and the peripheral enable conditions in the data sheet. PCINT0 → PA0 · PCINT1 → PA1 · PCINT2 → PA2 · PCINT3 → PA3 · PCINT4 → PA4 · PCINT5 → PA5 · PCINT6 → PA6 · PCINT7 → PA7 · PCINT8 → PB0 · PCINT9 → PB1 · PCINT10 → PB2 · INT2 → PB2 · PCINT11 → PB3 · PCINT12 → PB4 · PCINT13 → PB5 · PCINT14 → PB6 · PCINT15 → PB7 · PCINT16 → PC0 · PCINT17 → PC1 · PCINT18 → PC2 · PCINT19 → PC3 · PCINT20 → PC4 · PCINT21 → PC5 · PCINT22 → PC6 · PCINT23 → PC7 · PCINT24 → PD0 · PCINT25 → PD1 · PCINT26 → PD2 · INT0 → PD2 · PCINT27 → PD3 · INT1 → PD3 · PCINT28 → PD4 · PCINT29 → PD5 · PCINT30 → PD6 · PCINT31 → PD7

Analog-to-digital converter

Select the analog channel and reference in firmware. The reference choice and supply constrain the input range. ADC0 → PA0 · ADC1 → PA1 · ADC2 → PA2 · ADC3 → PA3 · ADC4 → PA4 · ADC5 → PA5 · ADC6 → PA6 · ADC7 → PA7

Timer/Counter 1

Review each signal assignment and the peripheral enable conditions in the data sheet. T → PB1 · ICP → PD6 · OCA → PD5 · OCB → PD4

TWI / I²C

Connect SDA and SCL to the bus with pull-ups to a voltage supported by all devices. Verify the pull-up value for the bus capacitance and rate. SDA → PC1 · SCL → PC0

SPI peripheral

Use SCK, MOSI, MISO and a chip-select line. Firmware selects direction and clock phase. Check the separate ISP mapping when programming. SS → PB4 · MOSI → PB5 · MISO → PB6 · SCK → PB7

System clock

Review each signal assignment and the peripheral enable conditions in the data sheet. CLKO0 → PB1

Electrical limits

ParameterLimitConditions and source
Program flash64 KiB64 KiB Nonvolatile program memory. 2593O · Memory
SRAM4 KiB4 KiB Volatile data and stack storage. 2593O · Memory
EEPROM2 KiB2 KiB Nonvolatile data storage. 2593O · Memory
Clock and supplyOrder-code dependentOrder-code dependent Use the grade table and the device’s speed-versus-voltage curve. 2593O · Electrical Characteristics

Models and documents

Each package lists the documented order codes and variants covered by this map. Select the marked model to see its peripheral assignments and memory. Check the exact order code and datasheet revision before laying out a PCB.

ATmega1284
128 KiB flash · 16 KiB SRAM · 4 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega1284-MU
128 KiB flash · 16 KiB SRAM · 4 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega1284-MUR
128 KiB flash · 16 KiB SRAM · 4 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega1284P
128 KiB flash · 16 KiB SRAM · 4 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega1284P-MU
128 KiB flash · 16 KiB SRAM · 4 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega1284P-MUR
128 KiB flash · 16 KiB SRAM · 4 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega644
64 KiB flash · 4 KiB SRAM · 2 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega644V-10MU
64 KiB flash · 4 KiB SRAM · 2 KiB EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATmega644-20MU
64 KiB flash · 4 KiB SRAM · 2 KiB EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega32
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega32L-8MU
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +85 °C
ATmega32L-8MUR
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +85 °C
ATmega32-16MU
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C
ATmega32-16MUR
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C