Spark Logic

ATmega328 / ATmega328P / ATmega168 / ATmega8 connection guide

ATmega328 / ATmega328P / ATmega168 / ATmega8 TQFP-32 wiring guide with power, signal assignments, and bench checks.

TQFP-32

32 contacts Current package
QFN-28 29 contacts
QFN-32 33 contacts
PDIP-28 28 contacts

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

32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +105 °C

Power and reset

Required

Use a current-limited supply at a voltage permitted by the order code and system clock. Tie the listed supply pins to that rail. Fit one 100 nF ceramic capacitor close to each supply-and-ground pair. Use a 10 kΩ reset pull-up for this bench circuit.

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

Bench checks

  • With power off, check for a short across the supply. Power on and measure voltage at every supply pin and at reset.
  • Check the clock source configured by CKSEL. If a used part expects an external clock, provide it before attempting serial programming.

AN2519 §§2–3 and DS40002061B · Pin descriptions and clock source

Connection scenarios

Program and read the signature over ISP

Start from the power and reset circuit. Attach a voltage-compatible AVR in-system programmer and use the target voltage as its reference. Connect reset, serial data in/out, and SCK as shown.

AVR programmer wired to target voltage reference, ground, reset, serial data in/out and clock.ProgrammerAVR targetVTGVCCGNDGNDRESETPC6MOSIPB3MISOPB4SCKPB5

Bench checks

  • Read the device signature before writing flash or fuses. If it fails, verify target power, the clock source, programmer direction, and the selected device.
  • If the programmer offers an adjustable SCK, start below one quarter of the target clock and check the data sheet’s SCK high and low timing. Disconnect or isolate other peripherals that drive the programming lines.
  • Disable power output on the programmer if the target has its own bench supply. Confirm the programmer’s VTG behavior in its manual.

AN2519 §4.1 and DS40002061B · Serial Programming Pin Mapping

TQFP-32 wiring map

Highlighted contacts are used in the required step or selected circuit. Select a contact to inspect it.

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

9 · PD5

Bidirectional · GPIO

General-purpose digital I/O. Alternate assignments: T (TC1), OCB (TC0), PCINT21 (EXINT).

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

DS40002061B · Pinout and peripheral signal descriptions

Electrical limits · Pin in the reference

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.

ATmega328
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega328-AU
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega328-AUR
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega328P
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega328P-AU
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega328P-AUR
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega328P-AN
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +105 °C
ATmega328P-ANR
32 KiB flash · 2 KiB SRAM · 1 KiB EEPROM · 1.8–5.5 V · 20 MHz maximum · -40 to +105 °C
ATmega168
16 KiB flash · 1 KiB SRAM · 512 B EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega168V-10AU
16 KiB flash · 1 KiB SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATmega168V-10AUR
16 KiB flash · 1 KiB SRAM · 512 B EEPROM · 1.8–5.5 V · 10 MHz maximum · -40 to +85 °C
ATmega168-20AU
16 KiB flash · 1 KiB SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega168-20AUR
16 KiB flash · 1 KiB SRAM · 512 B EEPROM · 2.7–5.5 V · 20 MHz maximum · -40 to +85 °C
ATmega8
8 KiB flash · 1 KiB SRAM · 512 B EEPROM. Choose the marked order code for voltage, clock, and temperature.
ATmega8L-8AU
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +85 °C
ATmega8L-8AUR
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +85 °C
ATmega8-16AU
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C
ATmega8-16AUR
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +85 °C
ATmega8L-8AN
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +105 °C
ATmega8L-8ANR
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 2.7–5.5 V · 8 MHz maximum · -40 to +105 °C
ATmega8-16AN
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +105 °C
ATmega8-16ANR
8 KiB flash · 1 KiB SRAM · 512 B EEPROM · 4.5–5.5 V · 16 MHz maximum · -40 to +105 °C