Microcontrollers don’t understand C language, so machine language is used to program them. Sometimes we need to upload a Hex file directly into an Arduino board, so we require an external software to do this because IDE has no support in that case. Here we will discuss one of the top tools known as xLoader and how this can be used to program Arduino boards directly using a Hex file.
How to Upload Hex File to Arduino Using xLoader
To upload a Hex file directly into an Arduino we must download xLoader first. Following steps will guide you about uploading a Hex file and blinking a LED on Arduino board.
Step 1: First download xLoader. Click here to download it.
Step 2: A zip file will begin downloading in the PC download directory. Extract that file.
Step 3: New folder with zip file name will be created. Open that folder and an xLoader installation file will be there. Run the application file.
Step 4: xLoader will open in a new window.
Step 5: Now connect the Arduino board to the PC and check for the Arduino COM port. Open device manager and check the Arduino COM port number.
Step 6: In “COM & LPT” section check for Arduino COM port here in our case it is COM15.
Step 7: Now head back to xLoader, select the Arduino board, and confirm the microcontroller model name.
Step 8: Select COM port and set baud rate for serial communication.
Step 9: Select the Hex file you want to upload in the Arduino board. If you don’t have Hex file then click here to learn how to get hex file from Arduino IDE and if you want to upload Hex file uploaded in any other Arduino board and wants to upload it to new Arduino board then click here to learn how to download Hex file directly from Arduino board.
As an example, Upload LED blink Hex file to test our output. Once the Hex file is selected click Upload.
Step 10: Hex file is successfully uploaded. A message with file size will appear at bottom.
Output
As we uploaded a Hex file of LED blink examples. An onboard LED near pin 13 will start blinking.
Conclusion
Arduino IDE converts C language written code into machine language using Hex file. Arduino can only read binary data. This article is a guide on how to upload a Hex file to an Arduino without using the Arduino IDE.