Home » Embedded Systems

How to upload HEX code to microcontrollers?

In this article, 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?
Submitted by Sudarshan Paul, on June 17, 2018

Read: 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

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.