×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

How to Upload HEX Code to Microcontrollers?

In this tutorial, we will learn how we can upload a HEX file/ HEX code to Microcontrollers? After executing embedded C code on Keil compiler HEX file is generated and here we will learn how to upload it into the microcontroller? By Sudarshan Paul Last updated : May 13, 2023

Prerequisite:: 8051 Microcontroller programming using Keil Uvision IDE

Uploading a HEX file to Microcontroller

Once you have developed the hex code for the program which is to upload to the microcontroller, the next major task is to burn the hex code properly into the device. If the microcontroller has an inbuilt bootloader then it is possible to upload the code using the serial port. Mostly you will require a USBASP programmer to dump your code. The programmer is a hardware device that contains inbuilt software to assist in transferring of codes to a microcontroller via PC.

Here, we will be using ATMEL 8051 AVR USB ISP Programmer for burning our required code.

ATMEL 8051 AVR USB ISP Programmer

ProgISP

  • It is a tool through which you can perform code uploading on all AVR chips, it also supports AT89S51, AT89S52.
  • Custom serial download programming.
  • Supports custom programmed chips.
  • Supports high voltage programmers.
  • Project Management.
  • Standalone tool – No installation required.

Features of USB ISP Programmer

  • Supports multiple platforms linux, Mac OS and Windows.
  • Jumper for 5V supply.
  • Contains Header Pin for easy interface of various ISP header pin.
  • SCK option to support target with low clock speed.

Steps to Upload HEX Code to Microcontroller

  1. Download ProgISP, which is a zip file. Extract it in a folder. No need to install it, it is a self-executable software, click on progisp.exe to launch it.
  2. USBASP should be connected to the AVR microcontroller development board using the 6 pin connectors. Make sure jumper J1 is connected.
  3. Check the program state in the progisp interface, it should show colored icons of USB and ASP or else if it is faded then look for errors in connections, power supply or jumper connection.
  4. Select the type of chip you are working within our case it is AT89S52.
  5. In the task, windows look for the following to be checked with a tick.
    • Verify Signature
    • Chip Erase
    • Program Flash
    • Verify Flash
  6. Click on load flash from the leftmost tab, this tab is used to load the hex file. Click on the tab and locate the hex file.
  7. Now click on Auto to begin the burning process. All the options which you have ticked from the task box will be performed during the process.
  8. Your code is successfully transferred to the microcontroller.
  9. In order to erase the code, untick all options from task box except Chip Erase.
How to upload HEX code to microcontrollers?


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.