Microchip PIC16F687 Microcontroller: Architecture, Features, and Application Design
The Microchip PIC16F687 stands as a prominent member of the mid-range PIC® microcontroller family, renowned for its robust architecture, rich peripheral integration, and cost-effectiveness. This 8-bit CMOS FLASH-based device is engineered to deliver high performance for a vast array of embedded control applications, from consumer electronics to industrial automation.
Architecture Overview
At its core, the PIC16F687 employs a Harvard architecture, which features separate buses for instructions and data. This design allows for concurrent access to program and data memory, significantly enhancing throughput. The core operates at a maximum frequency of 20 MHz, executing most instructions in a single clock cycle (200 ns), which provides a substantial computational speed of up to 5 MIPS.
The device is equipped with 2K words of FLASH program memory, 128 bytes of RAM, and 256 bytes of EEPROM data memory. This memory configuration offers ample space for moderately complex program code, variable storage, and the retention of critical data even during power cycles.
Key Features and Peripherals
The PIC16F687 is packed with integrated peripherals that minimize external component count and reduce total system cost.
Analog Capabilities: It includes a 10-bit Analog-to-Digital Converter (ADC) with up to 12 input channels, enabling precise measurement of analog signals from sensors. Furthermore, it features an analog comparator module with a programmable voltage reference, ideal for threshold detection.

Timing and Control: Two versatile timers (Timer0 and Timer1) and one 8-bit timer with an 8-bit prescaler (Timer2) provide flexible timing and counting operations. The Enhanced Capture, Compare, PWM (ECCP) module is a standout feature, offering multiple modes for motor control, power conversion, and waveform generation.
Communication Interfaces: While it lacks hardware UART, it supports serial communication via the MSSP (Master Synchronous Serial Port) module, which can be configured for both SPI and I²C protocols, facilitating communication with a plethora of peripheral chips like memories, sensors, and RTCs.
Robustness and Efficiency: The microcontroller incorporates a Watchdog Timer (WDT) and a Brown-Out Detect (BOD) circuit for enhanced reliability. Its nanoWatt Technology ensures extremely low power consumption, making it perfectly suited for battery-operated portable applications.
Application Design Considerations
Designing with the PIC16F687 involves leveraging its integrated features to create compact and efficient systems. For instance, in a smart temperature controller, the internal ADC can directly read a thermistor value, the comparator can monitor for over-temperature conditions, and the ECCP module can drive a fan motor using PWM. The internal EEPROM can store user-set temperature thresholds.
Developers must carefully manage the limited RAM resources and utilize the deep sleep modes with interrupt wake-up to optimize power consumption. The microcontroller's high current sink/source capability (25 mA per I/O pin) allows it to drive LEDs and other small loads directly, further simplifying the board design.
ICGOOODFIND
The PIC16F687 proves to be an exceptionally versatile and powerful 8-bit microcontroller. Its optimal blend of processing power, a rich set of integrated peripherals (including ADC, ECCP, and comparator), and low-power operation makes it an ideal choice for designers tackling a wide spectrum of embedded projects, from simple control tasks to more complex analog interface applications, all while maintaining a focus on cost efficiency and design simplicity.
Keywords: PIC16F687, Harvard Architecture, ECCP Module, NanoWatt Technology, 10-bit ADC
