Program ATMEGA328 IC using USBasp Programmer

 


In this post, I will show you how to program ATMEGA328 with FTDI232 Serial to TTL Board and USBasp Module. The IC, ATMEGA328 Microcontroller is known as the brain of the Arduino Uno or Nano but Arduino Boards have a simple USB programming option (its contains every programming feature in single board) but this microcontroller don’t have this feature and that’s why we need any types of programming feature. It creates independent feature to make an additional Arduino Board by own. In this step, we are also focusing on the ATMEGA328 burn bootloader. ATMEGA 8 Microcontroller is similar to ATMEGA328 Microcontroller these are both from AVR Microcontroller Family and also both have same pin out, some change or information needs that you can able to program ATMEGA8 IC too.

In this post we are learning about:

>>Parts Requirement
>>How to program ATMEGA328 IC Using USBasp Module
>>Connection USBasp to ATMEGA328 IC
>>How to program ATMEGA328 IC using FTDI 232 Module
>>Connection FTDI to ATMEGA328 IC
>>ATMEGA328 Standalone Board

Note: Some feature that not allows in this Microcontroller or it can be crash or burn if you are not using properly step by step because when you using Arduino Board every electronic components are set in order to ATMEGA328 that constant voltage or current. If you are making an ATMEGA328 Standalone board make sure every components and wire connect properly or connect to the USB Module properly.

Parts Requirements:

USBasp Module:

FTDI232 Module (Serial to TTL):

ATMEGA328 IC:

16MHz Crystal:

22pf capacitor:

LED’s:

Breadboard:

Jumper Wire:

LM7805 Voltage Regulator:

9V Battery:

There are some components are optional, you don’t need to a USBasp if you have a FTDI232 and same if you have USBasp you don’t need to a FTDI both are option if you buy any one module.

USBasp Programming:

Connection USBasp to ATMEGA328 IC



Atmega328: This is the main part in this project, First place middle side of the breadboard properly and very carefully because its pins can be break if you do forcefully.

16 MHz Crystal: 16 MHz crystal oscillator is connect in IC Pin 9 to Pin 10.

22pf Capacitor: Connect the 2 capacitor to IC,

First capacitor 1st pin to IC’s pin 9 and first capacitor 2nd pin GND!

Second capacitor 1st pin to IC’s pin 10 and second capacitor 2nd pin GND!

Push Button: Connect this push button to first pin VCC 5V with 10K Resistor and second connect with GND Pin.

LED: Connect LED ‘+’ to IC’s 13 Pin and Led ‘-‘to GND.

LM7805 Voltage Regulator: The First pin of this regulator connected to Battery positive pin and Second Pin connected to Battery Negative pin, second pin of this regulator also connected with Breadboard GND Pin. The Third Pin of this regulator connected to 5V (VCC) pin in breadboard.

This is a breadboard connection process, you can solder in purf-board for a Standalone Board.

Connect this wire between USBasp to ATMEGA328 IC

USBasp           ||        ATMEGA328 IC

Pin (SCK)         ||     Pin 19

Pin (MISO)      ||     Pin 18

Pin (MOSI)      ||     Pin 17

Pin (Reset)      ||     Pin 1

Pin (VCC)         ||     Pin 7

Pin (GND)        ||    Pin 8

Program ATMEGA328 IC Using USBasp Module

There you need to download and install software first USBasp driver from here: and second AVRDudes from here. After that download open the Control Panel in computer than click on the Hardware and Sound and then click on the Device Manager.



Now here you can see USBasp with a ‘?’ mark because this pc is not recognize your computer now double click on it there after a pop-up window is open on your screen, In menu section click on the Driver option and then click on the Update Driver Option here Browse the file you already downloaded before just unzip it and browse here then click on Next and Install. Now the driver installation process complete.

Note: If you are using Windows 10 then it will messy to install driver because you need to Restart pc by holding shift button and click Restart,

Image:

After complete the driver installation setup, Open AVRdudes you downloaded before. AVRDudes is a simple software and easy to use for microcontroller programming. Here I am using this 6.3 version of this software the latest version. Simple Just open this software, In the Programmer (-c) Option Find USBasp, https://www.fischl.de/usbasp after select this option click on detect in the MCU (-p) option then select the .HEX file you want to program in ATMEGA328 IC on the Flash Section and then Click on the Program button.

After complete the all steps you can remove the USBasp and it pins and use from battery for standalone board.

Comments