Unlock Microchip secured MCU PIC16F1508 and extract its flash memory program out, reprogramme the firmware into blank Microcontroller PIC16F1508 which can provide the same functions as original version, recover all the content from Microrprocessor PIC16F1508;
Code protection is enabled by programming the CP bit in Configuration Word 1 register to ‘0’. The only way to disable code protection is to use the Bulk Erase Program Memory command. In the hex file there are two bytes per program word stored in the Intel® INHX32 hex format.
Data is stored LSB first, MSB second. Because there are two bytes per word, the addresses in the hex file are 2x the address in program memory when break MCU PIC16F630. (Example: Configuration Word 1 is stored at 8007h on the PIC16(L)F1458. In the hex file this will be referenced as 1000Eh-1000Fh).
To allow portability of code, it is strongly recommended that the programmer is able to read the Configuration Words and user ID locations from the hex file. If the Configuration Words information was not present in the hex file, a simple warning message may be issued in the process of cloning AT89C5115 code. Similarly, while saving a hex file, Configuration Words and user ID information should be included.
If a device ID is present in the hex file at 1000Ch- 1000Dh (8006h on the part), the programmer should verify the device ID against the value read from the part. On a mismatch condition the programmer should generate a warning message.The checksum is calculated by two different methods dependent on the setting of the CP Configuration bit.
With the program code protection disabled, the checksum is computed by reading the contents of the program memory locations and adding up the program memory data starting at address 0000h, up to the maximum user addressable location. Any Carry bit exceeding 16 bits are ignored. Additionally, the relevant bits of the Configuration Words are added to the checksum. All unimplemented Configuration bits are masked to ‘0’ to clone ATmega2560 FLASH program.