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.

PackageContactsDetails
TQFP-44 44 44 numbered contacts. See the individual package drawings for footprint dimensions.
PDIP-40 40 40 numbered contacts. See the individual package drawings for footprint dimensions.
QFN-44 45 44 numbered contacts. The underside pad appears below the contact map. See the individual package drawings for footprint dimensions.

Microchip Technology

Device variants · TQFP-44

DeviceFlashSRAMEEPROMSupplyMax clockTemperature
ATmega1284 128 KiB 16 KiB 4 KiB — — —
ATmega1284-AU 128 KiB 16 KiB 4 KiB 1.8–5.5 V 20 MHz -40 to +85 °C
ATmega1284-AUR 128 KiB 16 KiB 4 KiB 1.8–5.5 V 20 MHz -40 to +85 °C
ATmega1284P 128 KiB 16 KiB 4 KiB — — —
ATmega1284P-AU 128 KiB 16 KiB 4 KiB 1.8–5.5 V 20 MHz -40 to +85 °C
ATmega1284P-AUR 128 KiB 16 KiB 4 KiB 1.8–5.5 V 20 MHz -40 to +85 °C
ATmega644 64 KiB 4 KiB 2 KiB — — —
ATmega644V-10AU 64 KiB 4 KiB 2 KiB 1.8–5.5 V 10 MHz -40 to +85 °C
ATmega644-20AU 64 KiB 4 KiB 2 KiB 2.7–5.5 V 20 MHz -40 to +85 °C
ATmega32 32 KiB 2 KiB 1 KiB — — —
ATmega32L-8AU 32 KiB 2 KiB 1 KiB 2.7–5.5 V 8 MHz -40 to +85 °C
ATmega32L-8AUR 32 KiB 2 KiB 1 KiB 2.7–5.5 V 8 MHz -40 to +85 °C
ATmega32-16AU 32 KiB 2 KiB 1 KiB 4.5–5.5 V 16 MHz -40 to +85 °C
ATmega32-16AUR 32 KiB 2 KiB 1 KiB 4.5–5.5 V 16 MHz -40 to +85 °C

TQFP-44 pinout

TQFP-44

1 · PB5 · Left side, contact 1 from the top

Marking side · Pin 1 at the upper left
Selected pin details

1 · PB5

Bidirectional · GPIO

General-purpose digital I/O. Alternate assignments: MOSI (SPI).

Wiring requirements

  • SPI master with PB4/SS as input. Hold PB4/SS HIGH. A LOW clears MSTR in SPCR, switches the SPI to slave mode, and makes MOSI and SCK inputs.

    SPI master with PB4/SS as output. PB4 can drive a peripheral’s chip select. Its output level has no effect on MSTR.

After reset · GPIO driver is high impedance during reset. Clock, debug, and alternate-function use depend on fuse and peripheral configuration.

2503Q · Pinout and peripheral signal descriptions

Electrical limits · Link to this pin

Power and reset

  • Target rail
    • Bench supply positive
  • Ground
    • Bench supply return
  • Reset
    • →
100 nF per supply pair between Target rail and GroundTarget rail100 nF per supply pairGround
10 kΩ between Target rail and ResetTarget rail10 kΩReset

Connection guide

All 44 pins

PinSignalDirectionFunction
1PB5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: MOSI (SPI).
2PB6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: MISO (SPI).
3PB7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: 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 (USART).
10PD1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TXD (USART).
11PD2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: INT0 (EXINT).
12PD3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: INT1 (EXINT).
13PD4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC1).
14PD5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC1).
15PD6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ICP (TC1).
16PD7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OC (TC2).
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: SCL (TWI).
20PC1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: SDA (TWI).
21PC2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TCK (JTAG).
22PC3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TMS (JTAG).
23PC4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TDO (JTAG).
24PC5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TDI (JTAG).
25PC6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TOSC1 (TC2).
26PC7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TOSC2 (TC2).
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: ADC7 (ADC).
31PA6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC6 (ADC).
32PA5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC5 (ADC).
33PA4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC4 (ADC).
34PA3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC3 (ADC).
35PA2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC2 (ADC).
36PA1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC1 (ADC).
37PA0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: 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: T (TC0), XCK (USART).
41PB1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: T (TC1).
42PB2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: INT2 (EXINT), AIN0 (AC).
43PB3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OC (TC0), AIN1 (AC).
44PB4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: SS (SPI).

Signal assignments

External interrupts

Review each signal assignment and the peripheral enable conditions in the data sheet. INT2 → PB2 · INT1 → PD3 · INT0 → PD2

Timer/Counter 0

Review each signal assignment and the peripheral enable conditions in the data sheet. OC → PB3 · T → PB0

Timer/Counter 2

Review each signal assignment and the peripheral enable conditions in the data sheet. TOSC2 → PC7 · TOSC1 → PC6 · OC → PD7

Timer/Counter 1

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

SPI peripheral

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

USART · Serial

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

Analog comparator

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

Analog-to-digital converter

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

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

JTAG

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

Electrical limits

ParameterLimitConditions and source
Program flash32 KiB32 KiB Nonvolatile program memory. 2503Q · Memory
SRAM2 KiB2 KiB Volatile data and stack storage. 2503Q · Memory
EEPROM1 KiB1 KiB Nonvolatile data storage. 2503Q · Memory
Clock and supplyOrder-code dependentOrder-code dependent Use the grade table and the device’s speed-versus-voltage curve. 2503Q · Electrical Characteristics

Manufacturer 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.