Posts Tagged ‘clone microcontroller hex’
Cloning a PIC16C54: The OTP Part Only Burns Once
A clone project has two halves and customers habitually price only one of them. The first half is obtaining the image, which on a protected part can be the harder technical problem. The second half is turning that image into working units, which on a one-time-programmable part is a manufacturing problem with no undo, and it is where projects quietly fail.

The part that has no second chance
The PIC16C54 is one-time programmable. There is no erase, no bulk wipe, no way back to a blank state once the configuration word has been written. On a flash part a mistake costs a minute and a re-program; here it costs the part. That asymmetry should drive the whole plan: every uncertain decision has to be resolved on a sacrificial unit before any of the production blanks are touched.
Buying blanks in a market that moved on
The part is long out of production, so the supply is whatever remains in brokers’ stock, and the risk is not price but provenance. Remarked, re-marked and partly-programmed parts circulate, and a blank check on receipt is the only defence. Buy a few more than the run needs, check every one, and keep a known-good reference unit aside for comparison. A clone run that fails at unit forty because the last box was relabelled is a schedule problem that no amount of reverse engineering can fix.
The configuration word is the clone
| Field | Wrong value does what | How it shows |
|---|---|---|
| Oscillator mode | No clock, or 20x too fast | Dead, or timing garbage |
| Watchdog | Resets every 18 ms | Runs, then restarts |
| Code protect | Second copy cannot be read | Silent, and permanent |
| Reset pin function | Will not start at all | Dead on power-up |
Two of those rows are worth pausing on. The oscillator mode is the one most often mis-set, because the original design may have used an external crystal that the clone board does not have. The code-protect row is worse: enable it on a blank you intend to verify later and the part becomes unreadable, so the protection bit belongs in the last programming pass, never the first.
One shot, so sequence it
Program a single unit, verify it in the socket, then run it in the target hardware before touching the rest. Verification in the programmer proves the bits were written; it does not prove the configuration matches the board. Only the board proves that. Once one unit passes, the remaining blanks can be run in a gang programmer, and throughput becomes the constraint rather than correctness.
The half of the cost nobody quotes
The image is a fixed engineering fee and it ends when the file is right. The units are a recurring cost, and on a discontinued one-time part that cost is dominated by sourcing rather than by labour. Buyers who budget from the image fee alone are consistently surprised, and the honest quote separates the two lines so the customer can decide whether to make ten units or a thousand. The arithmetic also changes the question: for ten units the right answer may be to repair the originals, and for a thousand the answer may be to redesign onto a part that is still manufactured.
When the answer is no
Cloning is the wrong instrument when the device is available, when the firmware can be rebuilt from source, or when the volume is so low that each unit is effectively a bespoke build. It is also the wrong instrument when the configuration word cannot be recovered, because without it the image is a program with no clock and no watchdog setting, and every unit becomes an experiment. Saying that early has more value than a quote, and it is the same honesty that keeps a break project from being sold as a certainty.
What goes wrong at volume
Two failures recur. The first is mixing programming algorithms across generations of the same family, which is the subject of PIC16C57A program; the second is a programmer that verifies against its own buffer rather than reading back the die. The second is more dangerous because it reports success. Insist on a read-back verify, and on a sample read of one finished unit by a different tool.
What the customer actually receives
An image file, a configuration record, and units that run. The image is not the deliverable and neither is the report; the working unit is, which is the point made at length in copying a microcontroller. Where the device is still in production the whole exercise is unnecessary, and saying so is cheaper than quoting it. For the same array in a narrower package, the reading side is covered in PIC16C58B data, and the general framing is in cloning IC firmware.