External interrupts
Review each signal assignment and the peripheral enable conditions in the data sheet. INT2 → PB2 · INT1 → PD3 · INT0 → PD2
Package pin assignments for ATmega1284, ATmega1284P, ATmega644, ATmega32, with peripheral signals, clock grades and a serial programming guide.
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +85 °C
General-purpose digital I/O. Alternate assignments: SCK (SPI).
After reset · GPIO driver is high impedance during reset. Clock, debug, and alternate-function use depend on fuse and peripheral configuration.
| Pin | Signal | Direction | Function |
|---|---|---|---|
| 1 | PB0 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: T (TC0), XCK (USART). |
| 2 | PB1 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: T (TC1). |
| 3 | PB2 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: INT2 (EXINT), AIN0 (AC). |
| 4 | PB3 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: OC (TC0), AIN1 (AC). |
| 5 | PB4 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: SS (SPI). |
| 6 | PB5 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: MOSI (SPI). |
| 7 | PB6 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: MISO (SPI). |
| 8 | PB7 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: SCK (SPI). |
| 9 | RESET Input | Input | Active-low reset input. The in-system programmer uses this pin to enter serial programming mode. |
| 10 | VCC Supply | Supply | Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair. |
| 11 | GND Return | Return | Supply return. Connect every ground pin. |
| 12 | XTAL2 Output | Output | Oscillator amplifier output. Follow the selected clock mode before attaching a circuit. |
| 13 | XTAL1 Input | Input | Oscillator amplifier input or external clock input, depending on clock fuses. |
| 14 | PD0 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: RXD (USART). |
| 15 | PD1 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TXD (USART). |
| 16 | PD2 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: INT0 (EXINT). |
| 17 | PD3 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: INT1 (EXINT). |
| 18 | PD4 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: OCB (TC1). |
| 19 | PD5 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: OCA (TC1). |
| 20 | PD6 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ICP (TC1). |
| 21 | PD7 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: OC (TC2). |
| 22 | PC0 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: SCL (TWI). |
| 23 | PC1 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: SDA (TWI). |
| 24 | PC2 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TCK (JTAG). |
| 25 | PC3 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TMS (JTAG). |
| 26 | PC4 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TDO (JTAG). |
| 27 | PC5 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TDI (JTAG). |
| 28 | PC6 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TOSC1 (TC2). |
| 29 | PC7 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: TOSC2 (TC2). |
| 30 | AVCC Supply | Supply | Analog supply. Connect it to the supply even if analog conversion is unused. Follow the data sheet’s filtering guidance for precision conversion. |
| 31 | GND Return | Return | Supply return. Connect every ground pin. |
| 32 | AREF Analog reference | Analog reference | ADC voltage reference terminal. Check the reference selection before driving this pin from an external voltage. |
| 33 | PA7 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC7 (ADC). |
| 34 | PA6 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC6 (ADC). |
| 35 | PA5 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC5 (ADC). |
| 36 | PA4 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC4 (ADC). |
| 37 | PA3 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC3 (ADC). |
| 38 | PA2 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC2 (ADC). |
| 39 | PA1 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC1 (ADC). |
| 40 | PA0 Bidirectional | Bidirectional | General-purpose digital I/O. Alternate assignments: ADC0 (ADC). |
Review each signal assignment and the peripheral enable conditions in the data sheet. INT2 → PB2 · INT1 → PD3 · INT0 → PD2
Review each signal assignment and the peripheral enable conditions in the data sheet. OC → PB3 · T → PB0
Review each signal assignment and the peripheral enable conditions in the data sheet. TOSC2 → PC7 · TOSC1 → PC6 · OC → PD7
Review each signal assignment and the peripheral enable conditions in the data sheet. T → PB1 · ICP → PD6 · OCA → PD5 · OCB → PD4
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
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
Review each signal assignment and the peripheral enable conditions in the data sheet. AIN1 → PB3 · AIN0 → PB2
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
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
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
| Parameter | Limit | Conditions and source |
|---|---|---|
| Supply and clock grade2.7–5.5 V · 8 MHz maximum | 2.7–5.5 V · 8 MHz maximum | Follow the speed-grade curve for the selected voltage. The headline clock figure is the maximum at its specified supply and temperature. 2503Q · Speed grades and ordering information |
| Ambient temperature grade-40 to +85 °C | -40 to +85 °C | For this order code. Verify silicon revision and errata in the current manufacturer documentation. 2503Q · Ordering information |
| Program flash32 KiB | 32 KiB | Nonvolatile program memory. 2503Q · Memory |
| SRAM2 KiB | 2 KiB | Volatile data and stack storage. 2503Q · Memory |
| EEPROM1 KiB | 1 KiB | Nonvolatile data storage. 2503Q · Memory |
| Clock and supplyOrder-code dependent | Order-code dependent | Use the grade table and the device’s speed-versus-voltage curve. 2503Q · Electrical Characteristics |
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.