Break IC PIC16F877A Heximal
When a PIC16F877A is locked and every electrical route to its program has been exhausted, the remaining option is physical: remove the package and look at the silicon itself. That process — decapsulation — is one of the most misunderstood steps in IC analysis, often imagined as destructive brute force when in reality it is a controlled, precision procedure. This article explains what decapsulation is, how it is performed, and what it makes possible.
The part in context
The PIC16F877A is one of Microchip’s classic 8-bit PIC microcontrollers: 14 KB of flash program memory, 368 bytes of RAM, and 256 bytes of EEPROM, in a 40-pin package. Its code protection is implemented through configuration bits that block read-out over the ICSP interface. For the great majority of devices, that electrical barrier is the only obstacle — and for the great majority of devices, electrical techniques are enough.
Decapsulation enters the picture only when they are not. Adjacent PIC parts follow the same protection philosophy — see PIC18F45K22 protection and PIC18F4515 firmware for comparison.
What decapsulation is
An integrated circuit is a silicon die bonded to a lead frame and sealed inside an epoxy or ceramic package. Decapsulation is the controlled removal of that package material to expose the die, without destroying the die itself. The distinction matters: decapsulation is not the same as destroying the chip. A carefully decapsulated part still has an intact silicon surface, intact bond wires (in most techniques), and readable circuitry.
Only after the die is exposed can techniques like microprobing, optical inspection, or focused ion beam work be applied. In that sense decapsulation is an enabling step, not an end in itself.
How it is done
There are two broad families of technique, and the choice depends on package type and what needs to remain intact.
Chemical decapsulation. The package is etched away using a heated acid — typically fuming nitric acid or a mixture — applied to a small opening milled above the die. The acid dissolves the epoxy while leaving the silicon and most metals largely untouched, though it will attack aluminium bond pads if not carefully controlled. This is the workhorse method for plastic packages.
Mechanical and plasma methods. Laser decapsulation uses a focused laser to ablate the package material precisely over the die, which is cleaner for small areas and avoids acid handling. Plasma etching offers very fine control for specific regions. Both are slower and more equipment-intensive than acid but can be gentler on the die surface.
In practice, a lab chooses based on the package, the die size, and what the subsequent analysis needs. For a PIC16F877A in a standard PDIP or TQFP package, chemical decapsulation is the usual route.

What you actually see
Once the package is opened, the die reveals its structure: the memory array as a regular grid of cells, the peripheral logic, and the bond pads connecting to the lead frame. For firmware recovery the target is the flash array, and reading it means either probing the array’s sense amplifiers or using optical techniques that exploit how programmed versus erased cells respond to light.
This is where decapsulation stops being the hard part and microprobing begins — positioning probes at micrometer scale on a live die is the demanding, equipment-heavy step that determines whether the effort succeeds.
Why engineers reach this point
Decapsulation is a last resort because it is expensive, slow, and typically destroys the original device. The reasons engineers accept that cost are consistent: a legacy production line where the only surviving firmware is inside a locked chip, a failure analysis where electrical behaviour cannot be explained from the outside, or a recovery effort where every non-invasive method has already been attempted. In each case the purpose is to recover or understand the customer’s own design.
Risks and considerations
- The original part is usually lost. Even successful decapsulation generally means the device cannot be returned to service. A replacement must be programmed with the recovered image.
- Bond-wire damage is common. The wires connecting die to package are fragile and easily disturbed; a botched decapsulation can destroy the very access needed.
- Technique must match the package. Acid that works on a plastic PDIP is the wrong tool for a ceramic or flip-chip part.
- Recovery is not guaranteed. Exposing the die does not guarantee readable memory; encryption, physical shielding, or damaged cells can still block the result.
FAQ
Does decapsulation destroy the chip? The package is destroyed, and the device is normally not reusable, but the die itself can remain intact and readable. It is a destructive step for the part, not necessarily for the data.
Can it be done without acid? Yes. Laser and plasma decapsulation exist and are preferred where acid would damage the die or where only a small window is needed.
Is decapsulation enough on its own to read the firmware? No. It exposes the die; reading the memory still requires microprobing or optical analysis, which is a separate and often more demanding skill.
Conclusion
Decapsulation is the controlled removal of packaging to expose silicon — a precise enabling step rather than an act of destruction. On a PIC16F877A it is the doorway to reading a die that electrical methods cannot reach, and understanding what the process does, and does not, accomplish is essential before committing a device to it.