• AVR Freaks

Hot!PIC16LF18875 flashed hex file and read hex file are not same

Author
bhavin10
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2018/11/28 05:55:44
  • Location: 0
  • Status: offline
2019/02/25 03:01:02 (permalink)
0

PIC16LF18875 flashed hex file and read hex file are not same

Hi
I am working with PIC16LF18875 microcontroller. i have created hex file through MPLAB X IDE. Then through MPLAB X IPE i flash hex file after flashing i read hex file(using MPLAB X IPE) as described below method:
1) click on "Read" button
2) File -> Export -> Hex, then i save this read hex file.
 
Below is my query:
1) After flashing i read hex file this hex file is not same as that i have flashed i compared both files through "Meld Diff Viewer". so why i am getting difference in both hex files?
 
I have attached both hex files(in attachment hex_files.zip) for your reference. In this zip file two hex files are present as described below:
1) dnbc_ptmb_Final.X.production.unified.hex -----> this is original hex file
2) read.hex -----> this is hex file that is readed.
 
Kindly help me to solve this issue where i am wrong.
 
Any help in this is appreciated.
 
Thanks,
Bhavin
post edited by bhavin10 - 2019/02/25 03:30:13
#1

3 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC16LF18875 flashed hex file and read hex file are not same 2019/02/25 03:19:21 (permalink)
    +1 (1)
    I suspect the only "issue" is in your head.
    The produciton hex file will only contain addresses that are used.
    The file read back will include ALL memory of the PIC, including unused locations.
    That guarantees they will be different.
     
     
     

    Nearly there...
    #2
    bhavin10
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2018/11/28 05:55:44
    • Location: 0
    • Status: offline
    Re: PIC16LF18875 flashed hex file and read hex file are not same 2019/02/25 03:29:32 (permalink)
    0
    Thanks for your reply,
     
    But, you can see by comparing both hex files that in starting and ending of both hex files addresses and data are also different. in read hex file data stored in different address as compared with original hex file. can you help me why these difference exist.
    post edited by bhavin10 - 2019/02/25 03:40:59
    #3
    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC16LF18875 flashed hex file and read hex file are not same 2019/02/25 03:39:33 (permalink)
    +2 (2)
    The differences at the end look like EEPROM addresses. I'm guessing you don't define initial data for the EEPROM at all.
     
    The differences at the start are because the production file only writes to the first two words (four bytes), then skips two words.
    From that point onwards, the two files are four bytes out of synch.
    Read about how hex files are encoded, and you will see why your simplistic test is a waste of time.
     
     

    Nearly there...
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5