Sixty-four kilobytes is a satisfying number. It is also exactly where the flash stops and where most recovered images stop with it, leaving everything that makes the part run — oscillator, watchdog, brown-out, protection — sitting at an address the reader never visited.
The PIC18F4620 is a 40-pin part from the PIC18F2525/2620/4525/4620 family, DS39626. It carries 64 KB of program memory as 32,768 words, 3,968 bytes of RAM, 1,024 bytes of data EEPROM, thirteen 10-bit ADC channels, two comparators, one CCP and one ECCP with up to four PWM outputs, a parallel slave port, and a 40 MHz core at 10 MIPS. It is one of the most widely used PIC18 parts ever made, which is why so many of the images in circulation are second-hand.
Four Blocks of Sixteen
| Block | Byte range | Words | Bit |
|---|---|---|---|
| 0 | 0x000000–0x003FFF |
8,192 | CP0 |
| 1 | 0x004000–0x007FFF |
8,192 | CP1 |
| 2 | 0x008000–0x00BFFF |
8,192 | CP2 |
| 3 | 0x00C000–0x00FFFF |
8,192 | CP3 |
The bits sit in CONFIG5L at 0x300008, and CPB plus CPD share CONFIG5H at 0x300009. Because 64 KB fills the 16-bit program address space exactly, there is no room left in the array for anything else, and the configuration block has to live outside it.
The Address That Does Not Fit
0x300000 cannot be expressed in a 16-bit address, so an Intel HEX file carries it in a type-04 extended linear address record. Tools that understand type-04 platform down to 0x0003, emit the configuration and device ID records, and close the file. Tools that do not simply drop those records — without an error, without a checksum failure, because each record is individually valid.
The result is a 64 KB file that looks complete, verifies against itself, and produces a dead board. The oscillator selection is erased, which on this family does not select the HS mode a 20 MHz crystal needs; the part starts on the internal oscillator at 1 MHz and the code’s timing loops run twenty times too slow. Nothing is corrupt. The configuration was never in the file.
If you are checking a file you already have, look for a :020000040003F7 record near the end. If the file stops after the last flash record, the configuration is missing.
The EEPROM Is the Product
One kilobyte of data EEPROM is where a 4620 design keeps the things that make one unit different from the next: calibration constants measured at test, the serial number, communication addresses, and whatever the application’s menu system writes when a technician adjusts a setpoint.
CPD protects it independently of the four flash bits, and the read values tell you which state you are in. An erased byte is 0xFF. A protected byte is 0x00. A delivered dump with 1,024 zero bytes in the EEPROM region is locked, not blank, and needs a separate operation.
Donor Arithmetic
The PIC18F4525 is the 48 KB member of the same datasheet, same package, same peripherals. It is a valid donor only while execution stays below 0xBFFF; above that the part behaves exactly like a 4620 with a hole in it, and the fault appears the first time a rarely used code path runs. Failures that depend on which menu the operator opens are usually donor-size failures.
The PIC18F4610 is the harder comparison, because it matches on package, pin count and 64 KB and differs in ways that are invisible from the outside: it has no data EEPROM at all, and it comes from a different datasheet.
Four Checks
1. Highest flash address. A complete array reaches 0xFFFF. Anything lower is a truncated read, not a small program. 2. Configuration present. Look for the type-04 record and the words at 0x300000–0x30000D. 3. Zero-run shape on 16 KB boundaries. A uniform zero run aligned to 0x3FFF/0x7FFF/0xBFFF is a protected block; erased words read 0xFFFF, and 0x0000 decodes as NOP. 4. Device ID at 0x3FFFFE. It separates a 4620 from a 4610 and from the 28-pin members of both families.
A chip extraction analysis from a photograph and the board can usually settle which of the four is the problem before anyone quotes work. If the file is already in hand, send the highest address and the byte ranges that read uniform and the state of the part can be reconstructed from that; contact us and it will be looked at.
Service scope and next steps
Before we quote a PIC job we confirm the silicon revision and the protection configuration, because both decide whether the on-chip programming area can be read directly or needs a different approach. The full scope of what we handle, how a project runs from electrical integrity test to delivered file, and the payment terms are described on our service capabilities page.
Ready to extract this PIC firmware?
Send us the part number and a short description of what you need. Free evaluation, fixed quotation, and a reply within one business day.
Leave a Reply