Part Number: ATMEGA328P-PU

Manufacturer: Microchip Technology

Description: IC MCU 8BIT 32KB FLASH 28DIP

Shipped from: Shenzhen/HK Warehouse

Stock Available: Check with us

Technical Specifications of ATMEGA328P-PU

Datasheet  ATMEGA328P-PU datasheet
Category Integrated Circuits (ICs)
Family Embedded – Microcontrollers
Manufacturer Atmel
Series AVR? ATmega
Packaging Tube
Part Status Active
Core Processor AVR
Core Size 8-Bit
Speed 20MHz
Connectivity I2C, SPI, UART/USART
Peripherals Brown-out Detect/Reset, POR, PWM, WDT
Number of I/O 23
Program Memory Size 32KB (16K x 16)
Program Memory Type FLASH
EEPROM Size 1K x 8
RAM Size 2K x 8
Voltage – Supply (Vcc/Vdd) 1.8 V ~ 5.5 V
Data Converters A/D 6x10b
Oscillator Type Internal
Operating Temperature -40°C ~ 85°C (TA)
Package / Case 28-DIP (0.300″, 7.62mm)
Supplier Device Package 28-PDIP

ATMEGA328P-PU Description

With its AVR® improved RISC architecture, the ATMEGA328P-PU is a low-power, CMOS 8-bit microcontroller. Devices achieve CPU performance of around one million instructions per second (MIPS) per megahertz by executing instructions in a single clock cycle, giving the system designer more control over power usage while maintaining acceptable processing speeds.

ATMEGA328P-PU Features

  • When it comes to microcontrollers, nothing beats the cutting-edge performance and low power consumption of the AVR 8-Bit Microcontroller Family. The microcontroller’s cutting-edge RISC design allows it to execute 131 strong instructions in a single clock cycle, making it a superb choice for your application.
  • The microcontroller’s totally static operation and 32 by 8 set of general-purpose working registers guarantee dependable and consistent operation. The microcontroller can provide lightning-fast performance, with a throughput of up to 20 MIPS at 20MHz. The 2-cycle multiplier integrated within the chip significantly improves its processing speed.
  • High endurance non-volatile memory segments are also included in the microcontroller. These include 256/512/1KBytes of EEPROM, 512/1K/1K/2KBytes of internal SRAM, and 4/8/16/32KBytes of In-System Self-Programmable Flash program memory. These memory chunks can keep their information for up to 20 years at 85°C and 100 years at 25°C, and they can endure up to 10,000 write/erase cycles for Flash and 100,000 for EEPROM.
  • The True Read-While-Write functionality made possible by the on-chip boot program allows for easier in-system programming. The code you’ve worked hard on is more secure, thanks to the programming lock.
  • Capacitive touch applications such as buttons, sliders, and wheels are possible thanks to the QTouch library supported by the microcontroller. The microcontroller’s ability to support 64 sense channels makes it a versatile solution for various touch-sensing requirements.
  • The microcontroller’s peripherals consist of a 16-bit timer/counter with independent prescaler, comparison, and capture modes, as well as two 8-bit timer/counters with their own independent prescalers and compare modes. Due to these capabilities, the microcontroller can be used in various settings.

Feature Description


The central processing unit’s primary job is to guarantee reliable software operation. CPU functionality includes memory access, computation, peripheral control, and interrupt handling. The AVR employs a Harvard architecture, which features dedicated program and data memory, and buses to increase performance and parallelism. Single-level pipelining is used to carry out the instructions stored in the program memory. The next instruction is pre-fetched from the program memory while the current one is executed. Because of this idea, instructions can be carried out during each tick of the clock. The OS is installed in rewritable flash memory that runs in the system memory. There are 32 8-bit general-purpose working registers in the fast-access Register File, and each can be accessed in a single clock cycle. This paves the way for Arithmetic Logic Unit (ALU) functionality in a single cycle. During a single clock cycle, the ALU transfers data from the Register File to the Operand Register, performs the operation, and returns the result to the Register File. Effective address computation is made possible by allocating six of the 32 registers as pointers to three 16-bit indirect address registers for the Data Space. Flash program memory lookup tables can be accessed through one of these address points.

The ALU allows for arithmetic and logic operations between registers or between a register and a constant. The ALU can also perform operations with a single register. The outcome of an arithmetic operation is recorded in the Status Register when the operation has been completed. Instructions to jump or call provide program flow, and these instructions can reach anywhere in memory. The standard AVR instruction word size is 16. Each address in the computer’s memory map corresponds to a 16- or 32-bit command. There are two distinct parts to the available flash memory space for programs: the boot program and the application programs. The Lock bits in both of these regions can be used to prevent unauthorized changes to the data. Boot programs must contain the SPM instruction that writes to the Application Flash memory partition. The Stack is used to save the Program Counter (PC) temporarily, and the return address of the calling code when an interrupt or subroutine is invoked.

Since the Stack is essentially allocated in the general data SRAM, its size is constrained only by the total size of the SRAM and the amount of data currently stored in it. The SP must be initialized by every user program in the Reset procedure (before subroutines or interrupts are executed). The SP can be accessed for reading and writing in the I/O address space. The AVR design allows for five distinct addressing modes to quickly and easily access the data SRAM. In the AVR design, the memory areas are mapped out linearly and uniformly. I/O space control registers and a Global Interrupt Enable bit in the Status Register make up a versatile interrupt module. The Interrupt Vector table has a unique Interrupt Vector for each interrupt.

Interrupts are prioritized based on their position in the Interrupt Vector. As the address of the Interrupt Vector decreases, its relative importance increases. 64 locations in the I/O memory area are dedicated to CPU peripherals such as Control Registers, SPI, and other I/O operations. The I/O Memory is accessible directly, or through the Data Space offsets 0x20-5F that follow the Register File. In addition, the Extended I/O area in SRAM for the ATmega48A/PA/88A/PA/168A/PA/328/P is only accessible with the ST/STS/STD and LD/LDS/LDD instructions.

ALU – Arithmetic Logic Unit

All 32 general-purpose working registers are connected directly to the high-performance AVR ALU, allowing seamless operation. Additions, subtractions, and multiplications between general-purpose registers and between a register and an immediate are all performed in a single clock cycle. The functions of an ALU can be broken down into three broad classes: arithmetic, logic, and bit operations. There is a robust multiplier available in some design implementations, which can do signed/unsigned multiplication and handle fractional formats.

Status Register

Whenever an arithmetic instruction is completed, its result is recorded in the Status Register. Based on this data, the program’s execution can be redirected to carry out conditional tasks. Refer to the Instruction Set Reference for a full list of ALU operations that trigger an update to the Status Register. As a result, you won’t have to use the specialized compare instructions as often, making your code quicker and smaller. The Status Register is not saved before entering an interrupt routine or restored after it completes. The software must manage this.

AVR Memories

Data Memory and Program Memory are the two primary types of memory in the AVR architecture. In addition, there is an EEPROM Memory on the ATmega48A/PA/88A/PA/168A/PA/328/P to keep information. There is a consistent linearity throughout all three memory domains.


When it comes to microcontrollers, the ATMEGA328P-PU is one of the best options available. Anyone curious about microcontrollers would do well to start there because of their small form factor, strong performance capabilities, and robust processing speed. Visit ICRFQ for details and ordering information on the ATMEGA328P-PU.

As your trusted electronic component distributor in China, ICRFQ is dedicated to providing you with the highest quality products at unbeatable prices. Our team of experts is here to help you every step of the way, ensuring that you receive the support and guidance you need to get started with your project. So why wait? Contact ICRFQ today to learn more about the ATMEGA328P-PU and how we can help you bring your ideas to life!

4.8/5 - (397 votes)
Kevin Chen