Introduction to ATmega328Hi, friends, I hope you all are doing great. In today’s tutorial, we will have a detailed look at the Introduction to Atmega328. The ATmega328 is a microcontroller that is assembled on a single chip and manufactured by Atmel (who was the producer and creator of semiconductor materials) in the megaAVR group of microcontrollers. The processor core of this module is an eight-bit RISC (reduced instruction set computer) which has Harvard architecture with some modification.

In this controller 32 kilobytes of already-built memory exits. In today’s post, we will have a detailed look at its working, pinout, structure, and some other related factors. So let’s get started with Introduction to Atmega328.

Introduction to Atmega328

  • The Atmega328 is a very commonly used microcontroller board created by Atmel. It can support data up to eight bits and has a flash memory of thirty-two-kilo bytes.
  • This module also comprises one kilobyte of EEPROM and two kilobytes of inner static random access memory.
  • Like Arduino, UNO atmega328 is also used with the Arduino Duemilanove board. This type of Arduino has two types of microcontroller shops: atmega328 and the second one is atmega168.
  • There is a twenty-eight pinout of atmega328.
  • The voltage over which it operates is 3.3 volts to 5.5 volts, Usually, five volts are given to it.
  • Between atmega328 and atmega168 the atmega328 is more advanced.
  • The atmega168 has sixteen kilobytes of flash memory and five hundred twelve bytes of inner static RAM while the atmega328 has thirty-two KB of flash memory and two kilobytes of inner static RAM.
  • The most common features it provides are less price, less power usage, and a real-time counter with separate oscillators.

Introduction to ATmega328

Features of Atmega328

  • these are some main features of Atmega328 which are discussed here.
  • There are twenty-eight pinouts this module has similar to the Atmega328P.
  • It has a central processing unit of RISC based on an eight-bit AVR.
  • It has a ten-bit analog-to-digital converter.
  • It has a flash memory of its two kilobytes.
  • It has a static RAM of 2048 bytes.
  • It has an EEPROM of 10244 bytes.
  • There are eight analog-to-digital converter channels it has.
  • There are six pulse width modulation pinouts it has.
  • It consists of one comparator.
  • The voltage range over which it works is 1.8 volts to 5.5 volts.
  • High Endurance Non-volatile Memory Segments are
    • 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
  • Peripheral Features are
    • Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
    • One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture ModeTemperature Measurement
    • Two Master/Slave SPI Serial Interface
    • One Programmable Serial USART
    •  One Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
    • 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
    •  Programmable Watchdog Timer with Separate On-chip Oscillator
    • One On-chip Analog Comparator

Pinout of Atmega328

  • There are twenty-eight pinout exits in the Atmega328.
  • There are twenty pinouts of this module that operate as input and outputs.
  • Fourteen inputs operate as digital pins six of them are pulse width modulation outputs and six are of analog inputs and outputs.
  • On the chip of this controller, ADC is already built. There are three pinouts AVcc, AREF, GND, and AVcc are used for ADC operation.
  • Analog to digital converters needed a separate power supply.
  • There are two pins are used as a crystal oscillator. These pins are used to deliver a clock to the atmega.
  • The pinouts VCC and GND are used to provide power to the module. The required voltage for this module is 1.8 volts to 5.5 volts.
  • Its GND is the ground terminal. AREF is a reference voltage that is used by analog to digital converter for its resultant digital values.

VCC 

  • On this pin digital voltage supply connected

AVCC

  • Here analog to digital conversion is made with supply voltage

 

PB0 to PB7

  • these are port B pins and come with an 8-bit bi-directional input/output port having inner pull-up resistors.

PC0 to PC5

  •  Port C is a 7-bit bi-directional input-output port having inner pull-up resistors. The PC5-o output buffers come with symmetrical features for high sink and source features.Port C pins are pulled low externally will cause source current if pull-up resistors operate.

PC6

  • RSTDISBL Fuse is programmed, and that pin is used for the input/output pin.

PD0 to PD7

  • Port D is 8-bit bi-directional input-output pin that comes with inner pull-up resistors. The port D output buffers come with features of high sink and source capability.

 

Atmega328 pinout

ATmega328 Architecture

  • In the below figure you can see the architecture of Atmega328 which described the complete internal structure of the controller.

ATmega328 Applications ATmega328 Block Diagram ATmega328 Registers Memory of ATmega328 ATmega328 Architecture Pinout of Atmega328 Features of Atmega328 Introduction to Atmega328

The AVR structure comes with a rich instruction set of 32 general-purpose registers.  These 32 registers are configured with ALU and provide 2 independent registers to access with a single instruction application on a single clock cycle.

It has high speed and can get throughputs about ten times the high speed as compared to CISC microcontrollers.

There is on chip ISP flash provide program memory for get programmed through SPI interfacing.

The Boot program exists for downloading program for Flash memory.

Memory Size Atmega328

  • There are 3 types of memory units it has

Flash Memory

  • It has non-volatile ROM memory of 32 KB

RAM:

  • it has 2KB RAM of volatile memory that loses data when power losses

EEPROM:

  • There is one kilobyte Electrically Erasable Programmable Read-Only Memory configured on this module

ATMEGA328 Vs ATMEGA328P

  • Atmega328P uses less power as compared to Atmega328. The manufacturing process of Atmega328P is fine as compared to Atmega328. Such as 328 is a 90nm process and 328P is a 60nm process.
  • TQFP packages come in 328P. So there is a need of an accurate process for getting small chip dies to use in small packages such as TQFP.

ATMEGA328P PU vs ATMEGA328P U

ATmega328P-PU is a controller chip that exists on the Arduino UNO board and in breadboard-supported packaging. It is a blank chip for applications that need to be programmed with a controller from the ground.

Atmega328P uses less power than Atmega328; the “P” defines that it needed low power as compare to previous modules

ATmega328 Applications

  • The complete structure including Arduino and Atmgega328 is used in different applications.
  • It is used in different types of projects such as mobile embedded systems it is preferred here due to operation at different values of power operation
  • As it comes with the high-level RISC structures so applied in applications where high-speed application of program exit
  • It helps to process digital data.
  • It is used in different controlling devices that are based on automation like machines.
  • To design a small size plan and quadcopter this controller is used.

Read also:

What is the function of ATmega328 in Arduino?

  • Arduino Uno ATmega328 provides UART TTL serial communication and is easy to access on digital pins such as TX (1) and RX (0). The configuration of Arduino is such that provides easy data configuration. it comes with 2 LEDs on board such as  RX & TX  that blink if data is passes through USB.

What type of memory is Atmega328?

  • This 8-bit AVR RISC-based controller comes with a 32KB ISP flash memory unit having read-and-write features.
  • It comes with 2KB SRAM, 1KB EEPROM, 23 general purpose I/O lines, 32 general purpose working registers

What language is ATmega328P?

  • It comes with an instruction set that is of 332 general-purpose registers storing data and addresses. it is programmed in C or C++. The ATmega328P is Arduino uno board core and is used for different Arduino boards.

What are the advantages of Atmega328?

  • It is 8 8-bit AVR controller and easy to use for some functions. Its main advantages are uses less power and high-speed processing.

How many ports are there in the Atmega328?

That is a detailed post about atmega328 I tried my level best to make it simple for you if you have any further query ask in comments. Thanks for reading

Leave a Reply

Your email address will not be published. Required fields are marked *