Spark Logic

ATmega2560 pinout

Package pin assignments for ATmega2560, with peripheral signals, clock grades and a serial programming guide.

TQFP-100

100 contacts Current package
CBGA-100 100 contacts

Microchip Technology · 100 numbered contacts. See the individual package drawings for footprint dimensions.

256 KiB flash · 8 KiB SRAM · 4 KiB EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C

TQFP-100 pinout

TQFP-100
Top view · Pin 1 at the upper left · Schematic outline Scroll the map to reach all contacts.
Selected pin details

99 · GND

Return · Ground

Supply return. Connect every ground pin.

2549Q · Pinout and peripheral signal descriptions

Electrical limits · Link to this pin

All 100 pins

PinSignalDirectionFunction
1PG5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC0).
2PE0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: RXD (USART0), PCINT8 (EXINT).
3PE1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TXD (USART0).
4PE2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN0 (AC), XCK (USART0).
5PE3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: AIN1 (AC), OCA (TC3).
6PE4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC3), INT4 (EXINT).
7PE5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCC (TC3), INT5 (EXINT).
8PE6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: T (TC3), INT6 (EXINT).
9PE7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ICP (TC3), INT7 (EXINT), CLKO0 (CPU).
10VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
11GND ReturnReturn Supply return. Connect every ground pin.
12PH0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: RXD (USART2).
13PH1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TXD (USART2).
14PH2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: XCK (USART2).
15PH3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC4).
16PH4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC4).
17PH5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCC (TC4).
18PH6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC2).
19PB0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: SS (SPI), PCINT0 (EXINT).
20PB1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: SCK (SPI), PCINT1 (EXINT).
21PB2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: MOSI (SPI), PCINT2 (EXINT).
22PB3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: MISO (SPI), PCINT3 (EXINT).
23PB4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC2), PCINT4 (EXINT).
24PB5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC1), PCINT5 (EXINT).
25PB6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC1), PCINT6 (EXINT).
26PB7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC0), OCC (TC1), PCINT7 (EXINT).
27PH7 BidirectionalBidirectional General-purpose digital I/O.
28PG3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TOSC2 (TC2).
29PG4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TOSC1 (TC2).
30RESET InputInput Active-low reset input. The in-system programmer uses this pin to enter serial programming mode.
31VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
32GND ReturnReturn Supply return. Connect every ground pin.
33XTAL2 OutputOutput Oscillator amplifier output. Follow the selected clock mode before attaching a circuit.
34XTAL1 InputInput Oscillator amplifier input or external clock input, depending on clock fuses.
35PL0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ICP (TC4).
36PL1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ICP (TC5).
37PL2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: T (TC5).
38PL3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCA (TC5).
39PL4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCB (TC5).
40PL5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: OCC (TC5).
41PL6 BidirectionalBidirectional General-purpose digital I/O.
42PL7 BidirectionalBidirectional General-purpose digital I/O.
43PD0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: SCL (TWI), INT0 (EXINT).
44PD1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: SDA (TWI), INT1 (EXINT).
45PD2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: RXD (USART1), INT2 (EXINT).
46PD3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TXD (USART1), INT3 (EXINT).
47PD4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ICP (TC1).
48PD5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: XCK (USART1).
49PD6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: T (TC1).
50PD7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: T (TC0).
51PG0 BidirectionalBidirectional General-purpose digital I/O.
52PG1 BidirectionalBidirectional General-purpose digital I/O.
53PC0 BidirectionalBidirectional General-purpose digital I/O.
54PC1 BidirectionalBidirectional General-purpose digital I/O.
55PC2 BidirectionalBidirectional General-purpose digital I/O.
56PC3 BidirectionalBidirectional General-purpose digital I/O.
57PC4 BidirectionalBidirectional General-purpose digital I/O.
58PC5 BidirectionalBidirectional General-purpose digital I/O.
59PC6 BidirectionalBidirectional General-purpose digital I/O.
60PC7 BidirectionalBidirectional General-purpose digital I/O.
61VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
62GND ReturnReturn Supply return. Connect every ground pin.
63PJ0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: RXD (USART3), PCINT9 (EXINT).
64PJ1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TXD (USART3), PCINT10 (EXINT).
65PJ2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: XCK (USART3), PCINT11 (EXINT).
66PJ3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT12 (EXINT).
67PJ4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT13 (EXINT).
68PJ5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT14 (EXINT).
69PJ6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT15 (EXINT).
70PG2 BidirectionalBidirectional General-purpose digital I/O.
71PA7 BidirectionalBidirectional General-purpose digital I/O.
72PA6 BidirectionalBidirectional General-purpose digital I/O.
73PA5 BidirectionalBidirectional General-purpose digital I/O.
74PA4 BidirectionalBidirectional General-purpose digital I/O.
75PA3 BidirectionalBidirectional General-purpose digital I/O.
76PA2 BidirectionalBidirectional General-purpose digital I/O.
77PA1 BidirectionalBidirectional General-purpose digital I/O.
78PA0 BidirectionalBidirectional General-purpose digital I/O.
79PJ7 BidirectionalBidirectional General-purpose digital I/O.
80VCC SupplySupply Digital supply. Connect every VCC pin and place a local 100 nF ceramic bypass close to each VCC-to-ground pair.
81GND ReturnReturn Supply return. Connect every ground pin.
82PK7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT23 (EXINT), ADC15 (ADC).
83PK6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT22 (EXINT), ADC14 (ADC).
84PK5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT21 (EXINT), ADC13 (ADC).
85PK4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT20 (EXINT), ADC12 (ADC).
86PK3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT19 (EXINT), ADC11 (ADC).
87PK2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT18 (EXINT), ADC10 (ADC).
88PK1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT17 (EXINT), ADC9 (ADC).
89PK0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: PCINT16 (EXINT), ADC8 (ADC).
90PF7 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TDI (JTAG), ADC7 (ADC).
91PF6 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TDO (JTAG), ADC6 (ADC).
92PF5 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TMS (JTAG), ADC5 (ADC).
93PF4 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: TCK (JTAG), ADC4 (ADC).
94PF3 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC3 (ADC).
95PF2 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC2 (ADC).
96PF1 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC1 (ADC).
97PF0 BidirectionalBidirectional General-purpose digital I/O. Alternate assignments: ADC0 (ADC).
98AREF Analog referenceAnalog reference ADC voltage reference terminal. Check the reference selection before driving this pin from an external voltage.
99GND ReturnReturn Supply return. Connect every ground pin.
100AVCC SupplySupply Analog supply. Connect it to the supply even if analog conversion is unused. Follow the data sheet’s filtering guidance for precision conversion.

Signal assignments

Analog comparator

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

USART0 · Serial

Use TXD and RXD for asynchronous serial. XCK is for synchronous mode. The signal levels follow the microcontroller supply domain. TXD → PE1 · RXD → PE0 · XCK → PE2

USART1 · Serial

Use TXD and RXD for asynchronous serial. XCK is for synchronous mode. The signal levels follow the microcontroller supply domain. TXD → PD3 · RXD → PD2 · XCK → PD5

USART2 · Serial

Use TXD and RXD for asynchronous serial. XCK is for synchronous mode. The signal levels follow the microcontroller supply domain. TXD → PH1 · RXD → PH0 · XCK → PH2

USART3 · Serial

Use TXD and RXD for asynchronous serial. XCK is for synchronous mode. The signal levels follow the microcontroller supply domain. TXD → PJ1 · RXD → PJ0 · XCK → PJ2

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 → PD1 · SCL → PD0

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 → PB0 · MOSI → PB2 · MISO → PB3 · SCK → PB1

Timer/Counter 0

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

Timer/Counter 2

Review each signal assignment and the peripheral enable conditions in the data sheet. TOSC1 → PG4 · TOSC2 → PG3 · OCA → PB4 · OCB → PH6

Timer/Counter 5

Review each signal assignment and the peripheral enable conditions in the data sheet. T → PL2 · ICP → PL1 · OCA → PL3 · OCB → PL4 · OCC → PL5

Timer/Counter 4

Review each signal assignment and the peripheral enable conditions in the data sheet. ICP → PL0 · OCA → PH3 · OCB → PH4 · OCC → PH5

Timer/Counter 3

Review each signal assignment and the peripheral enable conditions in the data sheet. T → PE6 · ICP → PE7 · OCA → PE3 · OCB → PE4 · OCC → PE5

Timer/Counter 1

Review each signal assignment and the peripheral enable conditions in the data sheet. T → PD6 · ICP → PD4 · OCA → PB5 · OCB → PB6 · OCC → PB7

JTAG

Check the JTAG fuse and enable state before using the pins for GPIO. JTAG uses TCK, TMS, TDI and TDO. TCK → PF4 · TMS → PF5 · TDO → PF6 · TDI → PF7

External interrupts

Review each signal assignment and the peripheral enable conditions in the data sheet. PCINT0 → PB0 · PCINT1 → PB1 · PCINT2 → PB2 · PCINT3 → PB3 · PCINT4 → PB4 · PCINT5 → PB5 · PCINT6 → PB6 · PCINT7 → PB7 · PCINT8 → PE0 · PCINT9 → PJ0 · PCINT10 → PJ1 · PCINT11 → PJ2 · PCINT12 → PJ3 · PCINT13 → PJ4 · PCINT14 → PJ5 · PCINT15 → PJ6 · PCINT16 → PK0 · PCINT17 → PK1 · PCINT18 → PK2 · PCINT19 → PK3 · PCINT20 → PK4 · PCINT21 → PK5 · PCINT22 → PK6 · PCINT23 → PK7 · INT0 → PD0 · INT1 → PD1 · INT2 → PD2 · INT3 → PD3 · INT4 → PE4 · INT5 → PE5 · INT6 → PE6 · INT7 → PE7

System clock

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

Analog-to-digital converter

Select the analog channel and reference in firmware. The reference choice and supply constrain the input range. ADC0 → PF0 · ADC1 → PF1 · ADC2 → PF2 · ADC3 → PF3 · ADC4 → PF4 · ADC5 → PF5 · ADC6 → PF6 · ADC7 → PF7 · ADC8 → PK0 · ADC9 → PK1 · ADC10 → PK2 · ADC11 → PK3 · ADC12 → PK4 · ADC13 → PK5 · ADC14 → PK6 · ADC15 → PK7

Electrical limits

ParameterLimitConditions and source
Supply and clock grade4.5–5.5 V · 16 MHz maximum4.5–5.5 V · 16 MHz maximum Follow the speed-grade curve for the selected voltage. The headline clock figure is the maximum at its specified supply and temperature. 2549Q · 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. 2549Q · Ordering information
Program flash256 KiB256 KiB Nonvolatile program memory. 2549Q · Memory
SRAM8 KiB8 KiB Volatile data and stack storage. 2549Q · Memory
EEPROM4 KiB4 KiB Nonvolatile data storage. 2549Q · Memory
Clock and supplyOrder-code dependentOrder-code dependent Use the grade table and the device’s speed-versus-voltage curve. 2549Q · 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.

ATmega2560
256 KiB flash · 8 KiB SRAM · 4 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega2560V-8AU
256 KiB flash · 8 KiB SRAM · 4 KiB EEPROM · 1.8–5.5 V · 8 MHz maximum · -40 to +85 °C
ATmega2560V-8AUR
256 KiB flash · 8 KiB SRAM · 4 KiB EEPROM · 1.8–5.5 V · 8 MHz maximum · -40 to +85 °C
ATmega2560-16AU
256 KiB flash · 8 KiB SRAM · 4 KiB EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C
ATmega2560-16AUR
256 KiB flash · 8 KiB SRAM · 4 KiB EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C