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.

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.
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.
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.
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.
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.
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.