Extract Code from Encrypted MCU PIC18F6410 embedded memory needs to disable its security fuse bits and get access to its databus which is connected the processor to the memory, normally the memory will include flash and eeprom, then code will be replicated in the format of binary or heximal, after copy the firmware into blank Microcontroller PIC18F6410 it will serve as a original MCU which provide the exact same functions;
The long write is necessary for programming the internal Flash. Instruction execution is halted while in a long write cycle. The long write will be terminated by the internal programming timer. The EEPROM on-chip timer controls the write time. The write/erase voltages are generated by an on-chip charge pump, rated to operate over the voltage range of the device when extract heximal from microprocessor PIC16LF874.
The default value of the holding registers on device Resets and after write operations is FFh. A write of FFh to a holding register does not modify that byte. This means that individual bytes of program memory may be modified, provided that the change does not attempt to change any bit from a ‘0’ to a ‘1’. When modifying individual bytes, it is not necessary to load all 64 holding registers before executing a write operation. The sequence of events for programming an internal program memory location should be if readout PIC16LF876 heximal from microcontroller:
Read 64 bytes into RAM.
Update data values in RAM as necessary.
Load Table Pointer register with address being erased.
Execute the row erase procedure.
Load Table Pointer register with address of first byte being written.
Write the 64 bytes into the holding registers with auto-increment.
Set the EECON1 register for the write operation:
set EEPGD bit to point to program memory;
clear the CFGS bit to access program memory;
set WREN to enable byte writes.
Disable interrupts.
Write 55h to EECON2.
Write 0AAh to EECON2.
Set the WR bit. This will begin the write cycle.
- The CPU will stall for duration of the write (about 2 ms using internal timer).
- Re-enable interrupts.
- Verify the memory (table read).
This procedure will require about 6 ms to update one row of 64 bytes of memory. An example of the required copy microprocessor PIC16LF877 program.