Strip the CAN controller out of the 258 and you have the 252: same 32 KB, same 768 bytes of RAM, same 28 pins. The absence of the bus changes what the firmware spends its time on, and the recovered image reads quite differently as a result — more application logic, fewer protocol constants.
Map
32 KB from 0x0000 to 0x7FFF, four 8 KB quarters at 0x0000, 0x2000, 0x4000 and 0x6000, CPB over the 512-byte boot block. 768 bytes of SRAM, 256 bytes of EEPROM at 0xF00000, configuration words at 0x300000, ten converter channels, three CCP modules, one USART and one MSSP.
| Bit | Range | Likely content |
|---|---|---|
| CP0 | 0x0000 | Vectors and startup |
| CP1 | 0x2000 | Main application |
| CP2 | 0x4000 | Serial handler, tables |
| CP3 | 0x6000 | Diagnostics |
What Replaces The Bus
Without a field bus, designs on this part talk over a serial link, drive a local display, or simply run standalone. Each leaves a different signature:
– Serial link. A USART initialisation with a computed baud divisor, plus a receive state machine. Often RS-232 through an external transceiver, sometimes RS-485 with a direction-control pin. – Local display. A refresh routine in a timer interrupt and a segment or character table. – Standalone. A superloop with almost no communication code, dominated by analog acquisition and control outputs.
The third category is the easiest to recover and the hardest to interpret, because there is no protocol to anchor the analysis. In those cases the analog scaling constants and the output timing tables are the entire description of the product.
768 Bytes Is The Real Limit
The flash is generous for the era; the RAM is not. A 32 KB design with 768 bytes of RAM has to be frugal: no large buffers, no floating point accumulators, no dynamic structures. Firmware typically uses fixed buffers of 16 or 32 bytes and works in scaled integers.
That frugality is visible in the code and it is useful during a rebuild, because it tells you what the original could not do. A customer asking for an added feature often discovers there was never RAM for it.
EEPROM
256 bytes at 0xF00000, unprotected. Setpoints, a serial number and a calibration constant. On a standalone design this is the entire persistent state, and it reads on a locked device.
The Second Serial Port That Does Not Exist
With one hardware USART and a design that needs two, firmware grows a bit-banged port. The transmit side is a timer interrupt that shifts a byte out one pin at a time; the receive side is an edge interrupt that measures the interval between the start bit and the first data bit, then samples at the middle of each subsequent cell. Both leave a very specific trace. The transmitter appears as a shift-and-test loop with a table of delays, and the receiver as a capture handler that computes a half-bit offset from a timer value. Bit-banged ports are also where timing assumptions become visible: a design that runs at 20 MHz and one that runs at 40 MHz use different reload constants for the same baud rate, and a rebuild that keeps the constants but changes the clock produces a port that transmits garbage at exactly the right rate. Recognising the pattern early saves a technician from blaming the hardware.
A capture handler that measures the start bit and then samples at fixed offsets is a receive path built from timer arithmetic rather than from a peripheral, and it is worth reading twice, because the offset constants encode the baud rate. Rounding in those constants is the reason a bit-banged port tolerates a two percent clock error and fails at four.
Access
28-pin PDIP and SOIC. Locked parts are opened only for owners through the service desk. The copy-protection overview covers the bits, and the analysis workflow covers verification.
The CAN version is the PIC18F258; the 40-pin equivalent is the PIC18F452.
Service scope and next steps
PIC parts from the 16F, 18F and 32F families are handled on the same bench every week. We identify the exact device revision, check the read-protection level, and confirm the flash layout before quoting. 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.
Need a PIC part read?
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