Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going to share the most important and the most common topic i.e. Introduction to ATmega328. ATmega-328 is basically an Advanced Virtual RISC (AVR) micro-controller. It supports the data up to eight (8) bits. ATmega-328 has 32KB internal builtin memory. This micro-controller has a lot of other characteristics.
ATmega 328 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). Other characteristics will be explained later. ATmega 328 has several different features which make it the most popular device in today’s market. These features consist of advanced RISC architecture, good performance, low power consumption, real timer counter having separate oscillator, 6 PWM pins, programmable serial USART, programming lock for software security, throughput up to 20 MIPS etc. ATmega-328 is mostly used in Arduino. The further details about ATmega 328 will be given later in this section.
Introduction to ATmega328
ATmega328 is an eight (8) bit micro-controller. It can handle the data sized of up to eight (8) bits. It is an AVR based micro-controller. Its builtin internal memory is around 32KB. It operates ranging from 3.3V to 5V. It has an ability to store the data even when the electrical supply is removed from its biasing terminals. Its excellent features include the cost efficiency, low power dissipation, programming lock for security purposes, real timer counter with separate oscillator. ATmega-328 is shown in the figure given below.
1. ATmega328 Pins
- ATmega-328 is an AVR micro-controller having twenty eight (28) pins in total.
- All of the pins in chronological order, are listed in the table shown in the figure given below.
2. ATmega328 Pinout
- Through pinout diagram we can understand the configurations of the pins of any electronic device.
- ATmega 328 pinout diagram is shown in the figure given below.
3. ATmega328 Pins Description
- Functions associated with the pins must be known in order to use the device appropriately.
- ATmega-328 pins are divided into different ports which are given in detail below.
VCC is a digital voltage supply.
AVCC is a supply voltage pin for analog to digital converter.
GND denotes Ground and it has a 0V.
Port A consists of the pins from PA0 to PA7. These pins serve as analog input to analog to digital converters. If analog to digital converter is not used, port A acts as an eight (8) bit bidirectional input/output port.
Port B consists of the pins from PB0 to PB7. This port is an 8 bit bidirectional port having an internal pull-up resistor.
Port C consists of the pins from PC0 to PC7. The output buffers of port C has symmetrical drive characteristics with source capability as well high sink.
Port D consists of the pins from PD0 to PD7. It is also an 8 bit input/output port having an internal pull-up resistor.
- All of the AVR ports are shown in the figure given below.
AREF is an analog reference pin for analog to digital converter.
- So this was the brief of all the pins in ATmega 328 AVR micro-controller.
4. ATmega328 Architecture
- An architecture of a device presents each information about the particular device.
- ATmega-328 architecture is shown in the figure given below.
5. ATmega328 Memory
- ATmega 328 has three types of memories e.g. EEPROM, SRAM etc.
- The capacity of each memory is eplained in detail below.
Flash Memory has 32KB capacity. It has an address of 15 bits. It is a Programmable Read Only Memory (ROM). It is non volatile memory.
SRAM stands for Static Random Access Memory. It is a volatile memory i.e. data will be removed after removing the power supply.
EEPROM stands for Electrically Erasable Programmable Read Only Memory. It has a long term data.
- AVR memory spaces are shown in the figure given below.
6. ATmega328 Registers
- ATmega-328 has thirty two (32) General Purpose (GP) registers.
- These all of the registers are the part of Static Random Access Memory (SRAM).
- All the registers are given in the figure shown below.
7. ATmega328 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 packages are given in the table shown in the figure given below.
8. ATmega328 Block Diagram
- Block diagram shows the internal circuitry and the flow of the program of any device.
- ATmega 328 block diagram is shown in the figure given below.
9. ATmega328 Features
- To perform any task we can select a device on the basis of its features. i.e whether its features match to obtain the desired results or not.
- Some of the main features of an AVR micro-controller ATmega328 are shown in the table given in the figure below.
10. ATmega328 and Arduino
- ATmega-328 is the most micro-controller that is used while designing.
- ATmega 328 is the most important part of Arduino.
- The program is uploaded on the AVR micro-controller attached on Arduino.
- AVR attached on Arduino is shown in the figure given below.
11. ATmega328 and Arduino Pins
- ATmega328 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.
- The encircled section analog pins consists of the Arduino pins which are connected to the corresponding AVR micro-controller ATmega-328 pins.
- I have written both of the pins in front of each other so that the concept can be understand easily.
- A complete package including ATmega 328 and Arduino can be used in several different real life applications.
- It can be used in embedded systems projects.
- It can also be used in robotics.
- Quad-copter and even small aeroplanes can also be designed through it.
- Power monitoring and management systems can also be prepared using this device.
The tutorial Introduction to ATmega328 has the presented the detailed discussion on the basic use of ATmega 328. I have completely provided the entire necessary details about the use of an AVR micro-controller. If you have any problem, you can ask us in comments anytime. Our team is always here to help you guys. I will share other amazing topics with all of you in my upcoming tutorials. So, till then take care 🙂