PCBWiki
NRNDMicrochip Technology · 32-lead TQFP (package code 32A)

ATmega328P PCB Design Guide: Footprint, Pinout, and Alternatives

8-bit AVR MCU with 32 KB flash; Arduino Uno chip; also PDIP-28.

The ATmega328P is the Arduino Uno's brain and probably the most-documented 8-bit microcontroller ever made: 32 KB of flash, 2 KB of SRAM, 1 KB of EEPROM, and 23 I/O lines, running anywhere from 1.8 to 5.5 V. Its minimal circuit is genuinely minimal — power, decoupling, a pull-up on reset, and optionally a crystal — which is why it still shows up in new hobbyist and low-volume boards two decades on.

Know before you start: Microchip now lists the ATmega328P as Not Recommended for new designs. It remains widely stocked, but a new layout should consider the ATmega328PB — Microchip's successor with more peripherals — or a different family entirely. If you specifically need Uno-compatibility, the 328P is still the reference part; just make the lifecycle decision deliberately.

The classic mistakes are all voltage- and fuse-shaped: running 16 MHz at 3.3 V outside the rated speed grade, selecting a clock-source fuse the board cannot satisfy, missing the auto-reset capacitor, and getting surprised by the two TQFP-only ADC pins when porting an Uno design. Each is covered below.

What breaks boards

  1. 16 MHz at 3.3 V is out of spec — but 8 MHz is not the real ceiling

    The datasheet's speed grades are 4 MHz at 1.8 V, 10 MHz at 2.7 V, and 20 MHz at 4.5 V, with maximum frequency scaling linearly with voltage between those points. At 3.3 V that works out to roughly 13.3 MHz — so a 16 MHz crystal at 3.3 V is outside the safe operating area, even though most chips appear to run fine at room temperature. The oft-repeated '8 MHz max at 3.3 V' is a conservative simplification, not the datasheet limit; 8 MHz and 12 MHz are both comfortably within spec at 3.3 V.

  2. A wrong clock-source fuse bricks the chip until you supply that clock

    The clock-source fuses (CKSEL) tell the chip what to boot from. Program them for an external crystal or clock on a board that lacks one and the chip stops responding to ISP — not damaged, just waiting for a clock that never comes. Recovery: inject a clock signal (even a spare MCU pin toggling) into XTAL1 during ISP, or use a high-voltage parallel programmer. Set fuses last, double-check the CKSEL bits against your actual clock hardware, and document the recovery procedure.

  3. Blank chips have no bootloader — plan the ISP path and the DTR cap

    A factory-fresh ATmega328P contains no Arduino bootloader; you must either burn one over the ISP header (6-pin: MISO/MOSI/SCK/RESET/VCC/GND) or skip the bootloader and program over ISP directly. If you want serial upload with auto-reset, wire the USB bridge's DTR through a 100 nF series capacitor into RESET — the cap turns DTR's falling edge into a reset pulse. Put the ISP header on every board revision; it is also your fuse-recovery path.

  4. TQFP-32 has ADC6 and ADC7 — PDIP-28 does not

    The 32-lead TQFP and VQFN packages add two analog-input-only pins, ADC6 and ADC7, that simply do not exist on the 28-pin SPDIP. They have no digital I/O function. This trips designers porting an Uno (PDIP) design to a surface-mount layout in both directions: schematics copied from TQFP reference designs use pins a DIP part lacks, and pin-numbering differs between the packages throughout.

  5. Decouple AREF, and never drive it while using an internal reference

    Hang a 100 nF capacitor from AREF to ground for stable ADC readings. If your code selects the internal 1.1 V or AVCC reference, the reference is driven out on the AREF pin — connecting an external voltage source there at the same time shorts the two references and can damage the chip. Either use an external reference and select it in software, or leave AREF with just the capacitor.

Key specifications

ParameterValueSource
Flash32 KB In-System Self-Programmable FlashDS40002061B, Features (328/P = 32 KB) + memory section
SRAM2 KB internal SRAMDS40002061B, Features (328/P = 2 KB)
EEPROM1 KB EEPROMDS40002061B, Features (328/P = 1 KB)
Max clock vs VCC0–4 MHz @ 1.8–5.5 V; 0–10 MHz @ 2.7–5.5 V; 0–20 MHz @ 4.5–5.5 VDS40002061B, Features 'Speed Grade' + Speed Grades section (p. 312)
VCC range1.8–5.5 VDS40002061B, Features (Operating Voltage)
I/O count23 programmable I/O linesDS40002061B, Features
Package options28-pin SPDIP (28P3), 32-lead TQFP (32A), 28-pad VQFN 4 × 4 mm (28M1), 32-pad VQFN 5 × 5 mm (32M1-A)DS40002061B, Features + Ordering Information package type table

Verified against the manufacturer datasheet on 2026-07-09. Confirm the current revision before production use.

Alternatives

  • ATmega328PBMicrochip's successor and the recommended migration target now that the 328P is NRND: more USARTs, SPI, I2C, and timers, mostly code-compatible, in TQFP/VQFN only (no DIP).
  • ATmega32U4native USB on-chip, eliminating the separate USB-UART bridge — the Leonardo/Pro Micro chip.
  • LGT8F328Pcheap clone that runs to 32 MHz; close but not fully register-identical, so validate any timing-critical or low-level code.
  • ATtiny85for smaller projects: 8 pins, 8 KB flash, same AVR toolchain.

Common questions

Can the ATmega328P run at 16 MHz on 3.3 V?
Not within spec. The datasheet's maximum frequency scales linearly from 10 MHz at 2.7 V to 20 MHz at 4.5 V, which puts the limit near 13.3 MHz at 3.3 V. Most parts appear to work at 16 MHz/3.3 V on the bench, but it is outside the guaranteed operating area — use 8 or 12 MHz at 3.3 V, or run the board at 5 V.
Is the ATmega328P discontinued?
Not discontinued, but Microchip's product page marks it Not Recommended for new designs. Stock remains plentiful, and existing designs are fine; for a new board, Microchip's ATmega328PB is the intended successor with extra peripherals and broad code compatibility.
How do I recover an ATmega328P after setting the wrong clock fuses?
Feed a clock into XTAL1 while retrying ISP — any square wave in the low-MHz range works, even from another microcontroller's PWM pin — then reprogram the CKSEL fuses. If that fails, a high-voltage parallel programmer can always reset the fuses. The chip itself is not damaged.
Do I need to burn a bootloader on a new ATmega328P?
Only if you want to upload over serial like an Arduino. Blank chips ship without a bootloader, so either burn one through the 6-pin ISP header or program your application directly over ISP and skip the bootloader entirely, which also frees its flash space.

Sources