robotics-university.com | For program simulation purpose that will applied on a micro-controller chip using Proteus software, we need hexadecimal (hex) file. If we make a program for ATMEL micro-controller like MCS-51 family or AVR MEGA family using BASCOM 8051, BASCOM-AVR, CodeVisionAVR, WinAVR, or the other software on the program compile process will always generate a program file with hex extension. So if we want to simulate that program using Proteus, the hex file ready to use.
However if we make embedded systems prototype program using IDE Arduino and compile it, the result of its program compilation can’t using for simulation with Proteus software directly. Because the IDE Arduino compiling result of a program is not hex file, but ino file.
So, how if we want simulate an Arduino (ino) file using Proteus software?
The answer is, we have to get the hex file from the ino file that generated by IDE Arduino.
The next question is, “How to get the hex file from the ino file?” Let’s follow this tutorial to get the answer!
Step 1: Open Your Arduino (ino) Program File
Open your Arduino (ino) program file that you want get its hex file.
Figure 1. Open an Arduino (ino) program file
Step 2: Open “Preferences” Window of IDE Arduino
Open “Preferences” window on IDE Arduino with click “File” menu on menu-bar of IDE Arduino. Then shift down the cursor and choose “Preferences,” as shown on figure 2.
Figure 2. Open “Preferences” window on IDE Arduino
Figure 3. Compilation check-box on “Preferences” window of IDE Arduino
Make sure, that the “Compilation” box option have been checked. See figure 3!
Step 3: Hunted for hex file of Arduino (ino) program file directory address
To hunt out and knowing hex file directory address of Arduino (ino) program file on the computer that we use, we have to compile Arduino (ino) program file first. Press “Verify” button and wait until program compile process complete.
Figure 4. Hex file directory address of Arduino (ino) program file
After the program compile process complete, please see on the activity status information box of IDE Arduino utilizing. On the third line from bottom (based on my experience), there is information about saved hex file directory address of Arduino (ino) program file, i.e.:
From the address directory, we know that there is a program file with hex extension. The hex program file named with an ino program file (ledPin3BerkedipKedip.ino.hex).
Step 4: Open The Hex File Saved Directory (Folder)
To open hex file directory of ino program file, delete the hex file name of address directory that have got, so the address directory become:
Next, copy and paste the address directory in the computer address-bar that we use, then press “Enter” button on the keyboard (See figure 5). After that, the hex program file placed directory (folder) will be open (See figure 6).
Figure 5. Computer bar-address
Figure 6. The hex file program of Arduino (ino) program file placed
If we have got the hex file of Arduino (ino) program file, we can use the hex file to simulate the program on Proteus software, but don’t forget, you have to use Arduino board library for Proteus.