Difference between Atmega328 and Atmega328p, ATMEGA328/328P pinout, Atmega328/328P Block Diagram, Memory Size Atmega328/328P, ATMAEGA328/328P PACKAGES, Specifications of ATMAEGA328/328P

Due to a slight difference between ATmega328 and ATmega328P, many of us get confused about which IC should be used. So in this blog, we will be talking about the common as well as the different aspects of this microcontroller IC.

As we know their are many similarities between both the ATmega-328/328P microcontrollers so let us first go through the similarities then we will be talking about the difference. 

INTRODUCTION

ATmega328/328P is an Advanced Virtual RISC (AVR) microcontroller. It supports 8-bit data processing. ATmega-328/328P has 32KB internal flash memory. ATmega328/328P has 1KB Electrically Erasable Programmable Read-Only Memory (EEPROM). This property shows if the electric supply supplied to the micro-controller is removed, even then it can store the data and can provide results after providing it with the electric supply. Moreover, ATmega-328 has 2KB Static Random Access Memory (SRAM). ATmega328/328P is a 28-Pin AVR Microcontroller, manufactured by Microchip, follows RISC Architecture and has a flash-type program memory of 32KB. 

ATMEGA328/328P pinout

ATmega-328/328P is an AVR Microcontroller having twenty-eight (28) pins in total.

-28PIN PDIP

 

ATMEGA328 pinout, ATMEGA328P pinout, ATMEGA328P IC, ATMEGA328 IC, 28PIN PDIP ATMEGA328

-28PIN MLF

ATMEGA328 pinout, ATMEGA328P pinout, ATMEGA328P IC, ATMEGA328 IC, 28PIN MLF ATMEGA328

VCC is a digital voltage supply.

AVCC is a supply voltage pin for analog to digital converter.

GND denotes Ground

PB0 to PB7, Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and input to the internal clock operating circuit. Depending on the clock selection fuse settings, PB7 can be used as output from the inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as a chip clock source, PB7...6 is used as TOSC2...1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set. 

PC0 to PC5, Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The PC5-0 output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running.                                                               

PC6, If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a Reset

PD0 to PD7, Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running.

AREF is an analog reference pin for analog to digital converter.

Atmega328/328P Block Diagram

Atmega328/328P Block Diagram

The AVR core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. 

The device is manufactured using Atmel’s high-density nonvolatile memory technology. The On-chip ISP Flash allows the program memory to be reprogrammed In-System through an SPI serial interface, by a conventional non-volatile memory programmer, or by an On-chip Boot program running on the AVR core. The Boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash section will continue to run while the Application Flash section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega328/328P is a powerful microcontroller that provides a highly flexible and cost-effective solution to many embedded control applications.

The ATmega328/328P AVR is supported with a full suite of program and system development tools including C Compilers, Macro Assemblers, Program Debugger/Simulators, In-Circuit Emulators, and Evaluation kits

 

Memory Size Atmega328/328P

  • ATmega 328/328P has three types of memories, named:

Flash Memory: 32KB. It is a Programmable Read-Only Memory (ROM). It is a nonvolatile memory.

RAM: 2KB. Stands for Random Access Memory. It is a volatile memory i.e. data will be removed after removing the power supply.

EEPROM: 1KB. Stands for Electrically Erasable Programmable Read-Only Memory.

ATMAEGA328/328P PACKAGES

  • The different versions of the same device are denoted by the different packages of that device.
  • Each package has different dimensions, in order to differentiate easily.
  • ATmega 328/328P packages are given in the table shown below.

ORDERING CODE

PACKAGE

ATmega328/328P-AU

32A

ATmega328/328P-AUR

32A

ATmega328/328P-MU

32M1-A

ATmega328/328P-MUR

32M1-A

ATmega328/328P-PU

28P3

  • SPEED(MHz) - 20
  • POWER SUPPLY(V) - 1.8 - 5.5
  • OPERATIONAL RANGE - Industrial(-40C - 85C)

ATmega328/328P & ARDUINO UNO

  • ATmega328/328P is the microcontroller used in the Arduino UNO board.
  • When we upload code in Arduino UNO, it’s actually uploaded in the Atmega328328P Microcontroller.
  • A software driver called bootloader is pre-installed in the flash memory of the Atmega328 microcontroller, which makes it compatible with Arduino IDE.

ATmega328/328P and ARDUINO UNO pins:

ATmega328/328P Pins & ARDUINO UNO pins

ATmega328/328P pins are connected to the corresponding pins of Arduino. Their connectivity with each other is shown in the pinout diagram shown in the figure given below.

 Although Atmega328P and Atmega328 are the same in every sense architecturally. So you can just drop in a 328p in place of a 328 and vice versa.

 

DIFFERENCE BETWEEN ATMEGA328/328P

Atmega328P just consumes lower power than Atmega328. Look up the numbers in the datasheet. This means that the 328P is manufactured in a finer process than the 328. Ex: 328 could be a 90nm process and 328P could be a 60nm process. TQFP package variant of the chip is available only in 328P and not 328. That is because you need a finer process to get a smaller chip die to fit in a smaller package like the TQFP.

The chip signatures of 328P and 328 are different. So if any program is reading these signatures to make a decision ( in Arduino), then you will have to watch out as the software could complain saying that the wrong chip was used.

Many people also have confusion regarding 328P and 328-PU. The P in the first case(328P) indicates pico power. The P in the second case(328-PU) indicates the package (PDIP). If you wanted the pico power chip in a PDIP package, you should have gotten ATMEGA328P-PU.

 

Specifications

Description

ATmega328/328P

Operating Voltage

1.8 - 5.5V

Temperature Range

-40°C to 105°C

Power Consumption at 1MHz, 1.8V, 25°C

-Active Mode: 0.2mA 

– Power-down Mode: 0.1μA 

– Power-save Mode: 0.75μA (Including 32kHz RTC)

Advanced RISC Architecture 

131 Powerful Instructions

 – Most Single Clock Cycle Execution

 – 32 x 8 General Purpose Working Registers

– Fully Static Operation 

– Up to 20 MIPS Throughput at 20MHz

– On-chip 2-cycle Multiplier

High Endurance Non-volatile Memory Segments

– 32KBytes of In-System Self-Programmable Flash program Memory 

– 1KBytes EEPROM

– 2KBytes Internal SRAM 

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM 

– Data Retention: 20 years at 85°C/100 years at 25°C(1) 

– Optional Boot Code Section with Independent Lock Bits 

• In-System Programming by On-chip Boot Program 

• True Read-While-Write Operation 

– Programming Lock for Software Security

Peripheral Features

– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode 

– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode 

– Real Time Counter with Separate Oscillator 

– Six PWM Channels 

– 8-channel 10-bit ADC in TQFP and QFN/MLF package 

• Temperature Measurement 

– 6-channel 10-bit ADC in PDIP Package 

• Temperature Measurement 

– Two Master/Slave SPI Serial Interface 

– One Programmable Serial USART

– One Byte-oriented 2-wire Serial Interface (Philips I2C compatible) 

– Programmable Watchdog Timer with Separate On-chip Oscillator 

– One On-chip Analog Comparator 

– Interrupt and Wake-up on Pin Change

Special Microcontroller Features

– Power-on Reset and Programmable Brown-out Detection 

– Internal Calibrated Oscillator 

– External and Internal Interrupt Sources 

– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and Extended Standby

 

ATMEGA328P PU vs ATMEGA328P U

The ATmega328P-PU is the same microcontroller chip found on the Arduino Uno boards, but in a breadboard-compatible package. This is a blank chip for those who want to programmed their own microcontrollers from the ground up.

Atmega328P basically uses less power than Atmega328; the "P" simply indicates that it requires less power to operate than its predecessor.

 

FOR PURCHASING THESE ICs (click on the name in bold):

Online buy electronic components in India from hnhcart.com. The prices for the atmega328p and atmega328 on this website include all taxes, and same-day shipping and priority support are available. 

Atmega328

Atmega328p

ArduinoArduino atmega328AtmegaAtmega 2560Atmega 32Atmega 328Atmega 328 microcontrollerAtmega 328pAtmega328Atmega328 microcontrollerAtmega328pAtmega328p arduinoAtmega328p microcontrollerAtmega328p priceAtmega328puMicrocontrollers

Leave a comment

All comments are moderated before being published