- Here's the link to download Atmega328 datasheet, although after reading this article you won't need it. :)
- Moreover, I have also given the link of a reliable online source from where you can buy it easily.
Download Atmega328P Datasheet
Buy Atmega 328 Microcontroller
Introduction to ATmega328
- ATmega328 is an 8-bit and 28 Pins AVR Microcontroller, manufactured by Microchip, follows RISC Architecure and has a flash type program memory of 32KB.
- It has an EEPROM memory of 1KB and its SRAM memory is of 2KB.
- It has 8 Pin for ADC operations, which all combines to form PortA ( PA0 - PA7 ).
- It also has 3 builtin Timers, two of them are 8 Bit timers while the third one is 16-Bit Timer.
- You must have heard of Arduino UNO, UNO is based on atmega328 Microcontroller. It's UNO's heart. :)
- It operates ranging from 3.3V to 5.5V but normally we use 5V as a standard.
- Its excellent features include the cost efficiency, low power dissipation, programming lock for security purposes, real timer counter with separate oscillator.
- It's normally used in Embedded Systems applications. You should have a look at these Real Life Examples of Embedded Systems, we can design all of them using this Microcontroller.
- The following table shows the complete features of ATmega328:
|No. of Pins||28|
|CPU||RISC 8-Bit AVR|
|Operating Voltage||1.8 to 5.5 V|
|Program Memory Type||Flash|
|Number of ADC Channels||8|
|Packages (4)||8-pin PDIP32-lead TQFP28-pad QFN/MLF32-pad QFN/MLF|
|Oscillator||up to 20 MHz|
|Timer (3)||8-Bit x 2 & 16-Bit x 1|
|Enhanced Power on Reset||Yes|
|Power Up Timer||Yes|
|Brown out detect (BOD)||Yes|
|USI (Universal Serial Interface)||Yes|
|Minimum Operating Temperature||-40 C to +85 C|
1. ATmega328 Pins
- ATmega-328 is an AVR Microcontroller 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, so you are working on any Engineering Project then you must first read the components' pinout.
- 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.
- All of the AVR ports are shown in the figure given below.
- 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 explained in detail below.
- 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 Microcontroller 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, it will help to understand easily.
- If you want to work on this Arduino board then you must try these Arduino Projects for Beginners, they will help to get your hands on Arduino.
- 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 aero-plane can also be designed through it.
- Power monitoring and management systems can also be prepared using this device.
- i have designed this Home Security System using Arduino, you should have a look at it.
13. How to start working on Atmega328
- If you want to start working on this Microcontroller then I would suggest you to do it using Arduino.
- The benefit of using Arduino is that you get to use all of its built-in libraries, which will make the work a lot easier.
- After designing your project on Arduino, then design the basic circuit of Atmega-328 which is quite simply and I have discussed above.
- Now you must be careful while using its Pins, Atmega328 and Arduino Pins are discussed above.
- Another thing to mention here is that before working on hardware, you should first design its Proteus Simulation.
- Download Arduino Library for Proteus and then design your project on it.
- Once you are confirmed that everything's correct then design its circuitry on Wero Board or PCB (Printed Circuit Board) and you have your project ready. :)