IC Pinouts / ATMEGA328P

ATMEGA328P Pinout

ATmega328P AVR MCU · 8-bit AVR microcontroller — the chip inside the Arduino Uno. 23 GPIO, 6 ADC, UART/SPI/I2C.

DIP-28 MCU 28 pins No backend · 100% client-side
PC6(RESET) 1
PD0(RXD/D0) 2
PD1(TXD/D1) 3
PD2(INT0/D2) 4
PD3(D3~) 5
PD4(D4) 6
VCC 7
GND 8
PB6(XTAL1) 9
PB7(XTAL2) 10
PD5(D5~) 11
PD6(D6~) 12
PD7(D7) 13
PB0(D8) 14
ATMEGA328P DIP-28
28 PC5(ADC5/A5)
27 PC4(ADC4/A4)
26 PC3(ADC3/A3)
25 PC2(ADC2/A2)
24 PC1(ADC1/A1)
23 PC0(ADC0/A0)
22 GND
21 AREF
20 AVCC
19 PB5(D13)
18 PB4(D12)
17 PB3(D11~)
16 PB2(D10~)
15 PB1(D9~)
PowerGNDInputOutputI/OControl
PinNameTypeFunction
1 PC6 · RESET Control /RESET (active-low); Arduino RESET
2 PD0 · RXD/D0 I/O UART RX; Arduino D0
3 PD1 · TXD/D1 I/O UART TX; Arduino D1
4 PD2 · INT0/D2 I/O External interrupt 0; Arduino D2
5 PD3 · D3~ I/O INT1 / PWM (OC2B); Arduino D3
6 PD4 · D4 I/O XCK / T0; Arduino D4
7 VCC Power Digital supply + (1.8–5.5V)
8 GND GND Digital ground
9 PB6 · XTAL1 I/O Crystal in (XTAL1/TOSC1)
10 PB7 · XTAL2 I/O Crystal out (XTAL2/TOSC2)
11 PD5 · D5~ I/O T1 / PWM (OC0B); Arduino D5
12 PD6 · D6~ I/O AIN0 / PWM (OC0A); Arduino D6
13 PD7 · D7 I/O AIN1; Arduino D7
14 PB0 · D8 I/O ICP1 / CLKO; Arduino D8
15 PB1 · D9~ I/O PWM (OC1A); Arduino D9
16 PB2 · D10~ I/O SPI SS / PWM (OC1B); Arduino D10
17 PB3 · D11~ I/O SPI MOSI / PWM (OC2A); Arduino D11
18 PB4 · D12 I/O SPI MISO; Arduino D12
19 PB5 · D13 I/O SPI SCK; Arduino D13 (onboard LED)
20 AVCC Power Analog supply + (connect to VCC)
21 AREF Power ADC reference voltage
22 GND GND Analog ground
23 PC0 · ADC0/A0 I/O ADC0; Arduino A0
24 PC1 · ADC1/A1 I/O ADC1; Arduino A1
25 PC2 · ADC2/A2 I/O ADC2; Arduino A2
26 PC3 · ADC3/A3 I/O ADC3; Arduino A3
27 PC4 · ADC4/A4 I/O ADC4 / I2C SDA; Arduino A4
28 PC5 · ADC5/A5 I/O ADC5 / I2C SCL; Arduino A5
How to · reading it

How to read the ATMEGA328P pinout

  1. 01

    Find pin 1

    One end of the chip has a half-circle notch or a dot; with the notch facing up, the top-left pin is pin 1.

  2. 02

    Count counter-clockwise

    Count counter-clockwise from pin 1: go down the left side first, then up the right side from the bottom.

  3. 03

    Check the table below

    Look up each pin's function by number in the table below; power/ground are color-coded, and alternate-function signals are in parentheses.

FAQ

Frequently asked questions

How do the chip pins map to Arduino Uno pin numbers?

The Arduino "D0–D13" and "A0–A5" labels are shown in each pin alias above. They do NOT match the physical pin numbers — e.g. Arduino D13 (SCK) is physical pin 19, and A0 is physical pin 23.

Which pins do PWM (analogWrite)?

Six pins: D3, D5, D6, D9, D10, D11 (marked ~ above). They are driven by the three hardware timers.

Where are SPI and I2C?

SPI: D10 SS / D11 MOSI / D12 MISO / D13 SCK (physical 16–19). I2C: A4 SDA / A5 SCL (physical 27/28).

Do I need an external crystal?

Not necessarily — the ATmega328P has an internal 8MHz RC oscillator. The Arduino Uno adds a 16MHz crystal on XTAL1/XTAL2 (pins 9/10) for accurate timing.

Data source

Pinout data comes from Microchip ATmega328P datasheet (standard DIP-28 numbering). Refer to the actual device datasheet as authoritative for the pinout.

⚡ Powered by Circflow