The flash memory is the place where our program will be stored inside the MCU and executed from there. The HEX code is stored into the MCU in a place called Flash memory. So, to simply put it into a nutshell the HEX is the final software outcome of our coding and this is what will be sent to out by MPLAB IPE for burning the MCU.
Mplab xc8 compiler burn file to chip how to#
There are ways on how to read this and how to understand and reverse it back into Assembly language, but it is completely out of scope of this tutorial. For our Blink program, the HEX code will look like the following: If you are so interested to know how this HEX code looks like, just open it using the notepad. **Your location**\Blink\Blink.X\dist\default\production\Blink.X.production.hex This machine readable form is called the HEX code, every project that we create will have a HEX code which will be in the following directory This is where the part of our compiler comes in a Compiler is one which converts this code into a Machine readable form. In, order to understand this lets have a look at our programĪs we can see this code is written in C-Language and it will make no sense to our MCU. It is a usual practise to upload the code into a MCU and get it working inside the MCU.īut what really happens inside the MCU how does few lines of C-Program get into a silicon chip and gets executed? What happens when we "Burn" a Microcontroller!!