ATmega328P
Public Unreviewedby adom
Microchip 8-bit AVR MCU, 28-pin DIP. 32 KB flash, 2 KB SRAM, 20 MHz, the Arduino Uno chip. Datasheet-verified.
| Name | Last updated |
|---|---|
| docs | 29d ago |
| viewers | 2mo ago |
| atmega328p-etched.glb | 29d ago |
| atmega328p-etched.step | 29d ago |
| ATmega328P.adom-lbr.json | 1mo ago |
| atmega328p.glb | 2mo ago |
| atmega328p.kicad_mod | 2mo ago |
| atmega328p.kicad_sym | 2mo ago |
| atmega328p.lbr | 1mo ago |
| ATmega328P.lbr | 1mo ago |
| atmega328p.step | 2mo ago |
| block-diagram.png | 4mo ago |
| max-freq-vcc.png | 4mo ago |
| package.json | 2mo ago |
| page.json | 29d ago |
| pinout-28pdip.png | 4mo ago |
| pinout-32tqfp.png | 4mo ago |
| pkg-32a-tqfp.png | 4mo ago |
| pkg-32m1-vqfn.png | 4mo ago |
| README.md | 29d ago |
ATmega328P
Microchip Technology · 8-bit AVR MCU · PDIP-28
The 8-bit AVR microcontroller at the heart of the Arduino Uno, here in its classic 28-pin DIP. It packs 32 KB of self-programming flash, 2 KB SRAM, and 1 KB EEPROM, and runs the AVR RISC core at up to 20 MHz from 1.8 to 5.5 V. The 28-pin package brings out 23 GPIO across three ports, a 6-channel 10-bit ADC, three timer/counters with PWM, and hardware USART, SPI, and I2C (TWI). A ceramic resonator or crystal on XTAL1/XTAL2 sets the clock, or the internal 8 MHz RC oscillator frees both pins. Datasheet-verified 28-pin pinout.
Pinout
| Pin | Name | Type | Function |
|---|---|---|---|
| 1 | PC6/RESET/PCINT14 | bidirectional | Active-low reset input (when RSTDISBL fuse is unprogrammed); a low pulse longer than the minimum length generates a reset even without clock. If RSTDISBL is programmed, functions as PC6 GPIO (different electrical characteristics than other PC pins). Also PCINT14 pin-change interrupt source. |
| 2 | PD0/RXD/PCINT16 | bidirectional | Port D bit 0. Alternate functions: RXD (USART receive input), PCINT16 pin-change interrupt. |
| 3 | PD1/TXD/PCINT17 | bidirectional | Port D bit 1. Alternate functions: TXD (USART transmit output), PCINT17 pin-change interrupt. |
| 4 | PD2/INT0/PCINT18 | bidirectional | Port D bit 2. Alternate functions: INT0 external interrupt, PCINT18 pin-change interrupt. |
| 5 | PD3/INT1/OC2B/PCINT19 | bidirectional | Port D bit 3. Alternate functions: INT1 external interrupt, OC2B (Timer/Counter2 compare output B / PWM), PCINT19 pin-change interrupt. |
| 6 | PD4/T0/XCK/PCINT20 | bidirectional | Port D bit 4. Alternate functions: T0 (Timer/Counter0 external counter input), XCK (USART external clock), PCINT20 pin-change interrupt. |
| 7 | VCC | power_in | Digital supply voltage. Operating range 1.8V-5.5V (speed-grade dependent: 20MHz requires 4.5-5.5V, 10MHz at 2.7V, 4MHz at 1.8V). |
| 8 | GND | power_in | Ground reference. Tie together with pin 22 GND and the AVCC ground return. |
| 9 | PB6/XTAL1/TOSC1/PCINT6 | bidirectional | Port B bit 6. Alternate functions: XTAL1 (input to inverting oscillator amplifier for external crystal/resonator), TOSC1 (Timer/Counter2 asynchronous oscillator input when AS2 in ASSR is set and internal RC oscillator selected), PCINT6 pin-change interrupt. |
| 10 | PB7/XTAL2/TOSC2/PCINT7 | bidirectional | Port B bit 7. Alternate functions: XTAL2 (output from inverting oscillator amplifier), TOSC2 (Timer/Counter2 asynchronous oscillator output), PCINT7 pin-change interrupt. |
| 11 | PD5/T1/OC0B/PCINT21 | bidirectional | Port D bit 5. Alternate functions: T1 (Timer/Counter1 external counter input), OC0B (Timer/Counter0 compare output B / PWM), PCINT21 pin-change interrupt. |
| 12 | PD6/AIN0/OC0A/PCINT22 | bidirectional | Port D bit 6. Alternate functions: AIN0 (analog comparator positive input), OC0A (Timer/Counter0 compare output A / PWM), PCINT22 pin-change interrupt. |
| 13 | PD7/AIN1/PCINT23 | bidirectional | Port D bit 7. Alternate functions: AIN1 (analog comparator negative input), PCINT23 pin-change interrupt. |
| 14 | PB0/ICP1/CLKO/PCINT0 | bidirectional | Port B bit 0. Alternate functions: ICP1 (Timer/Counter1 input capture), CLKO (divided system clock output when CKOUT fuse is programmed), PCINT0 pin-change interrupt. |
| 15 | PB1/OC1A/PCINT1 | bidirectional | Port B bit 1. Alternate functions: OC1A (Timer/Counter1 compare output A / PWM), PCINT1 pin-change interrupt. |
| 16 | PB2/SS/OC1B/PCINT2 | bidirectional | Port B bit 2. Alternate functions: SS (SPI slave-select input; also controls SPI master/slave mode via DDRB), OC1B (Timer/Counter1 compare output B / PWM), PCINT2 pin-change interrupt. |
| 17 | PB3/MOSI/OC2A/PCINT3 | bidirectional | Port B bit 3. Alternate functions: MOSI (SPI master-out/slave-in data), OC2A (Timer/Counter2 compare output A / PWM), PCINT3 pin-change interrupt. Also used for ISP programming (data in). |
| 18 | PB4/MISO/PCINT4 | bidirectional | Port B bit 4. Alternate functions: MISO (SPI master-in/slave-out data), PCINT4 pin-change interrupt. Also used for ISP programming (data out). |
| 19 | PB5/SCK/PCINT5 | bidirectional | Port B bit 5. Alternate functions: SCK (SPI bus clock), PCINT5 pin-change interrupt. Also used for ISP programming (clock). |
| 20 | AVCC | power_in | Analog supply voltage for the A/D converter, Port C (PC3:0) and (in TQFP/VQFN) ADC7:6. Must be externally connected to VCC even if the ADC is unused; if the ADC is used, connect through an LC low-pass filter for noise isolation. |
| 21 | AREF | passive | Analog reference input for the A/D converter. Bypass with a decoupling capacitor to GND; may be driven externally or internally selected via ADMUX (AVCC or 1.1V internal bandgap). |
| 22 | GND | power_in | Analog ground return (shared with digital GND). Tie to pin 8 GND. |
| 23 | PC0/ADC0/PCINT8 | bidirectional | Port C bit 0. Alternate functions: ADC0 (analog input channel 0, 10-bit), PCINT8 pin-change interrupt. |
| 24 | PC1/ADC1/PCINT9 | bidirectional | Port C bit 1. Alternate functions: ADC1 (analog input channel 1, 10-bit), PCINT9 pin-change interrupt. |
| 25 | PC2/ADC2/PCINT10 | bidirectional | Port C bit 2. Alternate functions: ADC2 (analog input channel 2, 10-bit), PCINT10 pin-change interrupt. |
| 26 | PC3/ADC3/PCINT11 | bidirectional | Port C bit 3. Alternate functions: ADC3 (analog input channel 3, 10-bit), PCINT11 pin-change interrupt. |
| 27 | PC4/ADC4/SDA/PCINT12 | bidirectional | Port C bit 4. Alternate functions: ADC4 (analog input channel 4, 10-bit), SDA (TWI/I2C data line), PCINT12 pin-change interrupt. |
| 28 | PC5/ADC5/SCL/PCINT13 | bidirectional | Port C bit 5. Alternate functions: ADC5 (analog input channel 5, 10-bit), SCL (TWI/I2C clock line), PCINT13 pin-change interrupt. |
Key specifications
| Parameter | Value |
|---|---|
| Core | 8-bit AVR RISC |
| Flash | 32 KB (self-programming) |
| SRAM | 2 KB |
| EEPROM | 1 KB |
| Max clock | 20 MHz |
| GPIO | 23 (ports B/C/D) |
| ADC | 6-channel 10-bit (DIP) |
| Serial | USART + SPI + I2C (TWI) |
| Timers | 3 (2x 8-bit, 1x 16-bit) with PWM |
| Supply voltage | 1.8-5.5 V |
| Package | PDIP-28 (SPDIP) |
Ordering variants
ATmega328P-PU (PDIP-28, tube)ATmega328P-PN (PDIP-28)
CAD (KiCad official)
- Symbol:
MCU_Microchip_ATmega:ATmega328P-P - Footprint:
Package_DIP:DIP-28_W7.62mm - 3D model: DIP-28 (KiCad packages3D)
- 3D model files:
atmega328p-etched.step/atmega328p-etched.glbcarry the MPN laser-etched on the die in a toggleableAdom.LaserEtchgroup (Fusion-ready);atmega328p.step/atmega328p.glbare the bare package body.
Provenance
Data extracted from the manufacturer datasheet, not a distributor listing:
- Datasheet: Microchip Technology datasheet (653 pp, sha256
b9b9d83cda56a95d, retrieved 2026-08-17, tier: manufacturer) - Extractor:
ds2sf(Claude). Every pin and dimension is cited to a datasheet page; it refuses to fabricate. - CAD: KiCad official libraries (CC-BY-SA 4.0).