Posts Tagged ‘extract microprocessor memory’

PostHeaderIcon PIC16C58B Data: The Same Array in a Narrower Package

There is a useful kind of economy in this family. The PIC16C58B carries 2048 words of twelve-bit program memory in an 18-pin package, and its 28-pin relative carries exactly the same array. Two part numbers, one design core, two pin counts. For anyone planning a read, that redundancy is worth more than it looks, because a route established on one body can be expected to work on the other.

Extract Microprocessor PIC16C58B Data from eeprom after unlock microcontroller PIC16C58B secured memory, and copy program pic16c58b into new MCU

Two part numbers, one array

The array, the instruction set, the stack depth and the programming model are shared across the family; what differs is the number of I/O lines brought out and therefore the size of the pad ring. With the core fixed and the pads multiplying, the die area is set by the pins rather than by the memory. That is what pad-limited means, and it has a practical consequence: the array occupies the same physical space and the same position relative to the core in both parts.

Why pad-limited is good news

A pad-limited die has generous space between the array and the edge, because the pad ring has to fit around a core that did not grow with it. On the 18-pin version the pads are packed more tightly than on the 28-pin, but the region over the array is identical, and the interconnect over it is unchanged. For an optical read that means the same magnification, the same lighting and the same classification thresholds. For a probe read it means the same bus lines, in the same relative positions, at the same pitch.

What changes when ten pins go away

Property 28-pin relative 18-pin PIC16C58B
Program words 2048 2048
I/O lines 20 12
Package body Wide Narrow
Array geometry Unchanged Unchanged

The last row is the one that matters for planning. Everything above it changes what the board can do; only the pin count changes the opening. A narrower body is slightly easier to decapsulate because there is less material to remove and the cavity is smaller, which also means less etch volume and a shorter exposure.

What “data” means on a part like this

The word in the request is usually loose. This part has no data EEPROM, only the program array and a small volatile RAM, so a request for its data is a request for the program image, or for whatever non-volatile values the program writes into itself at run time. If the firmware stores calibration in the array by self-programming, and the design chose to do that, the values are inside the image. If it does not, there is nothing else to find, and the answer is a short one rather than a long job.

The transfer test

Before committing to a full campaign on the narrow body, run the route on a scrap unit and check that the first two hundred words make sense as code. If they do, the geometry assumption holds and the rest of the array follows. If they do not, the most likely cause is not the die but the clocking or the word alignment, and those are corrected before any more material is spent. The same discipline is described in PIC16C57A program, where the algorithm generation matters more than the geometry.

The stack two levels deep

The twelve-bit core keeps a hardware stack of two entries, which sounds like a limitation and is a gift to anyone reading the code afterwards. With a stack that shallow the programmer cannot nest calls, so the source that was compiled into this array has a shape: short routines called one at a time, no recursion, and a call graph that is nearly a tree. Disassembly therefore reconstructs a structure that matches the original reasonably well, which is not true of the deeper-stack parts where the call tree is invisible until it is exercised.

What the report contains

An image, a configuration record, and a note on which geometry assumption was used for the read. On this part the note is short because there is little to be uncertain about, and that is the honest way to present it. Where a word could not be resolved, it is marked. A clean report with one flagged word is more useful than a confident report that is quietly wrong in the same place.

The limits, stated plainly

Pad-limited does not mean easy. The protection bit still returns zeros through the pins, the part is still one-time programmable, and a failed opening still destroys a device that may be the only one available. Where the wider body is already open on the bench, the technique is the same one described in PIC16C55 EEPROM, and where the deliverable is an image rather than a working unit, the format and verification steps are in extracting MCU code.