Reading Flash from a PIC18F2585: Config Bits, Not Fuses

Half the enquiries about this part arrive asking how to “crack the fuse bit”. There is no fuse. The PIC18F2585 has no one-time programmable element guarding its code — it has configuration bits in flash-backed memory, and those bits are rewritable. The distinction is not pedantry: it decides whether a read-out is destructive, whether the chip can be returned usable, and whether a clone is even the right plan.

The part itself is the 28-pin member of the ECAN family: 48 KB of enhanced flash, 24,576 instruction words, 3,328 bytes of SRAM, 1,024 bytes of data EEPROM, a 10-bit ADC with eight channels and 25 I/O — with a CAN 2.0B controller that runs to 1 Mbps and three transmit buffers.

What Actually Blocks a Read

Protection on this device sits in three config bytes. CONFIG5L carries CP0 through CP3, one bit per program block; CONFIG5H carries CPB for the boot block and CPD for the data EEPROM; CONFIG7L carries the EBTR bits that stop user code from reading the array through TBLRD.

Set any of them and the in-circuit programmer stops returning real data. It still connects, the device ID at 0x3FFFFE still reads correctly, and the buffer comes back full of a constant. Nothing is scrambled and nothing is destroyed — the array simply refuses to answer.

That is the whole difference between a copy protection scheme and encryption. Encryption implies a key and a cipher; here there is only a gate.

Why “Fuse” Is the Wrong Word

True fuses belong to an earlier generation: OTP parts where a link was physically blown, once, permanently. On a PIC18F2585 the protection setting is a flash cell. A programmer can set it and a programmer can clear it, provided the device is accessible.

Two practical consequences follow. First, a read-out does not have to end with a dead sample — if the die survives access, the protection state can be returned to what the customer wants, protected or cleared. Second, if a supplier talks about blowing a fuse on this part, they are describing a process that does not exist on it, and it is worth asking what they actually intend to do.

What the Read Returns

For a 48 KB device, a complete image is 3,072 Intel HEX data records of 16 bytes, plus the extended-address records that carry the config and EEPROM regions. The config words live at 0x300000–0x30000D, outside the flash space that a naive read covers, and the EEPROM sits at 0xF00000 with 1,024 bytes of it.

A file that omits those two regions will program into a blank part and then behave differently from the original — wrong oscillator, wrong brown-out threshold, missing calibration. Reading the program memory properly means all three regions, verified against a second independent read.

The Substitution Most People Miss

The PIC18F2585 shares a datasheet with the PIC18F2680 — same 28-pin footprint, same ECAN block, same peripherals, 64 KB instead of 48 KB. An image read from a 2585 therefore fits a 2680 with 16 KB to spare, and the config and EEPROM copy across unchanged.

When a 2585 cannot be sourced, that upward move is usually cheaper than waiting on allocations, and it is worth checking before anyone redesigns a board. The reverse does not work: a 2680 image above 48 KB has nowhere to go. Our PIC18F2680 page covers the CAN-side detail of that read.

Where the Schedule Goes

The electrical read is fast. Chip extraction analysis — confirming the dump has no filler holes, that the vector table resolves, that the two reads agree — is what takes the time, and it is the part that decides whether the file is useful.

Send the ordering suffix and a photograph of the marking; the mask revision changes more between suffixes than between base part numbers. The services page lists what a delivered image contains.

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.

Request a quotation

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *