October 1, 2022

How to Burn Hex Files on Atmel AVR Using USBasp & AVRdude

The AVRdude program is a great tool for burning hex code to Atmel AVR microcontrollers. USBasp, a great USB-based Atmel AVR programmer, is a fantastic tool. This tutorial will show you how to use AVRdude to burn hex files onto an AVR microcontroller via USBasp.

You can also buy flash programmers for st micro distributors via https://www.elprotronic.com/pages/st.

CH341 EEPROM and SPI Flash Programmer tosiek kodowanie znakw

Image Source: Google

Introduction

The.HEX file is required to program AVR microcontrollers. This file is the microcontroller's machine code. This file is created by the AVR assembler. It converts assembly code to machine code. 

Third-party C cross compiler software can produce assembly code, or it can be manually written. To write C language programs, most people use Atmel Studio or the Arduino environment. These tools produce an a.hex file after compiling.

Extract the executable and save it in a folder.

NOTE 1: You must ensure that the path to the AVRdude folder is included in the PATH environment variable. Otherwise, "avrdude.exe cannot be accessed from any directory at the command prompt. This page explains how to add a path into the PATH environment variable.

NOTE 2: You will need to install the drivers when you connect the USBasp device to your Windows 10 computer.

NOTE 3: If your uC has an internal oscillator turned on and you don't plan to change the fuse bits back to the external clock setting after programming, you can skip the crystal.