Posts Tagged ‘mcu locked eeprom break’
Break MCU PIC16F870 Binary: When the Part Number on the Paperwork Is Wrong
The part number in the email is not always the part number on the board. Within a family, several members share a package, a pinout and most of a datasheet, and the difference between them is a peripheral that one has and the other does not. A customer reading a marking from memory, or from a purchasing record rather than the unit in hand, will name a different member with complete confidence.
The PIC16F870 is the member of its family without the ten-bit converter. Its siblings in the same twenty-eight-pin package have one. That single difference is enough to make the image look wrong to a customer expecting the other part, and it is also enough to prove which device is in the socket.
What the family shares and what it does not
| Feature | shared across the family | differs by member |
|---|---|---|
| package and pinout | yes, twenty-eight pins | no |
| program memory | size varies | 2K and 4K members |
| data EEPROM | 128 bytes on most | no |
| ten-bit converter | no | present on some members only |
| serial port | yes | yes |
| timers | three | no |
Because the package is identical, a board designed for one member will accept another, and a substitute fitted during a repair will work if the design does not use the missing peripheral. That is exactly the case that produces a mismatched delivery: the customer’s records say one part, the board carries another, and both are true at different times.
How the image identifies the device
Three observations settle it, and none requires the marking to be legible.
The converter registers. If the code writes to the converter’s control registers during initialisation, the device has a converter. If it never touches them and the product still measures something, the measurement is being done another way — a comparator with a timed charge, or an external converter on the serial port.
The initialisation footprint. The block that configures the peripherals is a list of register writes, and its contents are a parts list: timers, serial port, converter, comparator, reference. A device without a converter has a shorter list, and the absence is as diagnostic as the presence.
The channel count. A design that scans four analogue channels has four entries in its sampling routine. A design with none has no sampling routine at all, and what looked like one is a comparator threshold check.
Together these give an answer that is independent of any label.
Why the distinction changes the analysis
On a part with a converter, the reading of the program is dominated by the analogue path: sampling order, reference selection, scaling arithmetic, filtering. That is where the product’s behaviour is defined.
On a part without one, the same functional block is implemented differently — usually as a comparator plus a timer, measuring the time for a capacitor to charge through a resistance. The code is a timing loop, and the constant that matters is the count, not a scaling factor.
A reader who expects one and finds the other will describe the second as a broken version of the first. That misreading is the most common analytical error on this family, and it starts with the part number.
The marking, when it can be read
Top markings on parts of this vintage are sometimes legible and sometimes not. When they are, the family code and the memory code together identify the member; the temperature and package suffixes follow. When they are not, the die marking after decapsulation gives the same information more reliably, along with a mask revision that the package marking does not carry.
It is worth photographing the marking before any work begins, because a part that is later decapsulated has no marking left to argue about.
The conversation to have before the work
| Situation | What the customer believes | What the image shows | What to do |
|---|---|---|---|
| correct part, converter unused | the design measures | comparator timing | explain, then annotate accordingly |
| wrong member named | a converter design | no converter present | correct the record, proceed |
| substitute fitted in repair | original part | a different member | establish which behaviour is required |
| unmarked part | unknown | identified from the initialisation | report the identification |
The third row is the one with commercial consequences. A unit repaired with a substitute may have been working in a reduced mode for years, and the customer’s expectation of “the same as before” refers to the substitute’s behaviour, not the original’s.
Delivering with the identification stated
The delivery should open with the identification: which member of the family the image came from, how that was established, and what it implies about the peripherals in use. That paragraph prevents every subsequent misunderstanding, and it costs nothing to write.
Then the image over the full range with the word convention, the configuration word decoded, the data EEPROM raw, and a note on the analogue path — converter or comparator — with the constants that define its behaviour.
Where the sibling with the converter requires the sampling analysis, PIC16F872 program covers the reachability of that path. Where a forty-pin part shows what the extra pins are for, PIC16C662 heximal reads the ports. And where the identifying evidence has to be gathered before any interface is touched, CF755 dump recovery sets out that order.
The short version
Three members, one package, one difference that matters. Identify the device from the register writes rather than from the paperwork, state the identification at the top of the report, and read the analogue path according to what is actually there.