Microchip Microcontroller PIC18F2221 Code Extraction start from opening its silicon package and able to get access to microprocessor databus which is connecting the eeprom and flash memory after cracking MCU;
All peripherals and modules are addressable through I/O memory locations in the data memory space. All I/O memory locations can be accessed by the Load (LD/LDS/LDD) and Store (ST/STS/STD) instructions, transferring data between the 32 general purpose registers in the CPU and the I/O Memory from readout mcu pic18f1230.
The IN and OUT instructions can address I/O memory locations in the range 0x00 – 0x3F directly. I/O registers within the address range 0x00 – 0x1F are directly bit-accessible using the SBI and CBI instructions. The value of single bits can be checked by using the SBIS and SBIC instructions on these registers. The I/O memory address for all peripherals and modules in PIC18F2221 is shown in the ”Peripheral Module Address Map” when secured MCU pic18f1320 flash copying.
The PIC18F2221 devices have internal EEPROM memory for non-volatile data storage. It is addressable either in a separate data space or it can be memory mapped into the normal data memory space. The EEPROM memory supports both byte and page access. The Production Signature Row is a separate memory section for factory programmed data. It contains calibration data for functions such as oscillators and analog modules before microchip pic18f1330 hex can be extracted.
The production signature row also contains a device ID that identify each microcontroller device type, and a serial number that is unique for each manufactured device. The device ID for the available PIC18F2221 devices is shown in Table 7-1 on page 13. The serial number consist of the production LOT number, wafer number, and wafer coordinates for the device. The production signature row can not be written or erased, but it can be read from both application software and external programming.
The User Signature Row is a separate memory section that is fully accessible (read and write) from application software and external programming. The user signature row is one flash page in size, and is meant for static user parameter storage, such as calibration data, custom serial numbers or identification numbers, random number seeds etc. This section is not erased by Chip Erase commands that erase the Flash, and requires a dedicated erase command. This ensures parameter storage during multiple program/erase session and on-chip debug sessions.