Skip to datasheet
The Engineering ProjectsAI Interactive Datasheet

ATmega2560100-pin 8-bit AVR microcontroller

A large AVR with room for memory, ports and peripherals.

Manufacturer-referenced

Microchip Technology / Atmel · ATmega2560-16AU

TQFP-1002549Q–AVR · February 2014

ATmega2560 is an eight-bit AVR microcontroller with 256 KB of Flash, 8 KB of SRAM and 4 KB of EEPROM. Its 100-pin package provides 86 programmable I/O lines, four USARTs, six timer/counters and a sixteen-channel ten-bit ADC. The physical chip pin numbers shown here are separate from Arduino Mega board header labels. The selected ATmega2560-16AU operates from 4.5 to 5.5 V at up to 16 MHz. Low-voltage ATmega2560V parts have different limits. Clock-source and divider fuses determine the real CPU speed; a factory-configured part normally starts from its internal 8 MHz RC oscillator divided by eight. The basic circuit uses regulated 5 V and the nominal 1 MHz factory clock, so it needs no crystal for this demonstration. Every supply and ground is connected, ISP remains accessible and an LED is limited by 1 kΩ on PB5. Firmware must match the clock and configure the chosen output before a timing result is meaningful.

Real View

ATmega2560-16AU black TQFP-100 package with silver leads and pin-one mark.
ATmega2560-16AU · TQFP-100Package illustration

Pinout

ATmega2560TQFP-100Top view
Select a pin to see its functionTQFP-100 · 100 pins

PCB Footprint

Loading footprint…
Powered by
Finding TQFP-100 packageTop view · mm

3D View

Preparing 3D preview…
3D packageDrag to rotate · Scroll to zoom
Ports and alternate functionsAll digital and analog suppliesReset, ISP and JTAGSystem and timer clocksADC channels and reference
ATmega2560TQFP-100Top view

Click a lead or use the arrow keys. Top view

1
PIN 1 · Ports and alternate functions

PG5 / OC0B

GPIO / peripheral

Function

Port pad shared with the named hardware functions. Configure direction and peripheral selection.

How to connect

Use voltage-compatible signals and define unused digital input levels.

At a glance

100-pin 8-bit AVR microcontroller

The AVR core shares memory with timers, serial interfaces and analog conversion. Pin multiplexing determines which function is connected to the board.

256 KBProgram Flash
8 KBSRAM
86 linesDigital I/O
16 MHzMaximum clock

Operating profile

ATmega2560-16AU

Selected package
TQFP-100ATmega2560-16AU
16AU supply
4.5–5.5 VUse regulated 5 V
Industrial range
−40–85°CSelected AU grade

Core and memory

Key parameters and their test conditions

Program Flash
256 KBConditions / notes: 128K 16-bit instruction words
SRAM
8 KBConditions / notes: 8192 bytes
EEPROM
4 KBConditions / notes: 4096 bytes
Register file
32 × 8-bit registersConditions / notes: AVR arithmetic operands
Instruction set
135 instructionsConditions / notes: Many execute in one clock cycle
Multiplier
8 × 8 bitsConditions / notes: Two-cycle hardware multiply

Package details

Follows the selected physical package

Manufacturer
Microchip Technology / Atmel
Part number
ATmega2560-16AU
Package
TQFP-100
Connections
100 pins
Mounting
SMD
Lead pitch
0.5 mm
Package code
TQFP-100
Thermal reference
See manufacturer operating limits

Connections by function

Select a pin to open its function, electrical notes and wiring guidance.

Ports and alternate functions65 pins

All digital and analog supplies10 pins

Reset, ISP and JTAG4 pins

System and timer clocks4 pins

ADC channels and reference17 pins

Connect all power

Include AVCC and every digital supply/ground pair.

Read clock fuses

Check CKSEL and CKDIV8 before assuming the CPU frequency.

Preserve ISP

Keep RESET, SCK, MOSI, MISO and supply reference accessible.

At a nominal 1 MHz CPU clock, Timer1 CTC with prescaler 64 and OCR1A = 7812 gives a 500.032 ms compare interval. Toggle PB5 each interval for approximately 0.999936 Hz.

ATmega2560 compact CPU memory timer serial ADC architecture.
Original teaching illustration; matching named nodes are electrically joined.
ATmega2560 TQFP with all supplies, reset, ISP and current-limited LED.
Original teaching illustration; matching named nodes are electrically joined.

Pin reference

Select a pin to explore its function and connection.

100 pins
PinSignalTypeFunction
PG5 / OC0BGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE0 / RXD0 / PCINT8GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE1 / TXD0GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE2 / XCK0 / AIN0GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE3 / OC3A / AIN1GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE4 / OC3B / INT4GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE5 / OC3C / INT5GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE6 / T3 / INT6GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PE7 / CLKO / ICP3 / INT7GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
VCCSupplyDigital supply; all VCC pins must be connected.
GNDSupplyGround return; connect every ground pad.
PH0 / RXD2GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH1 / TXD2GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH2 / XCK2GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH3 / OC4AGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH4 / OC4BGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH5 / OC4CGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH6 / OC2BGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB0 / SS / PCINT0GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB1 / SCK / PCINT1Program / debugPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB2 / MOSI / PCINT2Program / debugPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB3 / MISO / PCINT3Program / debugPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB4 / OC2A / PCINT4GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB5 / OC1A / PCINT5GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB6 / OC1B / PCINT6GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PB7 / OC0A / OC1C / PCINT7GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PH7 / T4GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PG3 / TOSC2Clock / GPIOMain oscillator or asynchronous timer oscillator connection, depending on the selected pin.
PG4 / TOSC1Clock / GPIOMain oscillator or asynchronous timer oscillator connection, depending on the selected pin.
RESETProgram / debugActive-low reset and serial-programming entry.
VCCSupplyDigital supply; all VCC pins must be connected.
GNDSupplyGround return; connect every ground pad.
XTAL2Clock / GPIOMain oscillator or asynchronous timer oscillator connection, depending on the selected pin.
XTAL1Clock / GPIOMain oscillator or asynchronous timer oscillator connection, depending on the selected pin.
PL0 / ICP4GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL1 / ICP5GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL2 / T5GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL3 / OC5AGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL4 / OC5BGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL5 / OC5CGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL6GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PL7GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD0 / SCL / INT0GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD1 / SDA / INT1GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD2 / RXD1 / INT2GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD3 / TXD1 / INT3GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD4 / ICP1GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD5 / XCK1GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD6 / T1GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PD7 / T0GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PG0 / WRGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PG1 / RDGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC0 / A8GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC1 / A9GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC2 / A10GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC3 / A11GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC4 / A12GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC5 / A13GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC6 / A14GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PC7 / A15GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
VCCSupplyDigital supply; all VCC pins must be connected.
GNDSupplyGround return; connect every ground pad.
PJ0 / RXD3 / PCINT9GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ1 / TXD3 / PCINT10GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ2 / XCK3 / PCINT11GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ3 / PCINT12GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ4 / PCINT13GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ5 / PCINT14GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ6 / PCINT15GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PG2 / ALEGPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA7 / AD7GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA6 / AD6GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA5 / AD5GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA4 / AD4GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA3 / AD3GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA2 / AD2GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA1 / AD1GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PA0 / AD0GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
PJ7GPIO / peripheralPort pad shared with the named hardware functions. Configure direction and peripheral selection.
VCCSupplyDigital supply; all VCC pins must be connected.
GNDSupplyGround return; connect every ground pad.
PK7 / ADC15 / PCINT23ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK6 / ADC14 / PCINT22ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK5 / ADC13 / PCINT21ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK4 / ADC12 / PCINT20ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK3 / ADC11 / PCINT19ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK2 / ADC10 / PCINT18ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK1 / ADC9 / PCINT17ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PK0 / ADC8 / PCINT16ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF7 / ADC7 / TDIADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF6 / ADC6 / TDOADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF5 / ADC5 / TMSADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF4 / ADC4 / TCKADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF3 / ADC3ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF2 / ADC2ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF1 / ADC1ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
PF0 / ADC0ADC / referencePort pad shared with the named hardware functions. Configure direction and peripheral selection.
AREFADC / referenceADC reference input or internal-reference decoupling, according to reference selection.
GNDSupplyGround return; connect every ground pad.
AVCCSupplyAnalog and associated port supply; connect even when the ADC is unused.
TQFP-100 · Top view · Select a pin number to inspect its connection.

Core and memory

Selected ATmega2560

ParameterValueConditions / notes
Program Flash256 KB128K 16-bit instruction words
SRAM8 KB8192 bytes
EEPROM4 KB4096 bytes
Register file32 × 8-bit registersAVR arithmetic operands
Instruction set135 instructionsMany execute in one clock cycle
Multiplier8 × 8 bitsTwo-cycle hardware multiply
Maximum throughputUp to 16 MIPSAt 16 MHz; instruction-dependent

Far program addresses and return-address width matter for firmware and bootloaders.

Supply and package

TQFP-100 selected orderable

ParameterValueConditions / notes
VCC range4.5–5.5 VATmega2560-16AU; not the V low-voltage variant
Digital VCC pins10, 31, 61, 80Bypass each locally
Ground pins11, 32, 62, 81, 99Connect all to common ground
AVCC pin100Analog and associated port supplyConnect even if ADC is unused
AREF pin98ADC reference connection100 nF to ground in the AVCC-reference example
Body / lead span14 × 14 mm / 16 × 16 mm nominal100A TQFP, 0.5 mm pitch
Industrial range−40 to +85°CSelected AU orderable

Verify the latest package drawing and production tolerances before PCB fabrication.

Clocks, reset and fuses

Check the actual configuration

ParameterValueConditions / notes
Factory clock sourceInternal calibrated 8 MHz RCNominal frequency; tolerance applies
Factory CKDIV8ProgrammedInitial divide-by-eight gives nominal 1 MHz
Clock prescalerSoftware configurableCLKPR timed-write sequence
Main oscillator padsXTAL1-34 and XTAL2-33Use the selected crystal/clock configuration
Timer oscillatorTOSC1-29 and TOSC2-28Separate asynchronous Timer2 option
Reset pin30Active low10 kΩ pull-up and ISP access
Watchdog / brown-outFuse and register settingsConfigure deliberately

A programmed fuse means a zero bit; do not infer fuse polarity from its name.

Timers and interfaces

Hardware blocks in this 100-pin device

ParameterValueConditions / notes
Timer0 / Timer28-bitCompare and PWM functions
Timer1 / 3 / 4 / 516-bitCompare, capture and waveform modes
USART0–3Four serial interfacesTX/RX plus synchronous clock options
SPIPB0 SS, PB1 SCK, PB2 MOSI, PB3 MISOPhysical pins19–22
Two-wire interfacePD0 SCL43; PD1 SDA44External pull-ups required
ADC10-bit, 16 external channelsPF0–PF7 and PK0–PK7
External memoryMultiplexed address/data interfacePorts A/C and PG control pins
JTAGPF4–PF7Can override ordinary ADC/GPIO use

Alternative functions share pads; not every function can be active simultaneously.

Programming and digital ports

Physical chip connections

ParameterValueConditions / notes
ISP resetRESET30Active-low programming entry
ISP clock / dataSCK20, MOSI21, MISO22Also connect VCC reference and GND
JTAGTCK93, TMS92, TDO91, TDI90PF4–PF7 alternate functions
GPIO directionDDRx bit1 output, bit0 inputInitialize PORTx before output enable
Input pull-upPORTx=1 while inputSubject to global pull-up disable and peripheral overrides
Supply current limitsObserve per-pin, port and total limitsAbsolute maximum is not a design target
Arduino numberingDifferent from package pinsUse the board schematic when mapping header labels

Fuse changes can require a valid external clock or recovery programmer; review them before writing.

Minimal LED timing example

Factory-clock 5 V starting circuit

ParameterValueConditions / notes
Supply networkVCC10/31/61/80 and AVCC100100 nF at every supply contact
ReturnsGND11/32/62/81/99Common ground plane
ResetRESET30 → 10 kΩ → 5 VPreserve ISP access
LED outputPB5 physical24 → 1 kΩ → red LED → GNDAbout 3 mA for an ideal 2 V red LED
Timer1 setupCTC, prescaler64, OCR1A=78127813 timer counts per compare
Compare interval64 × 7813 / 1 MHz = 500.032 msToggle PB5 in the compare handler
Full blink frequencyApproximately 0.999936 HzClock tolerance and firmware still apply

This illustration does not execute firmware; the values describe a configured example.

Take it into ProTech

Find ATmega2560 in the Components Library to place its schematic symbol and connect its pins.

Reference page · circuit simulation model not yet availableOpen ProTech

Component view