ATMEGA328PB-ANR - 8-Bit AVR MCU 20MHz 32KB Flash TQFP-32 | Microchip
料号: ATMEGA328PB-ANR ✓ 量产中| 数量 | 单价 | 小计 |
|---|---|---|
| 1 | $1.99 | $1.99 |
| 10 | $1.85 | $18.50 |
| 100 | $1.62 | $162.00 |
| 500 | $1.45 | $725.00 |
| 1,000 | $1.3 | $1,300.00 |
ATMEGA328PB-ANR 概述
An 8-bit AVR microcontroller is a single-chip processor based on the AVR enhanced RISC architecture, in which most instructions execute in a single clock cycle to achieve throughput close to 1 MIPS per MHz. Within the power-management hierarchy, an MCU integrates the CPU, program memory, data memory, timers, communication peripherals, and analog blocks, replacing multi-chip logic solutions in embedded control systems.
Key features include 27 general-purpose I/O lines, 32 general-purpose working registers, and a richer peripheral set than the ATmega328P: the 328PB adds a second SPI interface, a second TWI (I2C) interface, an additional USART (three total), and two extra 16-bit timer/counters. The picoPower technology supports multiple sleep modes for ultra-low-power battery operation, and read-while-write Flash enables in-system programming without halting execution.
Architecturally, the device combines a Harvard-structure AVR core with a two-stage pipeline, hardware multiply, and flexible interrupt controller. Analog peripherals include a 10-bit ADC and analog comparators, while flexible timer/counter modules with PWM outputs drive motor, lighting, and power-conversion tasks. The extended -40C to +105C rating (the -AN suffix distinguishes it from the standard -40C to +85C -AU grade) suits deployments near heat sources such as power supplies and motors.
Typical applications include Arduino-compatible embedded controllers, industrial sensor nodes, HVAC and appliance control boards, and battery-powered IoT end nodes. Its backward software compatibility with the hugely popular ATmega328P protects existing code investments while providing more serial interfaces for expanding system connectivity.
A key design consideration: per Microchip and community migration notes, the 328PB is software-compatible with the 328P but exposes the added Port E and second buses on different pin locations; verify the 32-pin TQFP pinout against the datasheet when migrating legacy designs.
This page synthesizes verified distributor pricing, drop-in TQFP-32 alternatives, pinout data, and practical design notes not consolidated in the manufacturer datasheet.
直接替换替代料: ATMEGA328PB-ANR ——相同封装,引脚兼容。需要 PCB 改动的不同封装料号已排除。
本系列中的变体
可与以下型号直接替换的同系列型号: ATMEGA328PB-ANR (相同外形与封装尺寸) ——差异在于 Package, Working Registers, Communication Interfaces, Operating Temperature, Throughput.
快速对比工具——选择替代料号进行并排对比:
ATMEGA328PB-AN
✅ 直接替换✓ 有现货
$1.66 / 个
查看数据手册 →ATMEGA328PB-AUR
✅ 直接替换 ⚠️ 规格未核验✓ 有现货
$1.31 / 个
查看数据手册 →ATMEGA328PB-AU
✅ 直接替换 ⚠️ 规格未核验✓ 有现货
$1.12 / 个
查看数据手册 →ATMEGA328P-AN
✅ 直接替换📋 参考替代料(不在目录中)
ATMEGA328P-AUR
✅ 直接替换 ⚠️ 规格未核验✓ 有现货
$2.18 / 个
查看数据手册 →ATMEGA168PB-AUR
✅ 直接替换 ⚠️ 规格未核验✓ 有现货
$1.58 / 个
查看数据手册 →ATMEGA328PB-ANR 最大额定值与电气特性
| Core Processor | AVR 8-bit RISC |
| Core Size | 8-bit |
| Speed | 20 MHz |
| Flash Memory | 32 KB (16K x 16) |
| EEPROM | 2 KB |
| SRAM | 4 KB |
| Operating Voltage Range | 1.8 V to 5.5 V |
| Number of I/O | 27 |
| General Purpose Working Registers | 32 |
| USART Peripherals | 3 |
| SPI Peripherals | 2 |
| I2C (TWI) Peripherals | 2 |
| ADC Resolution | 10-bit |
| 工作温度 | -40C to +105C |
| 封装 | 32-TQFP (7 x 7 mm) |
| 安装类型 | Surface Mount |
| Connectivity | I2C, SPI, UART/USART |
| Programmability | In-System Programmable (ISP), read-while-write |
ATMEGA328PB-ANR 引脚配置
| 引脚 1 | PE0/AIN0 — Port E bit 0 / Analog Comparator negative input |
| 引脚 2 | PE1/AIN1 — Port E bit 1 / Analog Comparator positive input |
| 引脚 3 | GND — Ground |
| 引脚 4 | VCC — Digital supply voltage |
| 引脚 5 | GND — Ground |
| 引脚 6 | VCC — Digital supply voltage |
| 引脚 7 | PB6/XTAL1/TOSC1 — Port B bit 6 / crystal oscillator input |
| 引脚 8 | PB7/XTAL2/TOSC2 — Port B bit 7 / crystal oscillator output |
| 引脚 9 | PD5/XCK0/T0 — Port D bit 5 / USART0 external clock / Timer0 clock |
| 引脚 10 | PD6/AIN0/OC0A — Port D bit 6 / analog comparator / Timer0 PWM output |
| 引脚 11 | PD7/AIN1/OC1A — Port D bit 7 / analog comparator / Timer1 PWM output |
| 引脚 12 | PB0/SS/PCINT0 — Port B bit 0 / SPI slave select |
| 引脚 13 | PB1/OC1A/PCINT1 — Port B bit 1 / Timer1 PWM output |
| 引脚 14 | PB2/SS/OC1B/PCINT2 — Port B bit 2 / SPI slave select / Timer1 PWM output |
| 引脚 15 | PB3/MOSI/OC2A/PCINT3 — Port B bit 3 / SPI master output / Timer2 PWM output |
| 引脚 16 | PB4/MISO/PCINT4 — Port B bit 4 / SPI master input |
| 引脚 17 | PB5/SCK/PCINT5 — Port B bit 5 / SPI serial clock |
| 引脚 18 | AVCC — ADC supply voltage |
| 引脚 19 | PE2/OC1B — Port E bit 2 / Timer1 PWM output |
| 引脚 20 | AREF — ADC analog reference |
| 引脚 21 | GND — Ground |
| 引脚 22 | PE3/OC3A — Port E bit 3 / Timer3 PWM output |
| 引脚 23 | PC0/ADC0 — Port C bit 0 / ADC channel 0 |
| 引脚 24 | PC1/ADC1 — Port C bit 1 / ADC channel 1 |
| 引脚 25 | PC2/ADC2 — Port C bit 2 / ADC channel 2 |
| 引脚 26 | PC3/ADC3 — Port C bit 3 / ADC channel 3 |
| 引脚 27 | PC4/ADC4/SDA — Port C bit 4 / ADC channel 4 / TWI data |
| 引脚 28 | PC5/ADC5/SCL — Port C bit 5 / ADC channel 5 / TWI clock |
| 引脚 29 | PC6/RESET — Port C bit 6 / Reset input |
| 引脚 30 | PD0/RXD0 — Port D bit 0 / USART0 receive |
| 引脚 31 | PD1/TXD0 — Port D bit 1 / USART0 transmit |
| 引脚 32 | PD2/RXD1/INT0 — Port D bit 2 / USART1 receive / external interrupt 0 |
典型应用
ATMEGA328PB-ANR 适用于 6 应用s: Arduino-Compatible Embedded Controllers, Industrial Sensor Nodes and Field Instrumentation, Battery-Powered IoT End Nodes, HVAC and Appliance Control Boards, Motor Control and PWM Power Conversion, Security and Access-Control Devices.
Arduino-Compatible Embedded Controllers
The ATMEGA328PB-ANR is the successor MCU used in Arduino UNO-compatible and Nano-compatible boards, and its 32 KB Flash / 2 KB EEPROM / 4 KB SRAM memory set plus bootloader-friendly ISP support make it a natural fit for the maker ecosystem. Software and fuse compatibility with the ATmega328P means existing sketches, cores, and toolchains (avr-gcc, Arduino IDE) run unchanged, while the added second SPI, second TWI, and third USART let shield-based designs add displays, sensors, and radios without bus arbitration hacks. The 20 MHz clock and 1 MIPS/MHz throughput deliver responsive real-time behavior for robotics and automation hobby projects.
推荐
Industrial Sensor Nodes and Field Instrumentation
With a -40C to +105C operating range, the ATMEGA328PB-ANR survives enclosure-mounted deployments near motors, drives, and power supplies where standard +85C-graded -AU variants would be marginal. The 10-bit ADC with internal reference digitizes bridge and ratiometric sensors, while dual TWI and dual SPI interfaces let one MCU aggregate multiple sensor ICs on separate isolated buses. picoPower sleep modes cut average draw in duty-cycled monitoring nodes, and the 1.8 V low end supports 3.6 V LiSOCl2 primary cells common in metering. The 32-TQFP 7x7 mm footprint fits compact DIN-rail and PCB-mounted transmitter form factors.
推荐
Battery-Powered IoT End Nodes
For multi-year battery designs, the ATMEGA328PB-ANR combines picoPower sleep modes, a 1.8-5.5 V supply range, and flexible clocking (internal 8 MHz RC or external crystals) so firmware can trade speed against current aggressively. A node can sleep in power-down between sensor reads on the dual TWI buses, wake on pin-change or watchdog interrupts, and push data over a USART-connected radio. The 4 KB SRAM hosts lightweight MQTT-style stacks or LoRaWAN-class MAC layers. Running from a single Li-ion cell eliminates an LDO dropout penalty at 3.3 V, and the -ANR temperature grade covers outdoor enclosures exposed to solar heating.
推荐
HVAC and Appliance Control Boards
Appliance and HVAC controllers benefit from the ATMEGA328PB-ANR's multiple 16-bit timer/counters with complementary PWM outputs, which drive blower motors, valve actuators, and heater elements with hardware-generated waveforms independent of CPU load. The extended +105C rating tolerates control-box temperatures near heating elements, and the 10-bit ADC reads NTC thermistor ladders for multi-zone temperature sensing. Dual TWI interfaces separate a user-interface bus (display, keypad controller) from a sensor bus, improving robustness. Its Flash endures frequent field firmware updates via self-programming read-while-write support, and the 27 I/O lines handle relays, buttons, and indicators in one chip.
推荐
Motor Control and PWM Power Conversion
The ATMEGA328PB-ANR provides multiple flexible 16-bit timer/counter modules with input capture, dead-time-capable PWM, and high-speed PWM modes suited to small BLDC fans, servo drivers, and LED dimming converters. Hardware capture inputs measure tachometer periods precisely for closed-loop fan speed control, while the analog comparator supports cycle-by-cycle current limiting in buck topologies. At 20 MHz the core executes FOC-lite or trapezoidal commutation loops for small motors with margin. The +105C grade suits motor-adjacent mounting, and dual SPI lets a resolver or encoder interface coexist with a debugging/telemetry port on the third USART.
推荐
Security and Access-Control Devices
Access-control keypads, RFID readers, and small alarm panels use the ATMEGA328PB-ANR's 27 I/O lines to scan matrix keypads, drive indicators, and toggle door-strike relays from one MCU. The dual TWI buses isolate a secure-element or RTC bus from the peripheral bus, and EEPROM retains user codes and event logs through power loss. Watchdog timer and brown-out detection (per datasheet BOD options) deliver the self-recovery behavior security products require. Operating down to 1.8 V allows battery-backup operation during mains outage, and the -40C rating suits unheated outdoor reader enclosures.
推荐
推荐产品汇总
工程参考数据: ATMEGA328PB-ANR ——对比、设计指导和合规信息。
选型指南
与替代料对比
| 参数 | 本产品 | ATMEGA328PB-AN | ATMEGA328PB-AU | ATMEGA328P-AN | ATMEGA168PB-AUR |
|---|---|---|---|---|---|
| Package | 32-TQFP (7x7 mm) | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same | 32-TQFP (7x7 mm) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 32 KB | 32 KB | 32 KB | 32 KB | 16 KB |
| SRAM | 4 KB | 4 KB | 4 KB | 2 KB | 1 KB |
| SPI / TWI / USART Count | 2 / 2 / 3 | 2 / 2 / 3 | 2 / 2 / 3 | 1 / 1 / 2 | 2 / 2 / 2 |
| General Purpose I/O | 27 | 27 | 27 | 22 | 27 |
| Packaging | Tape & Reel | Cut Tape / Tray | Tray | Tape & Reel | Tape & Reel |
| Lifecycle Status | Active (recommended for new designs) | Active | Active | Active (not recommended for new designs) | Active |
关键差异点
- Richest peripheral set in the ATmega328 TQFP-32 family (对比 ATMEGA328P-AN)
- Extended -40C to +105C industrial temperature rating (对比 ATMEGA328PB-AU)
- Recommended successor with software backward compatibility (对比 ATMEGA328P-AN)
设计说明
Decouple both VCC pins (4, 6) and AVCC (pin 18) with 100 nF ceramic capacitors placed within 5 mm of each pin, plus one 4.7-10 uF bulk capacitor per supply rail. Tie AVCC to VCC through a low-pass LC filter when ADC accuracy matters, and keep the AREF node (pin 20) clean with a 100 nF cap to GND - never place a large capacitor directly on AREF when using the internal reference. Route the crystal (pins 7-8) with short traces and guard with ground pour per the Microchip AVR hardware design considerations app note.
When migrating from ATmega328P, remember the 328PB 'officially not a drop-in' status: PE0/PE1 (pins 1-2) and the added PE2/PE3 functions differ from 328P pin maps on some TQFP-32 footprints. Also update the toolchain device selection and signature bytes when burning bootloaders - Arduino cores need a 328PB-specific board definition, otherwise uploading fails at signature check. Do not exceed 20 MHz; overclocking voids the datasheet timing and flash reliability guarantees across the full -40C to +105C range.
Enable Brown-Out Detection (BOD) fuse at an appropriate threshold (e.g., 2.7 V for 5 V systems) so Flash writes are suppressed during supply sag - a corrupted EEPROM is the most common field failure in unattended MCU nodes. Estimate: at 5 V and 20 MHz, active current is in the ~10 mA class per datasheet typical curves; a duty-cycled sensor node sleeping at ~1 uA-class power-down current averages far less, letting a 2400 mAh Li-ion cell run for years with a 1% duty cycle.
Treat RESET (pin 29) with care: keep the trace short, add a 10 k pull-up, and expose a programming header with ISP signals (MOSI/MISO/SCK/RESET) on every production PCB. For long external interrupt or clock lines to INT0 or T0, add series termination (22-100 ohm) to control ringing. The dual TWI buses should each have their own pull-ups (4.7 k for 5 V, 2.2-4.7 k for 3.3 V) sized for bus capacitance rather than sharing one bus across isolated sensor groups.
合规信息
Distributor listings (DigiKey, LCSC) indicate RoHS-compliant lead-free finish; detailed REACH and halogen status should be confirmed via the Microchip product page for this ordering code.