Burn ATmega328 Bootloader Using USBasp

Posted on

Burn ATmega328 Bootloader

Burn ATmega328 Bootloader USBasp – The bootloader is firmware embedded into the chip that allows you to program the chip without having to use an external programmer.

How to Burn ATmega328 Bootloader Using USBasp


What is a Bootloader and Why do we need it?

Generally, a chip will be usable after being programmed using an external programmer such as AVR-ISP, USBasp, USBtinyISP, ParallerProgrammer, AVR-ISP, STK500, and others.

If a chip has embedded bootloader firmware, then we will be able to program the chip using only USB to Serial (TX RX) such as the FT232 and CH340.

A bootloader will set the USB protocol so that new program firmware can be saved to flash memory.

So what does Burn Bootloader mean? Does it burn chips?

Of course not. The meaning of burn is to embed or program or flash a chip with firmware. The burn process is only done once. If the firmware has been entered into the chip, then we don’t need to burn the bootloader anymore.

Firmware is a small file that contains commands and configurations for the chip. Usually, the firmware has a .hex file extension.

The term firmware is similar to software.

If the hardware is a computer, then the one that regulates the computer to work is the software.

If the hardware is a chip, then what regulates the chip so that it can work is the firmware. Such is the short explanation.

Before using USBasp, we need drivers so that the programming can run properly.

How to Install USBasp Driver

Install the driver using the Zadig software here. Select libusbK (v3.0.7.0). If this doesn’t work, use another driver by selecting it and clicking the up and down arrow. there are 4 USB drivers provided such as WinUSB, libusb-win32/libusb0.sys, or libusbK.

Burn ATmega328 Bootloader Using USBasp

I made a brand new custom arduino board and atmega328p and this chip doesn’t have it in yet. So to be able to use or program the chip, we have to embed the ATmega328 boot firmware so that we can program using the Arduino IDE

Connect USBasb to atmega328p with the following pin configuration:

Burn ATmega328 Bootloader Using USBasp

Then connect USBasp to the computer and on the Arduino IDE select the board and programmer according to the image below, then burn the bootloader.

Burn ATmega328 Bootloader Using USBasp

After success, create a program or sketch that you want to upload to the ATmega328. Then to upload it press upload using programmer as shown below.

 Burn ATmega328 Bootloader

That’s it. Hopefully this Burn ATmega328 Bootloader USBasp article is useful.