ATMEGA328P-PN - 8-bit AVR MCU 20MHz 32KB Flash PDIP-28 | Microchip
MPN: ATMEGA328P-PN ✓ Hoạt độngATMEGA328P-PN Tóm tắt
An 8-bit microcontroller is a single-chip computer whose CPU processes data in 8-bit words, integrating processor core, program memory, data memory, timers, communication peripherals, and analog converters into one package. Within the power-management-free MCU hierarchy, the AVR family from Atmel (now Microchip Technology) popularized single-cycle RISC execution, making the ATmega line a mainstay of embedded control, education, and the Arduino ecosystem.
Key features include 23 programmable general-purpose I/O lines, 6-channel 10-bit ADC, two 8-bit timers, one 16-bit timer, USART, SPI, and TWI (I2C) serial interfaces, plus a watchdog timer, analog comparator, and six sleep modes down to 0.1 uA in power-save mode. The picoPower (p) technology and wide 2.5V to 5.5V supply range support battery-powered designs.
Architecturally, the AVR core uses Harvard memory organization with 131 single-cycle RISC instructions and on-chip debug via debugWIRE, while the flash is segmented for boot-loader self-programming. The 662-page family datasheet documents the complete register set, and the ATmega328P is famously the microcontroller of the Arduino Uno.
Typical applications include Arduino-compatible boards, home appliances, HVAC and motor control, industrial sensing nodes, and hobbyist embedded projects. The through-hole PDIP-28 package makes it ideal for prototyping, socketed production boards, and educational kits.
Design tip: program in-system via ISP header or debugWIRE on the reset pin; keep decoupling capacitors close to VCC and AVCC, and always return AREF to GND through a capacitor if the ADC is used.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet.
Bộ thay thế dễ dàng lắp đặt cho ATMEGA328P-PN — cùng gói, chân-to-chân tương thích. Các bộ phận yêu cầu hàn PCB bị loại trừ.
Các biến thể trong loạt này
Các mẫu cùng loạt có thể lắp đặt dễ dàng tương thích với ATMEGA328P-PN (cùng hình factor và footprint) — khác nhau ở Package, Operating Temperature, ADC, RoHS Status, Serial Interfaces.
ATMEGA328P-PU
✅ Drop-In ⚠️ Thông số chưa được xác minhLiên hệ để biết giá
Xem tài liệu →ATMEGA328-PI
✅ Drop-In ⚠️ Thông số chưa được xác minh📋 Tham chiếu thay thế (không có trong danh mục)
ATMEGA323-8PI
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →ATMEGA168V-10PI
✅ Drop-In ⚠️ Thông số chưa được xác minhLiên hệ để biết giá
Xem tài liệu →LGT8F328P
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
ATMEGA328P-PN Tỷ lệ tối đa & tính chất điện
| Core Architecture | AVR 8-bit RISC |
| Max CPU Frequency | 20 MHz |
| Flash Memory | 32 KB (16K x 16) |
| SRAM | 2 KB |
| EEPROM | 1 KB |
| Supply Voltage Range | 2.5 V to 5.5 V |
| GPIO Count | 23 |
| ADC Resolution | 10-bit, 6 channels |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Communication Interfaces | USART, SPI, TWI (I2C) |
| Nhiệt độ hoạt động | -40C to +105C |
| Hộp | 28-PDIP |
| Kiểu lắp đặt | Through-Hole |
| Programming Interfaces | ISP, debugWIRE |
| Dòng điện chế độ thấp điện năng | 0.1 uA (power-save) |
| Trạng thái RoHS | Green (RoHS compliant) |
| Data Sheets Page Count | 662 pages |
Cấu hình chân ATMEGA328P-PN
| Chân 1 | PC6 / RESET — Reset input or port C bit 6 |
| Chân 2 | PD0 / RXD — USART receive / port D bit 0 |
| Chân 3 | PD1 / TXD — USART transmit / port D bit 1 |
| Chân 4 | PD2 / INT0 — External interrupt 0 / port D bit 2 |
| Chân 5 | PD3 / INT1 / OC2B — Interrupt 1, Timer2 PWM / port D bit 3 |
| Chân 6 | PD4 / T0 / XCK — Timer0 clock, USART XCK / port D bit 4 |
| Chân 7 | VCC — Digital supply voltage |
| Chân 8 | GND — Ground |
| Chân 9 | PB6 / XTAL1 / TOSC1 — Crystal oscillator input / port B bit 6 |
| Chân 10 | PB7 / XTAL2 / TOSC2 — Crystal oscillator output / port B bit 7 |
| Chân 11 | PD5 / T1 / OC0B — Timer1 clock, Timer0 PWM / port D bit 5 |
| Chân 12 | PD6 / AIN0 / OC0A — Comparator positive input, PWM / port D bit 6 |
| Chân 13 | PD7 / AIN1 — Comparator negative input / port D bit 7 |
| Chân 14 | PB0 / ICP1 / CLK0 — Timer1 input capture, clock output / port B bit 0 |
| Chân 15 | PB1 / OC1A — Timer1 PWM output A / port B bit 1 |
| Chân 16 | PB2 / SS / OC1B — SPI slave select, Timer1 PWM B / port B bit 2 |
| Chân 17 | PB3 / MOSI / OC2A — SPI master out, Timer2 PWM / port B bit 3 |
| Chân 18 | PB4 / MISO — SPI master in / port B bit 4 |
| Chân 19 | PB5 / SCK — SPI serial clock / port B bit 5 |
| Chân 20 | AVCC — ADC supply voltage |
| Chân 21 | AREF — ADC analog reference |
| Chân 22 | GND — Ground |
| Chân 23 | PC0 / ADC0 — ADC input 0 / port C bit 0 |
| Chân 24 | PC1 / ADC1 — ADC input 1 / port C bit 1 |
| Chân 25 | PC2 / ADC2 — ADC input 2 / port C bit 2 |
| Chân 26 | PC3 / ADC3 — ADC input 3 / port C bit 3 |
| Chân 27 | PC4 / ADC4 / SDA — ADC 4, TWI data / port C bit 4 |
| Chân 28 | PC5 / ADC5 / SCL — ADC 5, TWI clock / port C bit 5 |
Ứng dụng tiêu biểu
ATMEGA328P-PN phù hợp cho 6 Áp dụngs: Arduino-Compatible Development Boards, Industrial Sensing and Control Nodes, Home Appliances and White Goods, Battery-Powered IoT and Remote Sensor Terminals, Repair, Retrofit, and Legacy Board Maintenance, Robotics and Hobbyist Embedded Projects.
Arduino-Compatible Development Boards
The ATMEGA328P-PN is the core MCU of the Arduino Uno R3 architecture, and its through-hole PDIP-28 package is socketed on countless clones, shields, and educational kits. Its 32KB flash holds the Arduino bootloader with roughly 2KB still free for user sketches on a standard Uno build, while 2KB SRAM supports typical Processing-style sketches. Loaded with the Uno bootloader and clocked at 16 MHz from a resonator, it programs directly from the Arduino IDE over serial. The +105C rating tolerates enclosures and warm bench conditions that commercial-grade parts cannot, and the socketed DIP allows beginners to hot-swap chips without rework equipment, making it the definitive learning microcontroller.
Được đề xuất
Industrial Sensing and Control Nodes
The -40C to +105C industrial temperature rating of the ATMEGA328P-PN makes it suitable for sensor nodes mounted in HVAC plenums, motor cabinets, and outdoor enclosures. The 6-channel 10-bit ADC reads thermistors, potentiometers, and 0-5V industrial transmitters, while the USART bridges to RS-485 transceivers for Modbus RTU slaves and the TWI port reads I2C pressure or humidity sensors. Its 0.1 uA power-save sleep current supports battery-backed monitoring points that wake on interrupt. WDT-based recovery ensures autonomous restart after supply transients common in factory power, and EEPROM calibration data survives years of field operation within the rated 100,000 write cycles.
Được đề xuất
Home Appliances and White Goods
Appliance control boards such as fan speed, washing cycles, and heater sequencing benefit from the ATMEGA328P-PN's combination of industrial temperature tolerance, wide 2.5V to 5.5V supply, and brown-out-safe operation. The three timers with PWM channels drive triac triggering or brushless motor drivers, and the analog comparator provides zero-cross detection for AC load control. The 1KB EEPROM stores cycle counters and user settings through power interruptions. Through-hole PDIP construction resists solder-joint fatigue on boards subject to vibration, and the well-documented register set shortens firmware development for appliance OEMs maintaining long product lifecycles and spare-parts inventories.
Được đề xuất
Battery-Powered IoT and Remote Sensor Terminals
With power-save sleep current of 0.1 uA and a wide 2.5V supply floor, the ATMEGA328P-PN runs years from lithium primary cells in remote logging nodes. A typical duty cycle wakes the core from power-save on watchdog or pin-change interrupt, samples the 10-bit ADC, transmits over USART to a LoRa or RF module, and returns to sleep in under 100 ms, keeping average current in the tens of microamps. The internal 8 MHz RC oscillator removes crystal cost for timing-tolerant applications. EEPROM wear-leveled storage preserves logging indexes, and the 105C rating covers solar-heated enclosures where battery compartments exceed standard commercial limits.
Được đề xuất
Repair, Retrofit, and Legacy Board Maintenance
Service technicians frequently socket-replace ATmega328P family chips in industrial controllers, 3D printer boards, and test fixtures. Because the ATMEGA328P-PN shares the PDIP-28 footprint with ATMEGA328-PI, ATMEGA323-8PI, and ATMEGA168V-10PI parts, an authentic 32KB picoPower replacement restores function without PCB changes. Reflashing the firmware via the ISP header (MOSI/MISO/SCK/RESET on pins 17-19 and 1) takes minutes with a USBasp, and the debugWIRE interface aids fault-finding on boards without test points. Availability across roughly 12 distributors per Octopart reduces downtime when original commercial-temperature stock is exhausted.
Được đề xuất
Robotics and Hobbyist Embedded Projects
Hobby robots, RC telemetry, and maker projects leverage the ATMEGA328P-PN's 20 MIPS throughput, six PWM channels, and interrupt-driven input capture for encoder reading. At 5V, its GPIO sources up to 20 mA per pin, directly driving LEDs and small relays via transistors, while the SPI port streams data to IMU breakouts. The 32KB flash accommodates the Servo, SensorFusion, and communication libraries typical of Arduino robotics sketches. The PDIP package's field-replaceability suits iterative prototyping: corrupted bootloader from miswiring is fixed by swapping a $3 chip rather than desoldering a QFN. Community debugging resources for this exact die are unmatched.
Được đề xuất
Tóm tắt các sản phẩm được đề xuất
Dữ liệu tham khảo kỹ thuật cho ATMEGA328P-PN — so sánh, hướng dẫn thiết kế và thông tin tuân thủ.
Hướng dẫn chọn lựa
So sánh với các sản phẩm thay thế
| Tham số | Sản phẩm này | ATMEGA328P-PU | ATMEGA328-PI | ATMEGA323-8PI | ATMEGA168V-10PI | LGT8F328P |
|---|---|---|---|---|---|---|
| Package | 28-PDIP | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same | 28-PDIP - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Will Semiconductor |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB | 16 KB | 32 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 1 KB | 2 KB |
| EEPROM | 1 KB | 1 KB | 1 KB | 1 KB | 0.5 KB | 1 KB |
| Max Frequency | 20 MHz | 20 MHz | 20 MHz | 8 MHz | 10 MHz | 32 MHz |
| picoPower Technology | Yes | Yes | No | No | No (V = low voltage) | No |
Bảo phân biệt quan trọng
- Industrial +105C temperature rating (vsATMEGA328P-PU)
- picoPower low-current design (vsATMEGA328-PI)
- Full 32KB flash at up to 20 MHz (vsATMEGA323-8PI)
Ghi chú thiết kế
Connect VCC (pin 7) and AVCC (pin 20) to the same supply rail, each with a 100 nF ceramic decoupling capacitor placed within 5 mm of the pin. AVCC must never be left floating even when the ADC is unused, and the ADC accuracy degrades if AVCC carries digital switching noise; an LC filter (10 uH inductor plus 10 uF capacitor) on AVCC restores full 10-bit performance in mixed-signal boards.
Tie AREF (pin 21) to GND through a 100 nF capacitor when using the internal reference or VCC as the ADC reference; never connect an external reference directly without removing the internal reference source. Use a crystal with two 18-22 pF load capacitors on XTAL1/XTAL2 (pins 9-10) for full 20 MHz operation, keeping trace lengths under 10 mm. Reset (pin 1) needs a 10 kOhm pull-up for reliable ISP and brown-out-free startup.
Do not exceed 20 MHz at supply voltages below 4.5V - the datasheet frequency-voltage derating curve limits 3.3V operation to roughly 13.3 MHz. Avoid burning the RSTDISBL fuse unless external reset is never required, as it permanently disables ISP and can brick socketed parts. When using debugWIRE, remember the DWEN fuse requires high-voltage parallel programming to clear; budget for a programming header in every production board.
Thông tin tuân thủ
DigiKey and FindIC listings describe the ATMEGA328P-PN as a Green, 105C-rated RoHS part. REACH, halogen-free, and conflict-minerals status not stated in provided data - consult Microchip product compliance portal.