where are EEPROM data in PIC18F hex file...

Thread Starter


Joined Dec 14, 2012
Hi. I can see the correct EEPROM data when viewing EEPROM in MPLAB. Once built and a hex file is generated, where would these EEPROM data show up in the hex file, especially when the start of EEPROM address is 0xF00000 and this address is too long to fit in intel hex file format?


Joined Apr 24, 2011
Huh... I thought it would be a simple answer, but I can't even find the address for the EEPROM you provided. Nothing shows in a device data sheet or even the programming spec drawing.

You *can* see what the EEPROM is inside MPLAB by simple using the menu to View | EEPROM, which makes it pop up in a nice window. You can even read it out of a device and see what the device was using. That can be useful for those apps where the unit writes to it's own EEPROM.


Joined Jun 26, 2012
I'm not near MPLAB right now but look at MPASM help inder Intel hex formats, specofically inhx32.. In short, there is a special record type that sets the base address e.g.0F0000h for the following data records. The 16bit addr of the data record is added to the previously specified base addr.The resulting logical addr tells the programmer what physical memory is being blasted. Config words work similarly.
The ascii hex records for eeprom and config are usually at the end of the program code recs.
Excuse typos.. typing on phone


Joined Jul 16, 2012
Here is an example of how i set initial EEROM values using assembler. Make a short assembly file and define some values with a known patern. Then search for those paterns in the hex file.
;################ Initialize PIC EEPROM Data ;
; The following sets the initial values of the DATA EEPROM
; The format for 32Bit Floating Point Values are:
; DW 0xBBAA, 0xDDCC where: AA = B0
; BB = B1
; CC = B2
; DD = Exp
; Density & Porosity of all 7 Product Types
ORG 0xF00000
DW 0x999A, 0x8049, 0x3333, 0x7d73 ; Product Type 1
DW 0x999A, 0x8049, 0x3333, 0x7d73 ; Product Type 2
DW 0x999A, 0x8049, 0x3333, 0x7d73 ; Product Type 3