Archive for the ‘Recover Chip’ Category
Copy Microcontroller PIC16CR83 Heximal: When the Array Is Mask ROM
Every assumption in a normal recovery job comes from flash. The array can be erased and rewritten, so a read is one half of a copy and a write is the other half. This device breaks that symmetry at the manufacturing stage: its program was written into the silicon at the mask level, and no pin, protocol or tool can change it afterwards.
That does not make extraction impossible. It makes the deliverable different, and it makes the conversation at the start of the job considerably more important, because a customer who expects a reproducible production part is going to be disappointed by something that is working exactly as intended.
What the ordering code tells you
The letter in the middle of the part number is the whole story.
| Variant | Storage | Rewritable | Tool to write it |
|---|---|---|---|
| erasable EPROM | floating gate, windowed | yes, by ultraviolet light | a production programmer |
| flash | floating gate, electrical | yes, in system or in a socket | a production programmer |
| mask ROM, this device | diffusion pattern at fabrication | no | a photomask and a wafer fab |
The distinction is not about convenience. A mask ROM stores its content as the presence or absence of a connection created during the diffusion process. There is no charge to inject and no cell to erase. The content is a physical property of the die in the same way that its pinout is.
What extraction still achieves
Three outcomes are achievable and each has a different value.
Reading the program. The interface on this generation can return the array, because the read path exists for test purposes at the factory and was not removed for production parts. Where a protection mechanism is engaged the read may be refused, and where it is not, the content comes out as a normal image.
Understanding the design. This is where most of the value lies. A product built on a mask ROM part is a high-volume product, and a high-volume product is one somebody wants to maintain, repair, or replace. Knowing what the program does is the first step in all three.
Migrating to a programmable equivalent. The content can be moved onto a flash-based relative, which restores the ability to manufacture. This is the only route to a reproducible part, and it is a real engineering project rather than a file conversion.
Why migration is not a copy
A mask ROM image does not program into a flash device by being written. Several things have to be resolved first.
The timing is different. A mask ROM access is combinational and fast; a flash read has a defined access time and, on some devices, a wait state. Code that relied on the ROM’s speed in a tight loop may need adjustment.
The configuration differs. A mask ROM part’s configuration is largely fixed by the mask, so the image may not contain a configuration word in the sense a flash part expects. The oscillator, the watchdog and the protection settings must be reconstructed from the design’s requirements rather than read from the original.
The peripherals may differ. A flash equivalent in the same family usually has a superset of the ROM part’s peripherals, which is convenient, and a different register map in places, which is not.
And the program itself may contain self-modifying tricks that were safe on ROM and are not on flash — writing to a location that the ROM ignored is a no-op, and on flash it is a programming operation.
What the image looks like
A mask ROM image has a structural signature that differs from a flash image in one visible way: there is no erased tail.
On a flash part, the boundary between programmed and unprogrammed space is visible as a change to the erased pattern, and its position measures how much of the array the production line used. On a mask ROM the array was fabricated as a whole, so the unused space was defined at the same time and contains whatever the mask specified — frequently zeros rather than the erased pattern of a flash part.
That difference matters when the image is compared against a flash device’s image. A comparison tool that treats the tail as data will report thousands of differences that are not differences of content, only of convention.
Reading, and what the protection bit means here
The protection mechanism on this generation blocks the interface from returning the array. On a mask ROM part it is worth understanding what it protects against: not modification, which is impossible anyway, but inspection.
Where the read is permitted, the job is an ordinary extraction followed by the analysis described above. Where it is refused, the physical route remains, and it is the only route — there is no behavioural shortcut that recovers a design of this size with any fidelity, because the product’s outputs are a small projection of the code that produced them.
Deciding the goal before starting
Four goals, four different jobs, and the price and the duration differ by more than an order of magnitude.
- Confirm what the product is. A comparison against a known design, or an inspection of a few dozen words. Short.
- Understand the algorithm. Full disassembly with tables and idioms identified. Medium.
- Repair one unit. The image plus the data array, programmed onto a flash relative and fitted. Medium, and it works.
- Restore manufacturing. Migration to a flash part, with timing, configuration and peripheral differences resolved and the result validated. Long, and it is a design project.
Most customers ask for four and need three. Establishing which one is being bought, in writing, before any work begins, is the single most useful thing that can be done on a job involving a mask-programmed device.
The delivery
- the program image, with the array’s extent and the meaning of any uniform tail stated
- a note that the source was mask-programmed, so that no reader attempts to program a blank device with it
- the identified tables and constants
- a disassembly with data regions marked
- where migration is the goal, a list of the differences that must be resolved
The second item is a single sentence that prevents an expensive mistake. Files travel without their context, and an image extracted from a mask ROM part looks exactly like an image extracted from a flash part once it is on a disk.
For the rewritable relatives where the copy is genuinely two-sided, PIC16C556A software recovery covers the interpretation work. Where the storage is charge-based and re-programmable but analogue in behaviour, PIC16C74B binary reading covers the read-margin question. And for the same mask-versus-programmable distinction on a slightly larger part in the same line, PIC16CR84 code recovery is the companion case.
Copy Microcontroller PIC16F887 File
Copy Microcontroller PIC16F887 File
A computed GOTO is accomplished by adding an offset to the program counter (ADDWF PCL). Care should be exercised when jumping into a look-up table or program branch table (computed GOTO) by modifying the PCL register when Copy Microcontroller PIC16F887 File.
Assuming that PCLATH is set to the table start address, if the table length is greater than 255 instructions or if the lower 8 bits of the memory address rolls over from 0xFF to 0×00 in the middle of the table, then PCLATH must be incremented for each address rollover that occurs between the table beginning and the target location within the table.
For more information refer to Application Note AN556, “Implementing a Table Read” (DS00556)
There are as many as thirty-five general purpose I/O pins available. Depending on which peripherals are enabled, some or all of the pins may not be available as general purpose I/O. In general, when a peripheral is enabled, the associated pin may not be used as a general purpose I/O pin.
PORTA is a 8-bit wide, bidirectional port. The corresponding data direction register is TRISA (Register 3-2). Setting a TRISA bit (= 1) will make the corresponding PORTA pin an input enabled, the associated pin may not be used as a general purpose I/O pin. output driver).
Clearing a TRISA bit (= 0) will make the corresponding PORTA pin an output (i.e., enables output driver and puts the contents of the output latch on the selected pin). Example 3-1 shows how to initialize PORTA.
Reading the PORTA register (Register 3-1) reads the status of the pins, whereas writing to it will write to the PORT latch. All write operations are read-modify-write address rolls over from 0xFF to 0×00 in the middle of operations. Therefore, a write to a port implies that the port pins are read, this value is modified and then written to the PORT data latch from Copy Microcontroller PIC16F887 File.
The TRISA register (Register 3-2) controls the PORTA pin output drivers, even when they are being used as analog inputs. The user should ensure the bits in the TRISA register are maintained set when using them as analog inputs. I/O pins configured as analog input always read “0″.
Additional Pin Functions
RA0 also has an Ultra Low-Power Wake-up option. The next three sections describe these functions.
The ANSEL register (Register 3-3) is used to configure the Input mode of an I/O pin to analog. Setting the appropriate ANSEL bit high will cause all digital reads on the pin to be read as ‘0’ and allow analog functions on the pin to operate correctly.
The state of the ANSEL bits has no affect on digital output functions. A pin with TRIS clear and ANSEL set will still operate as a digital output, but the Input mode will be analog. This can cause unexpected behavior when executing read-modify-write instructions on the affected port.
Copy Chip PIC16F87 Code: One Die, Two Ordering Codes
Semiconductor lines are built to sell several products from one design. A die is designed with a full complement of blocks, and the ordering codes select which blocks are tested, which are bonded to pins, and which are simply not there as far as the register map is concerned. The result is a set of parts that are nearly identical and not interchangeable.
This device is the trimmed variant of a pair. Its sibling carries an analogue-to-digital converter; this one does not. Everything else — the core, the array sizes, the serial port, the timers, the internal oscillator — is the same silicon. That makes a copy between the two almost free and occasionally catastrophic, and knowing which case you are in is a matter of reading a handful of instructions.
What differs and what does not
| Element | This device | Sibling with converter |
|---|---|---|
| core and instruction set | identical | identical |
| program array size | identical | identical |
| data array size | identical | identical |
| analogue converter | absent, registers unimplemented | present, multi-channel |
| pin functions | a subset | a superset |
| configuration word layout | identical | identical |
The important row is the fourth. An unimplemented register on this generation does not raise a fault and does not read as an error. It reads as zero, or as an undefined value, and the code that uses it continues executing with that value as though nothing were wrong.
The failure mode that makes this subtle
Suppose a product is written for the sibling, reads an analogue channel, compares the result against a threshold and takes a branch. Program that code into this device and the read returns zero every time. The comparison against the threshold now always takes the same branch, so the product behaves as though the measured quantity were permanently at one extreme.
Nothing crashes. Nothing resets. The device runs, its outputs are stable, and they are wrong in a way that looks like a sensor fault rather than a firmware mismatch.
That is the characteristic signature, and it is worth recognising because the same pattern appears whenever code crosses between variants: a peripheral that exists on one part and not the other produces a constant rather than an error, and the constant propagates silently.
Detecting the dependency before copying
Three checks decide whether an image can move to the trimmed variant, and they can all be done from the listing.
- Search for accesses to the converter’s control and result registers. Any read of a result register is a hard dependency.
- Search for configuration writes that enable the converter. Enabling a block that does not exist is harmless, but it usually sits next to a read, so it is a good marker.
- Search for pin assignments that differ between the variants. A pin that is analogue on the sibling and digital-only here changes the meaning of a port direction write.
Where all three come back clean, the image moves without modification. Where any of them is present, the image needs work, and the work is not a recompile — it is a substitution of the missing measurement with something the trimmed part can provide, or a decision that the trimmed part is the wrong choice.
What the configuration word does and does not decide
An assumption worth correcting: the configuration word does not tell the silicon which peripherals it has. Peripheral presence is a property of the die and its test, not of a configuration bit. The configuration word controls the oscillator, the watchdog, the brown-out threshold, the protection bits and the programming pin’s function.
That means the configuration word transfers unchanged between the two variants, which is convenient and slightly misleading. It transfers, and it says nothing about whether the code will work.
Where the variant difference matters to configuration is in pin function: on a part with fewer analogue inputs, some pins that the sibling treats as analogue are ordinary digital I/O, so a configuration that made sense on the sibling may leave a pin in a state the trimmed part handles differently.
Reading the array and identifying the variant
The identifier word distinguishes the two parts, and reading it is the first step of any copy that crosses variants. It is also the step people skip, because the packages look the same and the label is small.
On a device whose label is unreadable — which happens more often than one would expect on older stock — the identifier is the only reliable way to know which variant is in hand. Reading it before writing anything prevents the most expensive error in this class of work, which is programming a full-featured image into a trimmed part and spending a week diagnosing the resulting behaviour.
Copying in the other direction
Moving code from the trimmed variant to the full one is safe and is the common direction in practice. A product designed for this device runs unchanged on the sibling, because the sibling implements everything this one does and more.
Two caveats apply. The extra peripheral blocks are powered up in their reset state, which on some designs draws more current than the product’s supply budget allows until they are explicitly disabled. And the extra pins, where the packages differ, may be driven by the application in ways that conflict with the analogue function they now serve.
Neither is a reason not to do it, and both are reasons to state the direction of the copy in the delivery.
The delivery
- the program image and the data image, with the variant identified
- the configuration word decoded
- an explicit statement of which variant was used as the source and which is the intended target
- a list of any instructions that touch a peripheral absent on the target, by address
- the identifier words from both devices, where both were available
The fourth item is the one that prevents the silent-constant failure. It converts a guess into a list.
For the same pair seen from the data side, where the byte-writable array and its access discipline are the subject, PIC16F88 data recovery covers the store. On the mid-range part where the analogue block is always present and the variant question does not arise, PIC16F627A binary copying covers the calibration byte instead. And for a family where the variants differ in array size rather than peripherals, changing the analysis entirely, PIC16F873A code recovery is the comparison.
The general lesson
Ordering codes within a family are not versions of one product. They are selections from a menu, and the menu changes what is present rather than what is enabled. Any copy that crosses a code boundary should begin with the identifier read and end with a list of peripherals the source used and the target lacks. Everything between those two steps is ordinary work; those two steps are what make the work correct.
Break IC PIC16F88 Data: Reading the Byte-Writable Array Properly
Two arrays live inside this device and they could hardly be more different in character. Program memory is read as instruction words, written in blocks, and protected by one bit. The data array is read and written one byte at a time, through a small set of registers, with a timing requirement and a handshake — and it is protected by a different bit.
That difference is not a curiosity. It decides the order in which a recovery should proceed, it explains why the data array often survives when the code does not, and it leaves a fingerprint in the firmware that tells you how the product uses its store.
How the array is reached
Three registers form the interface: one holds an address, one holds a byte of data, and one carries the control and status bits that start a read or a write and report when it is finished. The sequence for a read is short — write the address, set the read control bit, wait one cycle, take the byte. A write is longer, because the array needs a programming pulse and the firmware must wait for it to complete.
| Operation | Steps | Constraint that catches people out |
|---|---|---|
| read a byte | address, set read bit, one cycle, read data register | the address register is not auto-incremented |
| write a byte | address, data, unlock sequence, set write bit, wait | the unlock sequence must be uninterrupted |
| erase then write | the same, with a separate erase step on some variants | a write without erase may not settle correctly |
The unlock sequence is the detail worth knowing. Writing to the array requires a specific sequence of writes to a control register that must occur without interruption — no branch, no interrupt, no call between them. Firmware that gets this right is visible in the listing as a short straight-line block with interrupts disabled around it. Firmware that gets it wrong does not write reliably, which produces a product that loses settings intermittently and is very hard to diagnose from the outside.
What the content tells you about the product
A blank data array reads as a uniform pattern. A used one rarely does, and the shape of the non-uniformity is informative.
Where a product keeps a single parameter, the array shows one or two bytes of real data and the rest blank. Where it keeps a structured record, the array shows a block with internal consistency — sequential numbers, a checksum, a version byte. Where it logs over time, the array shows repeated records with increasing counters.
Three inspection habits pay off.
First, look at the first few bytes. A magic value there is the convention for distinguishing a virgin device from a populated one, and its presence tells you whether the product performs first-run initialisation.
Second, look for a checksum. Where one exists, the array validates itself, and a validation failure on a recovered copy is a strong indication that the read was incomplete rather than that the data was corrupted.
Third, look for asymmetry. A block of identical non-blank values in an otherwise diverse array is usually a factory default written once and never updated.
Why the data array survives when the code does not
Data protection is a separate configuration bit. On a great many products it is left unset even when code protection is engaged, for a simple reason: the production line needs to write per-unit parameters into the array after the code has been locked. Leaving the data array open is the convenient choice, and convenience wins.
That asymmetry is the single most useful fact in this kind of work. It means the order of operations should be data first, code second — the opposite of what the phrase read the firmware suggests.
The asymmetry also means that a device whose code is unrecoverable may still yield a complete parameter set, which for a repair operation is often enough. A replacement controller loaded with a known-good image plus the original unit’s calibration is a working repair, even if the original code was never read.
Order of operations on an unknown device
- Read the identifier and the configuration bits. This establishes the part, the revision, and which arrays are protected.
- Read the data array. It is usually accessible and it is usually the part with the least redundancy elsewhere.
- Validate the data array against its own internal structure, if it has one.
- Read the program array, accepting that it may be refused.
- Read the configuration bits again, in case the first read was affected by the device’s state at power-up.
Step five sounds superstitious and is not: configuration bits on this generation can be read reliably only when the device is in programming mode, and a tool that reports them from a running device is reporting something slightly different.
When only the data array is available
A parameter set without code is still a deliverable, and it needs its own presentation.
- the raw bytes, with the blank regions marked rather than omitted
- a field map guessed from the structure, clearly labelled as inferred
- any values that look like calibration, identified with their plausible range
- the count of times a record appears, where the array looks like a log
The labelling matters because a field map inferred from structure can be wrong in ways that are expensive. A four-byte value that looks like a counter may be a serial number; treating it as a counter and incrementing it destroys the identity of the unit.
Where this device sits in the family
The sibling without the analogue converter has the same data array and a slightly smaller peripheral set, and the copy question there is about which parts of the image are shared between variants — covered in PIC16F87 code copying. The larger 40-pin relative adds a fourth region to the delivery and is treated in PIC18F4220 binary copying. And the classic C-series part where the parameter store is often external to the device entirely is covered in PIC16F76 EEPROM recovery.
The habit that makes this repeatable
Read the data array on every job, even when the request is explicitly about code. It costs seconds, it is rarely blocked, and it is the one part of the device that cannot be reconstructed from anywhere else. Where it turns out to be blank, that is also an answer — it says the product keeps its state somewhere else, which redirects the whole investigation.
The PIC16F57 Has No Interrupts — and That Changes What a Code Dump Is Worth
The PIC16F57 is the largest member of Microchip’s 12-bit baseline family: 2048 × 12 words of program memory, 72 bytes of RAM, 20 I/O pins and a 2-level hardware stack. It has no interrupt controller, no data EEPROM, no serial port and no analog-to-digital converter. Its entire instruction set is 33 instructions.
Those absences are usually read as limitations. For anyone trying to reconstruct firmware from a working device, they are a specification of what the program must look like — and, more usefully, a guarantee about when the job is finished.
What the PIC16F57 actually contains
| Item | PIC16F57 |
|---|---|
| Core | 12-bit instruction word, 33 instructions |
| Program memory | 2048 × 12-bit Flash (3 KB) |
| Data RAM | 72 bytes (08h–4Fh) |
| Data EEPROM | none |
| Hardware stack | 2 levels |
| I/O pins | 20 (PORTA 4, PORTB 8, PORTC 8) |
| Interrupts | none |
| Timers | Timer0 (8-bit) with prescaler |
| Watchdog | yes, with its own RC oscillator |
| Packages | 20-pin PDIP/SOIC, 28-pin PDIP/SOIC/SSOP |
| Programming | ICSP, high voltage on MCLR |
The 28-pin package does not add I/O. It exists so the same die can be dropped into sockets wired for larger parts; PORTA, PORTB and PORTC are the only ports, and RA3 is input-only because it is also MCLR.
A 2-level stack with nothing to interrupt
The stack depth of two is not a design oversight. With no interrupt sources, the only nesting possible is a call from within a call. A subroutine that calls another subroutine has consumed the entire stack. This is why baseline-family code from that era is written as a flat set of leaf routines and why compilers targeting it avoid call graphs deeper than two.
For reading recovered code, the practical consequence is that the call structure is legible without any analysis at all. There is no interrupt vector, no context save and restore around handlers, no reentrancy question. A 2048-word image decomposes into a reset vector at 0000h, a main loop, and a set of leaf routines. The only ambiguity is indirect addressing through FSR, which on this family is limited to the lower 256 bytes of the register file.
No data EEPROM means the dump is the whole program
On most microcontrollers, the program memory is only part of the story. Calibration coefficients, serial numbers, gain corrections and user settings sit in a separate data EEPROM array with its own address space and sometimes its own protection bit. Recovering program flash alone yields a binary that runs and measures wrong — a failure mode considerably harder to diagnose than one that refuses to start.
The PIC16F57 has no such array. Every constant it uses has to be embedded in program memory, which on this core means a RETLW table: a sequence of return-with-literal instructions that the routine walks by manipulating the program counter. Two things follow.
First, a full 2048-word dump is a complete record of the device’s behaviour. There is nothing stored outside it except the configuration word. Second, the constants are visible as literal data in the listing — a table of RETLW values reads directly as the numbers the firmware used, whether those are ADC thresholds, timing counts or a segmented linearisation curve.
On a chip with a 10-bit ADC, this is the whole calibration story. On the PIC16F57 there is no ADC at all, so the RETLW tables usually hold timer reload values and comparator thresholds from an external reference instead.
The configuration word at 7FFh
On the 12-bit core the configuration word is not in a separate 2000h region. It is mapped onto the highest program address — 7FFh on a 2K device — and the fields are three:
| Bits | Field | Meaning |
|---|---|---|
| 13:5 | — | Unimplemented, read as 1 |
| 4 | CP | Code protection; 0 = program memory protected |
| 3 | WDTE | Watchdog enable; 0 = enabled |
| 2:0 | FOSC2:FOSC0 | Oscillator: 111 RC, 110 RCIO, 101 INTOSC, 100 INTOSCIO, 011 EC, 010 HS, 001 XT, 000 LP |
Note the polarity on both protection-adjacent bits. CP is active low, and WDTE is active low as well — a bit that reads as 0 means the watchdog is running. Configuration words on this family are written with a mix of active-high and active-low fields, so a dump that is read without checking polarity per field will be misread in both directions.
There is no LVP bit, no BOREN field, no MCLRE and no failsafe clock monitor. Programming requires high voltage on MCLR/RA3, and there is exactly one programming path.
What protection does on a Flash baseline part
CP = 0 blocks external reads of the program array, including reads issued over ICSP. It does not block execution: the device runs normally, the watchdog runs, the code behaves exactly as the designer intended. Protection on this family is a read restriction on the programming interface, not a functional change.
Microchip’s programming specification for the Flash baseline parts carries the same clause that appears across the Flash families:
The entire program memory will be erased when code protection is turned off.
So the sequence “clear CP, then read” cannot recover anything. Clearing CP performs a bulk erase of the array, and the read that follows returns erased words. This is worth stating plainly because it is the single most common misunderstanding about these parts and it is repeated in a great deal of secondary material.
The 2-level stack and the absent peripherals do not change that arithmetic. They change the analysis — what the recovered image means and whether it is complete — not the mechanism by which it is obtained.
Reading the oscillator field
FOSC2:FOSC0 selects between a resistor/capacitor oscillator, an internal RC oscillator, an external clock input, and the LP/XT/HS crystal ranges. Two of the eight codes (RCIO and INTOSCIO) also free up the oscillator pins as I/O, which is how a 20-I/O part ends up with 20 usable pins in a design that has no crystal.
On recovered code, the oscillator setting determines one thing that matters more than it appears to: the timing base. Firmware written for INTOSC and firmware written for an HS crystal are not interchangeable even when the instruction stream is identical, because every delay loop and every timer reload was computed against a specific frequency. A dump without the configuration word is a program whose timing cannot be reproduced.
What a complete image contains
- 000h–7FEh — 2047 × 12-bit program words
- 7FFh — the configuration word (CP, WDTE, FOSC2:FOSC0)
- nothing else — no data EEPROM, no user ID row, no calibration area
That last line is unusual enough to be worth repeating. On this part, the program array plus one word is the entire non-volatile state of the device.
Related notes
The smaller members of the same family use an identical configuration word and the same 12-bit core: the PIC16F54 at 512 words, and the PIC16F59 which adds I/O without adding peripherals. The Flash 8-pin branch of the same architecture is covered in the note on the PIC16F505, and a part with the opposite problem — protection plus a data EEPROM — is described in the PIC16F684 write-up.
FAQ
Does the PIC16F57 have interrupts? No. It has no interrupt sources, no interrupt vector and no interrupt enable bits. Polling is the only option, and the hardware stack is two levels deep accordingly.
Where is the configuration word? At program address 7FFh, on this 2K device. It is mapped into program memory rather than a separate configuration region.
Can code protection be removed and the program read back? No. Clearing CP triggers a bulk erase of program memory, so the read afterwards returns erased words.
Is there a data EEPROM to recover separately? No. Constants are stored in program memory as RETLW tables, which means a full program dump contains them.
Does CP = 0 affect how the chip runs? No. Protection restricts reads over the programming interface. Execution, timing and I/O behaviour are unaffected.
Conclusion
The PIC16F57 is a useful reference point because its limitations are so clean. No interrupts means no vector table and a legible call structure. No data EEPROM means no second memory to chase and no silently missing constants. One configuration word at 7FFh, three fields, and a protection bit whose clearing destroys what it was meant to expose. Almost every question about this chip can be answered from the array itself — which is a stronger position than most parts offer.
Break IC PIC16F648A Heximal
FLASH devices can be erased and re-programmed electrically which is a critical feature when Break IC PIC16F648A Heximal. This allows the same device to be used for prototype development, pilot programs and production.
A further advantage of the electrically erasable FLASH is that it can be erased and reprogrammed in-circuit, or by device programmers, such as Microchip’s PICSTART® Plus, or PRO MATE® II programmers.
The high performance of the PIC16F648A family can be attributed to a number of architectural features commonly found in RISC microprocessors. To begin with, the PIC16F648A uses a Harvard architecture, in which program and data are accessed from separate memories using separate busses.

Break IC PIC16F648A Heximal
This improves bandwidth over traditional von Neumann architecture where program and data are fetched from the same memory when Break IC PIC16F648A Heximal. Separating program and data memory further allows instructions to be sized differently than 8-bit wide data word. Instruction opcodes are 14-bits wide making it possible to have all single word instructions.
A 14-bit wide program memory access bus fetches a 14-bit instruction in a single cycle. A two-stage pipeline overlaps fetch and execution of instructions. Consequently, all instructions (35) execute in a single-cycle (200 ns @ 20 MHz) except for program branches.
(QTP) Devices Microchip offers a QTP Programming Service for factory production orders. This service is made available for users who chose not to program a medium to high quantity of units and whose code patterns have stabilized.
The devices are standard FLASH devices but with all program locations and configuration options already programmed by the factory. Certain code and prototype verification procedures apply before production shipments are available.
Microchip offers a unique programming service where a few user-defined locations in each device are programmed with different serial numbers. The serial numbers may be random, pseudo-random or sequential. Serial programming allows each device to have a unique number, which can serve as an entry-code, password or ID number.
Copy Microcontroller PIC16F677 Code
The PIC16F677 is a highly integrated 20-pin MCU that has become a staple in modern electronics due to its impressive balance of precision analog features and robust digital control. Found at the heart of various sectors—from high-efficiency LED lighting controllers and automotive sensor interfaces to complex security alarm systems—this chip is valued for its internal oscillator and versatile I/O. Its embedded architecture includes a reliable flash memory and an integrated eeprom, specifically designed to store sensitive program logic and calibration data. However, when these devices are deployed in the field, they are almost always protected by internal security fuses. This locked state ensures that the secured logic remains inaccessible to standard readers, which can create a critical roadblock for companies needing to maintain legacy hardware when the original development file is missing.

Our specialized laboratory offers a sophisticated service to break through these hardware-level restrictions to retrieve the vital binary archive residing within the silicon. To successfully attack a secured MCU, our technical team may physically decapsulate the chip to expose the internal circuitry for micro-probing or optical analysis. This advanced method allows us to decode the heximal data directly from the protected memory layers without compromising the integrity of the original hardware. Whether you need to clone an obsolete MCU for emergency repairs or duplicate the firmware from a locked device to safeguard your production line, our process ensures a flawless extraction of the embedded source code. By choosing to hack the physical and logical barriers of the PIC16F677, we turn a secured “black box” back into a manageable and portable program archive.

Low-Power Features:
· Standby Current:
– 50 nA @ 2.0V, typical
· Operating Current:
– 11 ìA @ 32 kHz, 2.0V, typical
– 220 ìA @ 4 MHz, 2.0V, typical
· Watchdog Timer Current:
– <1 ìA @ 2.0V, typical
Peripheral Features:
· 17 I/O pins and 1 input only pin:
– High current source/sink for direct LED drive
– Interrupt-on-Change pin
– Individually programmable weak pull-ups
– Ultra Low-Power Wake-up (ULPWU)
· Analog Comparator module with:
– Two analog comparators
– Programmable on-chip voltage reference (CVREF) module (% of VDD)
– Comparator inputs and outputs externally accessible

– Timer 1 Gate Sync Latch
– Fixed 0.6V VREF
· A/D Converter:
– 10-bit resolution and 12 channels
· Timer0: 8-bit timer/counter with 8-bit programmable prescaler
· Enhanced Timer1:
– 16-bit timer/counter with prescaler
– External Timer1 Gate (count enable)
– Option to use OSC1 and OSC2 in LP mode as Timer1 oscillator if INTOSC mode selected
· Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
· Enhanced Capture, Compare, PWM+ module:
– 16-bit Capture, max resolution 12.5 ns
– Compare, max resolution 200 ns
– 10-bit PWM with 1, 2 or 4 output channels, programmable “dead time”, max frequency 20 kHz
– PWM output steering control
· Synchronous Serial Port (SSP):
– SPI mode (Master and Slave)
· I2C™ (Master/Slave modes):
– I2C™ address mask
· In-Circuit Serial ProgrammingTM (ICSPTM) via two pins

The core objective of performing a targeted attack to break the security of a protected PIC16F677 is to ensure the longevity of high-value industrial assets. In many cases, the ability to retrieve a heximal file is the difference between a simple component replacement and a total system overhaul. By deciding to decode or hack the secured memory of an existing chip, engineers can clone or duplicate critical firmware to new units, effectively bypassing the constraints of a locked or encrypted environment. Our service provides the essential bridge for those who need to duplicate the flash and eeprom data from an embedded controller, ensuring that the binary logic is preserved with 100% accuracy. This prevents the catastrophic loss of proprietary algorithms and ensures that your protected source code remains an active part of your operational inventory.

For the end user, the advantages of our MCU code recovery service are found in significant cost savings and minimized operational downtime. Rather than investing months into reverse-engineering a lost program, you can simply retrieve the heximal data and clone the locked logic onto a replacement device immediately. We specialize in how to decapsulate and attack these high-security components to ensure that the binary file is extracted with surgical precision. Our expertise allows you to decode and duplicate the firmware of any secured PIC16F677, turning a protected archive into a functional reality once again. By utilizing our professional services to break the limitations of embedded silicon, you ensure that your data, flash, and eeprom contents are always available to support your critical infrastructure.

Break Microcontroller PIC16F690 Heximal
The PIC16F690 stands out as a highly versatile member of the 8-bit embedded family, prized for its integrated peripherals and low power consumption. This microcontroller is a staple in diverse sectors, including smart home automation, portable medical instruments, and automotive lighting systems. Its unique architecture combines a high-speed flash memory with an integrated eeprom for non-volatile data storage, providing a robust platform for complex program logic. In many industrial applications, this chip serves as the central hub for processing sensor data or managing communication protocols. However, because these units are often shipped with locked or protected security bits to prevent unauthorized access, maintaining or upgrading older systems becomes a significant challenge when the original source code is no longer available.

Our specialized lab services offer a reliable methodology to break these hardware barriers and retrieve the essential heximal data required for system continuity. To successfully attack a secured device, our technicians may decapsulate the physical package to gain direct access to the internal silicon circuitry. By bypassing the protective security fuses, we can effectively decode the binary archive stored within the flash and eeprom layers. Whether your goal is to clone a legacy PLD or duplicate the firmware from a failing board, our process ensures a high-fidelity extraction of the embedded file. This professional approach allows companies to hack through the limitations of obsolete hardware, ensuring that critical program instructions are recovered and preserved for future use.

We can Break Microcontroller PIC16F690 Heximal, please view the Microcontroller PIC16F684 features for your reference:
High-Performance RISC CPU:
· Only 35 instructions to learn:
– All single-cycle instructions except branches
· Operating speed:
– DC – 20 MHz oscillator/clock input
– DC – 200 ns instruction cycle
· Interrupt capability
· 8-level deep hardware stack
Low-Power Features:

· Standby Current:
– 1 nA @ 2.0V, typical
· Operating Current:
– 8.5 µA @ 32 kHz, 2.0V, typical
– 100 µA @ 1 MHz, 2.0V, typical
· Watchdog Timer Current:
– 1 µA @ 2.0V, typical
· Direct, Indirect and Relative Addressing modes
Peripheral Features:
Special Microcontroller Features:
· Precision Internal Oscillator:
– Factory calibrated to ±1%
– Software selectable frequency range of 8 MHz to 31 kHz
– Software tunable
– Two-speed Start-up mode
– Crystal fail detect for critical applications
– Clock mode switching during operation for power savings
· Power-saving Sleep mode
· Wide operating voltage range (2.0V-5.5V)
· Industrial and Extended Temperature range
· Power-on Reset (POR)
· Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
· Brown-out Detect (BOD) with software control option

· Enhanced low-current Watchdog Timer (WDT) with on-chip oscillator (software selectable nominal 268 seconds with full prescaler) with software enable to facilitate the process of Break Microcontroller PIC16F690 Heximal.
· Multiplexed Master Clear with pull-up/input pin
· Programmable code protection
· High Endurance Flash/EEPROM cell:
– 100,000 write Flash endurance
– 1,000,000 write EEPROM endurance
– Flash/Data EEPROM retention: > 40 years
· 12 I/O pins with individual direction control:
– High current source/sink for direct LED drive
– Individually programmable weak pull-ups
– Ultra Low-power Wake-up (ULPWU)
· Analog comparator module with:
– Two analog comparators
– Programmable on-chip voltage reference (CVREF) module (% of VDD)
– Comparator inputs and outputs externally accessible
· A/D Converter:
– 10-bit resolution and 8 channels
· Timer0: 8-bit timer/counter with 8-bit programmable prescaler
· Enhanced Timer1:
– 16-bit timer/counter with prescaler
– External Gate Input mode
– Option to use OSC1 and OSC2 in LP mode as Timer1 oscillator if INTOSC mode selected
· Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
· Enhanced Capture, Compare, PWM module:
– 16-bit Capture, max resolution 12.5 ns
– Compare, max resolution 200 ns
– 10-bit PWM with 1, 2 or 4 output channels, programmable “dead time”, max frequency 20 kHz
· In-Circuit Serial ProgrammingTM (ICSPTM) via two pins

The primary motivation to break a protected PIC16F690 is often to ensure long-term equipment reliability and to mitigate the risks of component end-of-life. By choosing to decode or attack the locked security of a microcontroller, an engineer can retrieve the heximal file needed to clone or duplicate a vital system component. This is particularly beneficial for the end user who needs to hack the software limitations of a secured device to perform repairs or essential firmware updates. Our service transforms a protected binary archive back into a usable source code equivalent, allowing you to duplicate the flash content and transfer it to new hardware. This prevents the total loss of proprietary logic and ensures that your embedded memory remains an asset rather than a liability.

Choosing our service provides immediate benefits by reducing the downtime associated with manual software redevelopment. Instead of starting from scratch, you can retrieve the heximal program and clone the locked data directly onto a fresh chip. Our expertise in how to decapsulate and attack these high-security microcontrollers ensures that the encrypted or protected logic is handled with surgical precision. We help you break the cycle of forced obsolescence by providing a path to decode and duplicate the firmware of any secured PIC16F690. Ultimately, we provide the technical bridge between a protected binary file and a fully functional, restored system, ensuring your eeprom and flash data are always within reach.
Copy Microcontroller PIC16F627A Binary: The Word at the End of the Array
Most copies fail for interesting reasons. This one fails for a boring mechanical reason that is easy to fix once it is named: the information needed for the copy to work is not all inside the region the word copy suggests.
The device has a small program array, a data EEPROM, a configuration block, and an internal oscillator. The internal oscillator was trimmed at the factory, and the trim value was written into the device. It sits in the last program word, in the upper byte, sharing that word with configuration bits in the lower byte. Any procedure that reads the code and stops at the code loses it, and any procedure that writes configuration without preserving it overwrites it.
Why one word holds two things
The economy is obvious in hindsight. A fourteen-bit instruction word has room, the configuration bits do not occupy all of it, and the trim value needed eight bits. Putting the trim in the unused high byte of the configuration word cost nothing and required no additional memory.
The consequence is that the last word of the array is not code and not configuration but both, at different bit positions, with different lifecycles. Code is written once by the engineer. Configuration is written once by the engineer. The trim value is written once by the test fixture, after the engineer, and it belongs to that specific piece of silicon.
| Part of the word | Written by | Belongs to | Survives a plain config write |
|---|---|---|---|
| lower bits, configuration | firmware engineer | the design | replaced |
| upper byte, oscillator trim | factory test | this individual die | lost unless preserved |
That last column is where copies break. Writing a configuration block from a donor device into a fresh device is the natural thing to do when reproducing a product, and it carries the donor’s trim value with it. The fresh device then runs its internal oscillator trimmed for a different die, which on this family means a frequency error that is small enough to keep the board working and large enough to break every timing-dependent function on it.
What the error looks like on the bench
The internal oscillator on this part is the clock source for the core, and in many designs also for the timers, the serial port and any software delay loops. An error in its frequency is therefore not confined to one function.
Three symptoms show up in combination, and together they identify the cause.
- A serial link that works at one baud rate on the original and produces framing errors on the copy, because the divisor was computed for a frequency the copy does not produce.
- Timekeeping that drifts by a few percent, which is easy to dismiss as normal crystal tolerance until the original is compared side by side.
- A watchdog or brown-out interaction that behaves differently, because the watchdog period is derived from the same clock.
The tell is that the copy works. Nothing is dead, nothing resets, and every measurement is slightly off. That is the signature of a trim value from the wrong die, and it is the reason a copy job on this family should always report the trim byte separately.
Reading order that preserves the byte
The sequence matters because a read is not always the last operation performed on the device.
- Read the last program word on its own, before anything else, and record both bytes separately. This preserves the trim even if a later read of the array is truncated or a subsequent operation alters the device.
- Read the full program array. Note whether the last word is included by the tool’s default length; many programmers stop at the last implemented code address and skip it.
- Read the data EEPROM. On this family it is a couple of hundred bytes and holds the per-unit parameters.
- Decode the configuration byte from the last word, and keep the trim byte alongside it as a separate field rather than as part of the configuration.
Step one has an additional benefit: on a device whose array is protected, the last word is sometimes readable when the rest is not, because the protection scheme acts on the code region. That makes it a cheap early diagnostic.
Writing it back correctly
On the programming side there are two distinct operations and they must not be merged.
The first writes the program array. It includes the last word only if the tool is told to include it, and on a reproduction job the last word of the program array should carry the donor’s code but not the donor’s trim.
The second writes the configuration. Here the trim byte comes from the target device, not the donor. The correct value is whatever the target’s own last word held before the write — which is why reading it first, and keeping it outside the file being programmed, is the whole discipline.
Where a device has been fully erased, its trim value is gone, and there is no way to recover the value that belonged to that specific die. That is a genuine loss and it should be reported. On this family the practical answer is a calibration pass at the intended supply voltage and temperature, writing a measured value rather than an invented one. A value copied from another device is the one option that should never be chosen, because it is wrong in a way that is hard to detect later.
Trim is a curve, not a number
Worth knowing when the application cares: the oscillator’s frequency depends on supply voltage and temperature, and the single trim byte sets the operating point at the factory’s reference conditions. A design that runs at a different voltage, or over a wide temperature range, will see drift around that point regardless of how the trim was set.
A copy that reproduces the trim byte exactly therefore reproduces the original’s behaviour, including its drift. That is the right outcome for a repair, and it is worth saying so in the delivery, because a customer who replaces a unit and finds the same temperature-dependent timing error concludes that the copy was botched, when in fact it was faithful.
When the product does not use the internal oscillator
Not every design on this family runs from the internal clock. Where the board carries a crystal or a resonator, the calibration byte is irrelevant to operation and the whole question above collapses.
It still belongs in the delivery, for two reasons. The first is that it identifies the part’s provenance: a byte in a plausible range says the device was programmed by a fixture that wrote it, while an erased byte says the device has been through an erase that the factory never intended. The second is that a copy is not always made for the same board. A customer who later moves the design to a smaller board without the crystal will need the trim value, and by then the donor device may be gone.
So the rule is: preserve it whether or not it is used, and say plainly in the delivery which case applies. The cost is one line; the alternative is a conversation two years later about why a re-designed board runs slow.
The delivery
For this device the file set is small and the notes are what carry the value.
- the program image, with the last word’s two bytes reported separately
- the data EEPROM image
- the configuration byte decoded into named fields
- the trim byte as a standalone value, labelled as belonging to the donor die
- a statement of whether the target device’s own trim was preserved or lost
- the identifier and revision words
That fifth line is the one that prevents the most expensive mistake in this family. It tells the person programming the replacement whether they need a calibration step or can proceed directly.
The same principle — one location carrying two different kinds of information — appears on other parts in this era, and where the collision involves the protection bits themselves the consequences are covered in PIC16C73A program recovery. For the device where the internal oscillator is absent and the clock question disappears entirely, PIC16F87 code copying is the comparison. And for the eight-pin members of the same generation, where the trim byte occupies the same relative position with far less room around it, PIC12F615 software recovery follows the trail to the smallest case.
Attack IC PIC16C74B Binary: Reading a Charge Array, Not a Digital Array
Every discussion of reading a microcontroller image treats the result as a sequence of ones and zeros. On a modern flash part that is a fair approximation: the sense amplifier has a wide margin, the cell is refreshed by the read itself, and a read either succeeds or fails loudly. On a part of this generation the approximation breaks down, and understanding why is the difference between an image that can be trusted and one that merely looks complete.
This member of the C-series line stores its program in floating-gate cells programmed by hot-electron injection and erased by ultraviolet light through a quartz window. The stored value is a quantity of charge, and the sense amplifier compares the resulting threshold voltage against a reference. Stored charge leaks. References drift. What comes out of an old device is therefore a measurement with an error bar, not a byte.
The physical picture
| Property | Consequence for a read |
|---|---|
| data is stored as charge on a floating gate | a cell near the decision threshold can read either way |
| erase is by ultraviolet light, not electrically | an incompletely erased device is neither programmed nor blank |
| threshold shifts with temperature and with age | a device read warm may differ from the same device read cold |
| no error correction anywhere in the path | a single marginal cell is a wrong instruction word, silently |
The last row is the one that matters most. Flash parts of later generations carry checksums and sometimes redundancy so that a marginal cell is caught. This generation carries nothing. A misread word is returned as confidently as a correct one, and unless the image is validated structurally, the error survives into the delivery.
What a leaked cell looks like from outside
Three symptoms recur on devices of this age, and each has a different meaning.
The first is a single wrong instruction in an otherwise coherent disassembly. A word that should be a register operation appears as a different operation on a different register. The surrounding code is right, the control flow is intact, and the product may even run — badly, in one specific mode. This is the classic marginal cell, and it is the case where a second read at a different temperature or a different supply voltage is genuinely informative: if the word changes between reads, the cell is marginal rather than programmed.
The second is a block of words that read as all ones in the middle of the code. That is not a marginal cell. It is an incompletely programmed region, or a region that was erased and never rewritten, and it usually corresponds to a jump target that no longer contains anything.
The third is a gradual degradation across a run of addresses rather than a single point. That pattern appears on devices that were stored in conditions that allowed charge to redistribute, and it argues for reading the whole array more than once and taking a per-word majority rather than trusting a single pass.
Why a second pass is not redundant
On a part with no error correction, repetition is the only error detection available. Two reads of the same cell that agree are much more likely to be correct than one; a cell that disagrees with itself has announced its unreliability.
The practical procedure is to read the array at least twice, at ordinary supply voltage, and compare word by word. Words that agree are accepted. Words that disagree are read again at a modestly different supply voltage — the threshold comparison shifts with the reference, so a marginal cell often resolves consistently at a different operating point even though it is unstable at the nominal one. Where three reads still disagree, the word is reported as uncertain rather than guessed.
Reporting uncertainty is uncomfortable and it is correct. Filling a marginal word with the value that makes the disassembly look tidier produces a document that reads well and misleads.
The ultraviolet window changes the failure modes
Devices in this line came in two packages: one-time programmable in an opaque moulding, and erasable in a package with a quartz window. The windowed parts introduce a failure mode that does not exist on flash.
An erase is a timed exposure to short-wave ultraviolet light. Under-erase leaves cells partially discharged, so that a device which should be blank reads as a mixture of correct and incorrect values. Over-erase is not usually a problem on this technology, but a device erased and then left in room light for months accumulates enough charge redistribution that the erased pattern is no longer uniform.
That matters when the array is being read after an erase — for example when a previous owner attempted to clear the part before sending it for work. The image then contains real code, erased regions, and partially erased regions, and they are distinguishable only by their statistics, not by any marker in the data.
Structural validation instead of assumption
Because the data cannot validate itself, the validation has to come from the structure of the content. Four checks catch most bad reads.
- The reset vector at address zero must contain a valid jump into the code. A blank or nonsensical word there means the image is not a working program.
- The interrupt vector must also be a valid instruction, usually a jump, and it must land inside the implemented address range.
- Every call and goto target must point inside the range, and every page-crossing sequence must be consistent with the paging rules of the instruction set.
- The configuration word at the top of the map must decode to a combination the silicon accepts — an oscillator mode that exists, a watchdog setting that is meaningful.
An image that passes all four is very likely correct. An image that fails any of them has a specific defect at a specific address, which is far more useful than a checksum that merely says something is wrong.
When the array is protected
The code protection bit on this generation prevents the programming interface from returning the array. It does not prevent the device from executing. That asymmetry is what makes the visible-window packages interesting, because an optical route exists to the stored charge that does not go through the programming interface at all. That work belongs to the physical end of the discipline, and it is worth being clear that it is not a software technique with a nicer tool.
For the cases where protection is not set, the read path is ordinary and the work is entirely in the validation and interpretation described above. For a sibling in the same line where the emphasis is on the algorithm rather than the silicon, PIC16C73A program recovery covers the paging and addressing structure. The 18-pin member of the family with a smaller array is treated in PIC16C556A software recovery, and the same charge-storage reasoning applied to a larger C-series device appears in PIC16C74 code recovery.
What the customer should receive
For a charge-storage device the delivery has to carry its own confidence statement.
- the image, with the number of independent read passes stated
- a list of any words that remained unstable across passes, by address
- the supply voltage and temperature at which the accepted read was taken
- the structural checks performed and their results
- a note on the package type, because a windowed part has a different history than a moulded one
That third item reads oddly in a software-oriented delivery and belongs there anyway. On a device whose stored value is analogue, the conditions of the measurement are part of the result, and a customer who later reads the same device under different conditions and gets a different answer should be able to see why.
