PIC16F687-E/ML - 8-bit 20MHz 3.5KB Flash MCU | Microchip
MPN: PIC16F687-E/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.19 | $3.19 |
| 10 | $2.87 | $28.70 |
| 100 | $2.55 | $255.00 |
| 500 | $2.27 | $1,135.00 |
| 1,000 | $2.04 | $2,040.00 |
PIC16F687-E/ML Overview
An 8-bit flash microcontroller is a small single-chip computer built around an 8-bit data path with non-volatile Flash program memory that can be rewritten thousands of times. The PIC16F687 belongs to the broader hierarchy: microcontroller -> embedded MCU -> semiconductor -> integrated circuit. Within Microchip's portfolio, the PIC16 family sits between the baseline PIC10/12/16 and the high-performance PIC18/PIC24 families, optimized for cost-sensitive, low-power, moderate-performance applications. The 'nanoWatt' technology reference in its product page indicates use of Microchip's low-power process enhancements, including multiple sleep modes and dynamic oscillator switching.
Key features include 11 I/O pins supporting digital I/O, ADC input, comparator input, and PWM output; a 10-bit ADC with up to 12 channels; two analog comparators; one Enhanced Capture/Compare/PWM (ECCP) module and one Capture/Compare/PWM (CCP) module; an EUSART module for serial communication; and a 2.0V to 5.5V wide operating voltage range. The 20MHz internal oscillator eliminates the need for an external crystal in many designs. The 'E' suffix denotes the Extended temperature grade (-40C to +125C).
Architecturally, the device uses a Harvard-style separate code and data bus, 14-bit instruction width, 35 single-word instructions, and an 8-level deep hardware stack. The mid-range core executes one instruction per four clock cycles, yielding 200ns instruction time at 20MHz. The 4x4 mm QFN package with exposed pad provides a compact footprint and low thermal resistance suitable for dense PCB layouts.
Typical applications include low-cost sensor interfaces, small motor controls, LED lighting controllers, battery chargers, smoke detectors, remote controls, consumer appliances, and industrial control modules where 8-bit performance and small footprint outweigh raw MIPS. The PIC16F687 also supports in-circuit serial programming (ICSP) and in-circuit debugging via two I/O lines.
When designing with this part, allocate the RA0/RA1 pins for ICSP/ICD if in-field firmware updates are required. Decouple VDD with a 100nF ceramic capacitor placed within 3mm of the package, and tie the exposed thermal pad to GND for optimal thermal and electrical performance. Choose the 'I' (Industrial, -40C to +85C) variant if extended temperature is not needed to reduce unit cost.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet alone.
Drop-in alternatives for PIC16F687-E/ML — same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Variants in this series
Same-series models that are drop-in compatible with PIC16F687-E/ML (same form factor and footprint) — differing in Package, Operating Temperature, Timers, I/O Pins, ADC.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F677-E/ML
✅ Drop-In✓ In Stock
$0.73 / Unit
View Datasheet →PIC16F689-E/ML
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$2.15 / Unit
View Datasheet →PIC16F685-E/ML
✅ Drop-In ⚠️ 参数待验证📋 Reference alternative (not in catalog)
PIC16F684-E/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F685T-I/ML
✅ Drop-In✓ In Stock
$1.18 / Unit
View Datasheet →PIC16F684-I/ML
✅ Drop-In✓ In Stock
$1.02 / Unit
View Datasheet →PIC16F687-E/ML Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16 mid-range 8-bit RISC |
| Instruction Set Width | 14-bit |
| Program Memory (Flash) | 3.5 KB (2K x 14) |
| Data SRAM | 128 bytes |
| Data EEPROM | 256 bytes |
| CPU Speed | 20 MHz (5 MIPS) |
| Operating Voltage | 2.0 V to 5.5 V |
| I/O Pins | 11 |
| ADC | 10-bit, up to 12 channels |
| Analog Comparators | 2 |
| PWM Modules | 1 ECCP + 1 CCP |
| Serial Interface | EUSART (RS-232/RS-485 capable) |
| Timers | 2x 8-bit, 1x 16-bit |
| Package | 20-pin QFN (4x4 mm) with exposed pad |
| Temperature Grade (E suffix) | -40C to +125C (Extended) |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
PIC16F687-E/ML Pin Configuration
| Pin 1 | RA0/AN0/C1IN+/ICSPDAT/ULPWU — Bidirectional I/O / ADC input / comparator input / ICSP data / ultra-low-power wake-up |
| Pin 2 | RA1/AN1/C1IN-/VREF-/ICSPCLK — Bidirectional I/O / ADC input / comparator input / ADC Vref- / ICSP clock |
| Pin 3 | RA2/AN2/C2IN+/VREF+/CVREF — Bidirectional I/O / ADC input / comparator input / ADC Vref+ / comparator Vref output |
| Pin 4 | RA3/AN3/C1OUT — Bidirectional I/O / ADC input / comparator 1 output |
| Pin 5 | RA4/AN4/C2OUT/CCP1/OSC2/CLKOUT — Bidirectional I/O / ADC input / comparator 2 output / CCP1 output / oscillator output |
| Pin 6 | RA5/AN5/C2IN-/OSC1/CLKIN — Bidirectional I/O / ADC input / comparator input / oscillator input |
| Pin 7 | RC0/AN6/P1D/C2IN+ — Bidirectional I/O / ADC input / PWM output / comparator 2 input |
| Pin 8 | RC1/AN7/P1C/C2IN- — Bidirectional I/O / ADC input / PWM output / comparator 2 input |
| Pin 9 | RC2/AN8/P1B/C12IN3- — Bidirectional I/O / ADC input / PWM output / comparator 1/2 input |
| Pin 10 | RC3/AN9/P1C/C12IN2- — Bidirectional I/O / ADC input / PWM output / comparator 1/2 input |
| Pin 11 | RC4/C12OUT/TX/CK — Bidirectional I/O / comparator output / EUSART async TX or sync clock |
| Pin 12 | RC5/RX/DT — Bidirectional I/O / EUSART async RX or sync data |
| Pin 13 | RC6/AN10/P1A/TX/CK — Bidirectional I/O / ADC input / PWM output / EUSART TX/clock |
| Pin 14 | RC7/AN11/RX/DT — Bidirectional I/O / ADC input / EUSART RX/data |
| Pin 15 | VSS — Ground reference |
| Pin 16 | VDD — Positive power supply (2.0V to 5.5V) |
| Pin 17 | RA6/OSC2/CLKO — Bidirectional I/O / oscillator output / clock output |
| Pin 18 | RA7/OSC1/CLKI — Bidirectional I/O / oscillator input / clock input |
| Pin 19 | RB4/AN10/CCP1/P1D — Bidirectional I/O / ADC input / CCP1 / PWM output |
| Pin 20 | RB5/AN11/P1C — Bidirectional I/O / ADC input / PWM output |
Typical Applications
PIC16F687-E/ML is suitable for 6 applications: Low-Cost Sensor Interface Module, LED Lighting Controller, Battery Charger / Power Bank, Small Brushless DC Motor Control, Smoke / CO Detector Logic Board, Consumer Remote Control / IR Transmitter.
Low-Cost Sensor Interface Module
The PIC16F687-E/ML suits low-cost sensor interfaces because its 10-bit ADC with up to 12 channels and two analog comparators digitize analog sensor signals directly without external signal conditioning, while the 20MHz CPU executes averaging and threshold algorithms at 5 MIPS, well above typical 8-bit MCU application needs. Its 2.0V-5.5V range allows direct connection to 3.3V or 5V sensor boards. The 20-pin QFN (4x4 mm) keeps the sensor PCB small.
Recommended
LED Lighting Controller
The PIC16F687-E/ML is well-suited for LED lighting controllers due to its 1 ECCP + 1 CCP module that generates PWM dimming signals for multi-channel LED strings, its 2.0V-5.5V operation matching common LED driver rails, and the 4x4 mm QFN package that fits inside compact bulb or strip housings. The EUSART supports DMX or wireless module links for tunable-white or RGBW fixtures, and the 256-byte EEPROM stores calibration and trim values across power cycles.
Recommended
Battery Charger / Power Bank
The PIC16F687-E/ML fits battery charger and power bank designs because its two analog comparators implement precise over-voltage and over-current protection without external op-amps, while the 10-bit ADC monitors battery voltage and charge current in real time. The 2.0V minimum VDD operation allows direct connection to single-cell Li-Ion cells through a regulator, and the nanoWatt sleep modes minimize quiescent current during standby, extending shelf life.
Recommended
Small Brushless DC Motor Control
For small brushless DC motor control, the PIC16F687-E/ML delivers PWM commutation signals from its ECCP module with complementary outputs and dead-band control, while the 20 MHz CPU runs sensorless back-EMF zero-cross detection algorithms in real time. The QFN-20 4x4 mm footprint suits small fan or pump driver PCBs. The -40C to +125C extended temperature range (E suffix) supports under-hood or industrial motor enclosures.
Recommended
Smoke / CO Detector Logic Board
The PIC16F687-E/ML serves smoke and CO detector logic boards because its nanoWatt sleep modes draw microamps during idle, extending 10-year battery life. Its two comparators monitor the photoelectric or electrochemical sensor signal, the 10-bit ADC performs periodic measurement, and the ECCP drives the piezo alarm sounder. The 256-byte EEPROM retains calibration constants, while the 20-pin QFN keeps the BOM small and the PCB compact for ceiling-fixture mounting.
Recommended
Consumer Remote Control / IR Transmitter
The PIC16F687-E/ML is ideal for IR remote controls because its ECCP module generates accurate 38 kHz carrier PWM for NEC / RC5 / SIRC protocols, the 20 MHz core handles button-scanning debounce and protocol framing, and the nanoWatt sleep mode extends coin-cell life to multi-year durations. The 20-pin QFN (4x4 mm) easily fits behind keypads in slim remote enclosures. The 128-byte SRAM is sufficient for protocol buffers.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F687-E/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F677-E/ML | PIC16F689-E/ML | PIC16F685-E/ML |
|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 20-pin QFN (4x4 mm) | 20-pin QFN (4x4 mm) - same | 20-pin QFN (4x4 mm) - same | 20-pin QFN (4x4 mm) - same |
| Program Memory (Flash) | 3.5 KB (2K x 14) | 3.5 KB (2K x 14) | 7 KB (4K x 14) | 7 KB (4K x 14) |
| Data SRAM | 128 bytes | 128 bytes | 256 bytes | 256 bytes |
| Data EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes |
| Max CPU Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating Voltage | 2.0V to 5.5V | 2.0V to 5.5V | 2.0V to 5.5V | 2.0V to 5.5V |
| I/O Pins | 11 | 11 | 11 | 11 |
| Temperature Grade | Extended -40C to +125C | Extended -40C to +125C | Extended -40C to +125C | Extended -40C to +125C |
Key Differentiators
- Industry-standard mid-range x14 core (vs PIC16F684-E/ML)
- On-chip EUSART module eliminates external UART ICs (vs PIC16F677-E/ML)
- Compact 4x4 mm QFN with exposed pad (vs PIC16F687-I/SO (SOIC-20))
- Extended -40C to +125C temperature grade (vs PIC16F687-I/ML (Industrial grade))
Design Notes
Place a single 100nF ceramic decoupling capacitor between VDD (pin 16) and VSS (pin 15) within 3mm of the package. For noisy analog designs, add a 10uF bulk capacitor near the regulator and a small ferrite bead in series with VDD. The exposed thermal pad (EP) on the QFN package must be soldered to a GND copper pour of at least 4x4 thermal vias to ground for proper thermal dissipation and electrical performance.
Reserve RA0 and RA1 for ICSPDAT and ICSPCLK if in-circuit serial programming or debugging is required in production. These pins cannot be repurposed as general I/O without losing in-field firmware update capability. According to Microchip programming specifications, these pins are required during the reset sequence for ICSP. If using as general I/O, you must provide a programming header and disconnect external loads during ICSP.
Route the oscillator pins RA6/OSC2 and RA7/OSC1 as short and symmetric as possible if using an external crystal. Keep crystal traces away from switching signals and surround them with a ground guard ring. For internal oscillator operation (default), RA6 and RA7 become general-purpose I/O but remain shared with the oscillator circuit, so disable the oscillator bits in configuration before driving RA6/RA7 as outputs.
Estimated: At VDD=5V, 20MHz CPU active, and typical I/O drive of 20mA total, the PIC16F687-E/ML draws approximately 8-11 mA. In sleep mode with WDT disabled, this drops to less than 1 uA. For battery-powered designs, use the nanoWatt sleep modes aggressively - sleep between ADC conversions and wake from the ADC interrupt to maximize battery life.
Compliance Information
RoHS compliant per Microchip product page. PIC16F687 is not AEC-Q100 qualified - automotive designs should use the PIC16F687-E/ML with external qualification testing or select AEC-Q100-qualified parts from the PIC16F1xx family. Lead-free and halogen-free status should be confirmed with the latest manufacturer declaration.