PIC Microcontroller Unlock: Recovering Firmware Across Microchip Families
PIC microcontroller unlock is the process of reading protected firmware from Microchip PIC devices whose code-protection (CP) fuses have been set. Our engineers recover hex files from PIC10, PIC12, PIC16, PIC18, PIC24, dsPIC, and PIC32 parts for clients who own the IP but have lost the original source — legacy equipment maintenance, prototype recovery, and second-source qualification are the most common scenarios. Authorization and proof of ownership are required for every job.
How Does PIC Code Protection Actually Work?

Microchip implements code protection through configuration fuses burned into the device during programming. When the CP bit (or CPB, CPD bits on newer parts) is cleared to 0, the device blocks external read access through the ICSP or JTAG interface. The exact mechanism varies by architecture:
- PIC10/PIC12/PIC16 (baseline and mid-range): A single CP bit in the configuration word. When set, bulk-erase is still allowed, but reading returns all zeros or all ones.
- PIC16F1xxx (enhanced mid-range): Two separate CP bits — one for program memory, one for data EEPROM (CPD). Some parts add write protection (WRT) bits segmenting flash into independently lockable regions.
- PIC18F/PIC18FxxKxx: Multiple CPn bits protecting individual code blocks (typically 4–12 blocks of 8 KB each), plus CPB for the boot block and CPD for data EEPROM. The CONFIG registers span 14 bytes.
- PIC24/dsPIC33: General Segment (GS) and Secure Segment code-protection bits in the FGS and FSS configuration registers. These parts also support Code Guard Security with multiple protection levels.
- PIC32 (MIPS-based): CP bit in DEVCFG0, plus boot flash protection. Some PIC32MZ parts add a crypto engine and secure key storage.
Understanding which fuse set your specific part number uses is the first step. A PIC16F877A has a single CP bit — relatively straightforward to assess. A PIC32MZ2048EFH with Code Guard is an entirely different challenge.
PIC Microcontroller Unlock Feasibility by Family
Not every PIC can be unlocked. Success depends on the silicon revision, the protection scheme, and whether the part has been tampered with. Below is a realistic feasibility summary our lab maintains based on several thousand completed jobs.
| Family | Example Parts | Protection Type | Typical Feasibility | Turnaround |
|---|---|---|---|---|
| PIC10F | PIC10F200, PIC10F322 | Single CP bit | High (most revisions) | 3–5 working days |
| PIC12F | PIC12F675, PIC12F1840 | CP + CPD | High | 3–5 working days |
| PIC16F (mid-range) | PIC16F877A, PIC16F628A | Single CP bit | High | 3–5 working days |
| PIC16F1xxx (enhanced) | PIC16F1939, PIC16F18346 | CP + CPD + WRT | Moderate–High | 5–8 working days |
| PIC18F | PIC18F4550, PIC18F26K22 | Block-level CPn + CPB + CPD | Moderate | 5–10 working days |
| PIC18FxxK42/Q43 | PIC18F47K42 | Enhanced block protection | Case-by-case | 7–15 working days |
| PIC24F/PIC24H | PIC24FJ128GA010 | GS/FSS code guard | Moderate | 7–12 working days |
| dsPIC33 | dsPIC33FJ256GP710 | Code Guard Security | Low–Moderate | 10–20 working days |
| PIC32MX | PIC32MX795F512L | CP in DEVCFG0 | Moderate | 10–15 working days |
| PIC32MZ | PIC32MZ2048EFH | CP + crypto engine | Low | Requires evaluation |
“High” feasibility means we succeed on the majority of samples with known techniques. “Moderate” means the outcome depends on the specific silicon revision and programming history. “Low” means we need a sample for bench evaluation before committing.
What Techniques Are Used for PIC Firmware Recovery?
We do not publicly document every technique — that would undermine the protection schemes for legitimate users. In general terms, the approaches fall into several categories:
Non-Invasive Methods
These exploit timing, voltage, or protocol-level behaviors without decapping the IC. Glitch attacks on the supply rail during the read-protect verification window, or exploiting undocumented debug commands on older silicon revisions, are examples. Non-invasive methods preserve the original device and are preferred when the part must be returned functional.
Semi-Invasive Methods
UV exposure on windowed (JW-suffix) parts can sometimes reset fuse bits without erasing program flash — but this only applies to EPROM-based legacy PICs like the PIC16C74. Modern flash-based PICs are not susceptible to this approach.
Invasive / Microprobing
Decapping the die and using FIB (Focused Ion Beam) or microprobing stations to directly access the memory bus. This is the method of last resort — it is expensive (typically $2,000–$8,000+ depending on the die geometry), destructive to the sample, and requires a second known-good device for verification. We reserve this for high-value recovery jobs on newer PIC32MZ or Code Guard-protected dsPIC parts where non-invasive methods have failed.
The Authorized Recovery Process
Every PIC microcontroller unlock project at our lab follows a strict workflow designed to protect both parties:
- Feasibility request: You submit the exact part number (including revision code on the package), quantity, and a brief description of why recovery is needed.
- Ownership verification: We require documentation — purchase records, design files, an NDA, or a declaration of IP ownership. This step is non-negotiable. For more detail, see our authorization and NDA policy.
- Sample shipment: You send 1–3 programmed devices. We recommend at least two in case one is consumed during invasive analysis.
- Bench evaluation: Our engineers identify the exact silicon revision, test non-invasive approaches first, and report back with a success/fail assessment and a firm quote.
- Firmware delivery: On success, we deliver the .hex or .bin file with a readout verification report showing CRC/checksum against a second sample.
Turnaround for standard PIC12/PIC16 parts is typically 3–5 working days after sample receipt. PIC18 and 16-bit parts run 5–15 days. PIC32 evaluations can take 2–3 weeks.
Common PIC Unlock Scenarios We Handle

Legacy Industrial Controller Recovery
A packaging-line controller built around a PIC16F877A programmed in 2006. The original engineer left the company, and the .hex file was stored on a dead laptop. The board still runs, but the client needs the firmware to program replacement chips for a second production line. Single CP bit, high success rate, 3-day turnaround.
Automotive Aftermarket ECU Calibration
A PIC18F4685 in a throttle-body controller where the calibration data resides in data EEPROM. The CPD bit is set. The client owns the ECU design and needs to read the calibration table to port it to a newer PIC18FxxK83 platform. Block-level protection, moderate complexity, completed in 7 working days.
IoT Prototype Firmware Rescue
A startup prototyped on PIC24FJ64GB002 with Code Guard enabled during a test programming run. The source was in a Git branch that was accidentally force-pushed. Two samples shipped, firmware recovered from the General Segment in 9 working days.
PIC vs. Other MCU Families: Protection Comparison
Engineers sometimes ask how PIC protection compares to other vendors. Here is a brief comparison to set expectations:
| Vendor / Family | Protection Mechanism | Relative Difficulty |
|---|---|---|
| Microchip PIC12/16 (mid-range) | Single CP fuse | Low |
| Microchip PIC18 | Block-level CP + boot block | Low–Medium |
| Microchip dsPIC / PIC24 | Code Guard Security | Medium–High |
| STM8L (ST) | ROP level 1/2 | Medium — see our STM8L protection-level breakdown |
| Renesas R5F | ID code + OCD lock | Medium — details in our R5F unlock feasibility guide |
| Nordic nRF52832 | APPROTECT (access port protection) | Medium–High — covered in our nRF52832 unlock overview |
| Cypress CY8C (PSoC) | Flash protection + chip-level lock | High — see our CY8C recovery assessment |
PIC’s older 8-bit families remain among the more accessible architectures for authorized firmware recovery. As you move into the 32-bit PIC32MZ space or Code Guard-protected dsPIC33, the difficulty approaches that of ARM Cortex-M parts with TrustZone.
What Can Go Wrong — Honest Failure Modes
We do not guarantee 100% success. Here are the real failure scenarios:
- Newer silicon revisions patch known exploits. A technique that works on PIC18F4550 rev A3 may fail on rev B5. We always check the die markings first.
- Corrupted flash. If the device has been subjected to over-voltage, ESD damage, or excessive erase/write cycles (PIC flash is rated for 10,000–100,000 cycles depending on family), the data may be partially or fully corrupted — unlocking the protection does not fix corrupted cells.
- Decapping damage. Acid exposure during invasive decap can destroy bond wires or damage the die surface. We mitigate this with controlled fuming nitric acid processes and laser decap on critical parts, but risk is non-zero.
- Anti-tamper in PIC32MZ. Some PIC32MZ variants have active tamper-detection that triggers a flash erase. If the device has been previously tampered with, the firmware may already be gone.
We provide a free feasibility assessment before you commit. If we determine the job is unlikely to succeed, we tell you upfront and do not charge.
Pricing Signals for PIC Microcontroller Unlock
Exact pricing depends on the part and method, but here are the ranges our clients typically see:
- PIC10/12/16 (single CP): $150–$500 per unique firmware.
- PIC18 (block-level CP): $300–$1,200.
- PIC24/dsPIC (Code Guard): $800–$3,000.
- PIC32MX/MZ (invasive required): $2,000–$8,000+, quoted after evaluation.
Volume discounts apply when multiple identical parts need the same firmware verified across a production batch. Rush service (48-hour turnaround on PIC12/16) is available at 1.5× standard pricing.
Check feasibility for your project
Send the chip marking or board details and tell us what you need to recover. Add clear photos if available.
Request a feasibility reviewCan you unlock a PIC microcontroller without destroying it?
For most PIC12, PIC16, and many PIC18 devices, yes. Non-invasive techniques preserve the original chip in working condition. However, PIC32 parts and some newer PIC18FxxK42 revisions may require invasive decapping, which consumes the sample. We always attempt non-invasive methods first and will inform you before proceeding to destructive analysis.
Is PIC microcontroller unlock legal?
Firmware recovery is legal when performed on devices you own or have documented authorization to access. Common lawful scenarios include recovering your own lost source code, maintaining legacy equipment you purchased, or porting firmware to a replacement platform. We require proof of ownership or a signed authorization letter before starting any project. Unauthorized extraction of third-party IP is something we do not perform.
How do I know which PIC protection level my device uses?
Read the configuration word using a PICkit or ICD programmer — even on a protected device, the configuration bits (including CP, CPD, CPB, WRT) are readable. Cross-reference with the datasheet’s “Configuration Bits” section. If you are unsure, send us the full part number including any revision markings on the package, and we will identify the protection scheme for free during feasibility review.
What file format will I receive after PIC firmware extraction?
We deliver the firmware as an Intel HEX (.hex) file by default — the standard format for Microchip MPLAB IPE and third-party programmers. We can also provide raw binary (.bin) or Motorola S-record (.srec) on request. The delivery includes a verification report with CRC32 checksums and, when possible, a comparison against a second sample readout.
Do you also recover the EEPROM data from a protected PIC?
Yes, when the CPD (data EEPROM code-protect) bit is set, we extract both the program flash and the data EEPROM contents. On PIC18F parts with separate CPn and CPD bits, it is possible that only one section is protected — we will read whichever sections are accessible and attempt recovery on the protected ones. EEPROM data is delivered as a separate .hex segment or standalone file.
Working on a board like this?
Send the chip marking or two photos. You get feasibility, lead time and price within 24 hours, and the check costs nothing.
Get a free quote