PIC16F18877 how to create hex dump? - Page 1
Forum section: electronics / beginners

author: Mad Professor
author_rank: Regular Contributor
timestamp: August 10, 2025, 07:12:49 pm
content: Good day All.I am looking for some beginners help and advice with making a hex dump (full backup) of a PIC16F18877, including Program Memory, Configuration Bits, EEPROM Data, etc.As far as I am aware the chip does not have any protection enabled.I am not 100% convinced that I am truly getting a 1:1 backup image.I have tried writing the hex file to another unit as it's only partially working, almost like it's missing something.I'm not brave enough to erase the PIC16F18877 and rewrite it on the working unit.I have borrowed a PicKit5 and using MPLAB IPE v6.25, I have enabled advanced mode, and turned on Power target circuit from Pickit5 with a voltage level of 5.0When I connect and read the PIC16F18877 I get the following.QuoteThis creates a 182KB file.I welcome any thoughts or suggestions.Thanks in advance.

author: amyk
author_rank: Super Contributor
timestamp: August 10, 2025, 07:57:47 pm
content: Are you getting the same data read every time?Are you writing all of the read data to the new chip?

author: Mad Professor
author_rank: Regular Contributor
timestamp: August 11, 2025, 05:05:43 am
content: As far as I am aware then yes to both of your questions.I have power cycled, disconnected, reconnected, restarted MPLAB IPE, and each time read the PIC16F18877 then export the hex file and compare it, it is identical.However I am not familiar with MPLAB IPE, so I could be missing something simple.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 11, 2025, 06:58:14 am
content: Looks like you are doing everything right - are you reading in-circuit? If so then the circuitry on the board might be causing corrupt data

author: Mad Professor
author_rank: Regular Contributor
timestamp: August 11, 2025, 08:39:22 am
content: I am indeed trying to read in-circuit, via the programming header.I've looked at the PCB and is doesn't seem like the header is connected to anything else or has multi use.The header is connected directly to the appropriate pins of the PIC.I have started to try and reverse engineer the pcb and generate a rudimentary schematic.

author: coromonadalix
author_rank: Super Contributor
timestamp: August 11, 2025, 09:43:14 am
content: no punare you really really sure you're grabbing all the memory content(s), is there a boot loader ? or in the end you do/may have read protectionor it suffered problems and now you have corruptionon some stm 32 i had to recover 2 ranges of memory location, dont know why ... it was segmented and had a hole in the memory address ? thus failing each time ... lucky for me it was not read protectedyo do have here some pickit 2 pickit3 stand alone software for a very low price, do you have such interface laying around ?sure your borrowed pickit 5 is able to do the backup/dump ?even if you supply the target voltage it may not be sufficient, but you dont seem to get into current overload ?

author: Mad Professor
author_rank: Regular Contributor
timestamp: August 11, 2025, 01:47:36 pm
content: I am not sure that I am grabbing all the memory contents.I have no other programmers, only the pickit5 that I have borrowed.

author: Mad Professor
author_rank: Regular Contributor
timestamp: August 11, 2025, 03:24:13 pm
content: I've been having a closer look at MPLAB IPE as well as the saved hex file.MPLAB IPE - Configuration BitsMPLAB IPE - EE Data MemoryHex File: AddressesCan anyone please confirm that I am looking at the correct section of the hex file, as the data I am seeing here is not the same as seen in MPLAB IPE.I have absolutely no idea if this is the issue as I am purely guessing.

author: Mad Professor
author_rank: Regular Contributor
timestamp: August 16, 2025, 02:44:42 pm
content: Has anyone got any other thoughts or suggestions?What other options do I have for reading and writing the firmware either in-circuit or by removing the chip? This PicKit5 needs to be returned to it's owner after this weekend.What about universal programmers such as the Xgecu T48, etc? However saying that the PIC16F18877 is not listed in the T48 IC Support List.Thanks again for your time and support.