Unlock Microchip IC PIC16F687 Firmware

Two thousand and forty-eight words of flash, 128 bytes of RAM, 256 bytes of data EEPROM, eighteen I/O pins, twelve channels of 10-bit A/D, two comparators, a synchronous serial port and an asynchronous one. The PIC16F687 is the communications member of Microchip’s 20-pin nanoWatt family: an EUSART on one side, an I2C or SPI link on the other, and enough analogue inputs to watch a whole panel in between.

Unlock Microchip IC PIC16F687 program memory and the flash hex from microcontroller PIC16F687 can be read, then recover the software to new PIC16F687 mcu for cloning
Unlock Microchip IC PIC16F687 program memory and the flash hex from microcontroller PIC16F687 can be read, then recover the software to new PIC16F687 mcu for cloning

The two-wire-plus-two-wire design

Boards built on this part usually have a hierarchical job. The EUSART talks to a host or a field bus — RS-485 half-duplex nodes are the classic case, with auto-baud detect saving the installer from setting a rate. The SSP talks to local devices: a sensor, an EEPROM, a small display driver. Twelve A/D channels cover everything that is not digital. And 2K of flash has to hold all of it, which is where the design pressure lands.

That is the shape of the boards you will find this chip on: DIN-rail I/O modules, meters with a serial port, door and access controllers, battery monitors reporting upward. They are infrastructural, they were installed in quantity, and the drawings are usually gone.

A correction worth making

The page this replaces contradicted itself on memory size, stating 2K in one paragraph and 4K in the next. The 687 is 2,048 words. The 4K members of this family are the PIC16F685 and the PIC16F689. Since the memory ceiling decides whether code was written tight or comfortably, this is not a pedantic distinction: a 2K image is dense, and dense images punish a misread cell more readily.

Firmware in the field is often not the firmware on the drawing

Anything with a serial port gets updated. A node that was programmed at the factory in 2009 may have received a patch over the bus three years later, and no archive anywhere contains that build. When a recovered image shows a block that does not fit the style of the rest — a gap, a routine in a different idiom — that is usually what it is, not corruption. It is also the argument for capturing an image while the board still communicates.

There is a second reason the drawing cannot be trusted. Boards like these were often built to a customer specification, then revised quietly: a threshold changed, a response time shortened, a message added. The firmware was reflashed and the paperwork was not. What is in the chip is the only version that ever actually ran.

Why the route is physical

Code protection is a bit in the configuration word, enforced by the logic around the array. Any tool on the ICSP pins reads zeros or nothing; no sequence running on the CPU changes that. The route is to open the package and probe the cells — IC decapsulation — then reassemble and verify as described under firmware extraction.

The work, step by step

  1. Record the part. Marking, package (20-pin PDIP, SOIC or SSOP) and date code. The 687, 685 and 677 share a footprint; only the marking separates them.
  2. Open the package in controlled stages, stopped above the passivation.
  3. Read the cells twice from two positions where the geometry allows.
  4. Read the EEPROM separately — 256 bytes, usually node address, calibration and counters.
  5. Reassemble and verify vectors, bank handling, instruction density and the configuration word as found.

What you receive

Intel HEX and raw binary, the EEPROM as its own file, a memory map, and a report covering the die marking, revision and any uncertain region. If the board needs to be rebuilt rather than archived, that is IC cloning; if the host protocol has to be understood, that starts from the same image under chip reverse engineering. The PIC16F677 is the 2K sibling without the UART.

Authorization

We work on hardware the customer owns or is authorised to repair, under a non-disclosed agreement. If you are unsure whether your situation qualifies, describe it and we will tell you plainly.