PIC16F87-E/ML - 8-bit MCU, 20MHz, 7KB Flash 28-QFN | Microchip
MPN: PIC16F87-E/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $6.1 | $6.10 |
| 10 | $5.49 | $54.90 |
| 100 | $4.88 | $488.00 |
| 500 | $4.39 | $2,195.00 |
| 1,000 | $3.92 | $3,920.00 |
| 3,000 | $3.5 | $10,500.00 |
PIC16F87-E/ML Overview
A microcontroller (MCU) is a single-chip computer containing a CPU, program and data memory, and programmable I/O peripherals. PIC16F87 sits in the mid-range 8-bit PIC16 family — a one-tier-up taxonomy step from baseline PIC10/PIC12/PIC16 devices to PIC18 and PIC32 32-bit devices, all broadly classified as microcontrollers → embedded processors → semiconductors. The 16F family is the original RISC-based Flash MCU family from Microchip and remains one of the largest 8-bit install bases in automotive, appliance and industrial control designs.
Key features include a programmable 8 MHz internal oscillator that allows operation without an external crystal, an integrated Addressable USART for asynchronous serial communication, two analog comparators, one Capture/Compare/PWM (CCP) module, nanoWatt power-managed sleep modes, and on-chip In-Circuit Serial Programming (ICSP) plus In-Circuit Debug (ICD). The 16 I/O pins are 5 V-tolerant and the analog comparator pair supports basic signal conditioning for sensor interface applications.
Internally, PIC16F87-E/ML uses a Harvard-architecture CPU with separate program and data buses, a 14-bit-wide instruction word (typical of mid-range PIC16 devices), and a hardware stack. Five I/O ports (Port A–E with PORTE limited by 28-pin pin-out) route digital and analog signals. The CCP and USART peripherals share timers and I/O, so system architects must plan allocation at firmware design time.
Typical applications include automotive body modules, white goods and appliance control boards, industrial sensor interfaces, general-purpose sensor hubs, and battery-powered consumer devices that require low standby current from the nanoWatt sleep modes. The 'E' temperature grade and QFN package make it a strong fit for compact automotive electronic control units (ECUs) where PCB area is constrained and ambient temperatures under-hood or in-cabin are demanding.
When using PIC16F87-E/ML, place decoupling capacitors (100 nF plus 1–10 µF bulk) directly at VDD/VSS pins and keep the MCLR reset trace short to avoid spurious resets. Designers should also reserve the ICSP/ICD pins (RB6/RB7) for in-circuit programming and not commit them to other peripherals.
This page synthesizes distributor pricing, drop-in alternatives, AEC-Q100 compliance notes and practical design guidance that go well beyond the manufacturer datasheet. Information current as of 2026-09-22.
Drop-in alternatives for PIC16F87-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 PIC16F87-E/ML (same form factor and footprint) — differing in Package, Internal Oscillator, ADC, Comparators, Core.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F87-I/ML
✅ Drop-In✓ In Stock
$3.12 / Unit
View Datasheet →PIC16F86-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F87T-E/ML
✅ Drop-In✓ In Stock
$4.2 / Unit
View Datasheet →PIC16F871-E/PT
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F876A-E/ML
✅ Drop-In✓ In Stock
$4.85 / Unit
View Datasheet →PIC16F87-E/ML Maximum Ratings & Electrical Characteristics
| Core | 8-bit PIC16 RISC |
| Instruction Set Width | 14-bit |
| Instruction Count | 35 single-word instructions |
| Instruction Execution Time | 200 ns (at 20 MHz) |
| Maximum Clock Speed | 20 MHz |
| Internal Oscillator | 8 MHz (factory calibrated, software-selectable) |
| Program Memory (Flash) | 7 KB (4K x 14) |
| Data EEPROM | 256 bytes |
| Data SRAM | 368 bytes |
| I/O Pins | 16 |
| Supply Voltage | 4.0 V to 5.5 V |
| Operating Temperature | -40 °C to +125 °C (automotive 'E' grade) |
| Package | 28-QFN, 6 x 6 mm (HVQCCN, 'ML' suffix) |
| Mounting Type | Surface Mount (no-lead QFN) |
| Communication Peripherals | Addressable USART, I²C/SPI (SSP) |
| Analog Peripherals | 2 Comparators |
| Timers/CCP | 1 CCP module, 3 timers (TMR0, TMR1, TMR2) |
| Programming/Debug | ICSP + ICD (2-wire) |
| Power-Saving Modes | nanoWatt (Sleep, Idle, etc.) |
| RoHS Status | Compliant |
PIC16F87-E/ML Pin Configuration
| Pin 1 | RA2/AN2/VREF- — Port A bit 2 / analog channel 2 / negative voltage reference |
| Pin 2 | RA3/AN3/VREF+ — Port A bit 3 / analog channel 3 / positive voltage reference |
| Pin 3 | RA4/T0CKI — Port A bit 4 / Timer0 external clock input |
| Pin 4 | RA5/SS/AN4 — Port A bit 5 / SPI slave select / analog channel 4 |
| Pin 5 | VSS — Ground reference |
| Pin 6 | OSC1/CLKIN — External clock input / crystal pin 1 |
| Pin 7 | OSC2/CLKOUT — Crystal pin 2 / clock output |
| Pin 8 | RC0/T1OSO/T1CKI — Port C bit 0 / Timer1 oscillator output / clock input |
| Pin 9 | RC1/T1OSI — Port C bit 1 / Timer1 oscillator input |
| Pin 10 | RC2/CCP1 — Port C bit 2 / Capture-Compare-PWM 1 output |
| Pin 11 | RC3/SCK/SCL — Port C bit 3 / SPI clock / I²C clock |
| Pin 12 | RC4/SDI/SDA — Port C bit 4 / SPI data in / I²C data |
| Pin 13 | RC5/SDO — Port C bit 5 / SPI data out |
| Pin 14 | RC6/TX/CK — Port C bit 6 / USART transmit / clock |
| Pin 15 | RC7/RX/DT — Port C bit 7 / USART receive / data |
| Pin 16 | VSS — Ground reference (second bond on QFN package) |
| Pin 17 | VDD — Positive supply voltage |
| Pin 18 | RB0/INT — Port B bit 0 / external interrupt |
| Pin 19 | RB1 — Port B bit 1 |
| Pin 20 | RB2 — Port B bit 2 |
| Pin 21 | RB3/PGM — Port B bit 3 / LVP programming pin |
| Pin 22 | RB4 — Port B bit 4 |
| Pin 23 | RB5 — Port B bit 5 |
| Pin 24 | RB6/PGC — Port B bit 6 / ICSP clock (programming) |
| Pin 25 | RB7/PGD — Port B bit 7 / ICSP data (programming) |
| Pin 26 | MCLR/Vpp/RE3 — Master clear reset / programming voltage / Port E bit 3 (Note: on 28-pin QFN this pin serves as MCLR/Vpp and is shared with PORTE) |
| Pin 27 | RA6/AN6 — Port A bit 6 / analog channel 6 (alternate oscillator configuration) / digital I/O |
| Pin 28 | RA7/AN7 — Port A bit 7 / analog channel 7 (alternate oscillator configuration) / digital I/O |
Typical Applications
PIC16F87-E/ML is suitable for 6 applications: Automotive Body Control Module, Home Appliance Control Board, Industrial Sensor Interface Module, Battery-Powered Sensor Node, HVAC and Thermostat Controller, Simple Consumer Remote and HMI.
Automotive Body Control Module
The PIC16F87-E/ML fits automotive body control modules because its 7 KB Flash, 256-byte EEPROM and 16 I/O are sufficient to drive lighting, wiper, mirror and door-lock actuators while the E-grade -40 °C to +125 °C rating handles under-dash and in-cabin ambient. The 20 MHz instruction cycle is fast enough for 10 ms body-CAN-style scheduling; the Addressable USART plus SSP serializer large messages to a downstream body controller. Compared with newer PIC16F1xxxx options, PIC16F87-E/ML remains favored where boot-leg or migration-safety demands the well-known mid-range architecture.
Recommended
Home Appliance Control Board
PIC16F87-E/ML is a strong fit for white-goods control boards in washers, dishwashers and refrigerators: 7 KB Flash hosts motor-control state machines, 256-byte EEPROM retains user settings, and the 2 analog comparators evaluate sensor thresholds without external op-amps. The 28-QFN footprint lets designers shrink the PCB versus 28-SOIC alternatives while staying within the same BOM footprint. Designers use the CCP module to drive TRIAC-controlled AC loads and the USART to drive LED/HMI front-panels.
Recommended
Industrial Sensor Interface Module
The PIC16F87-E/ML handles sensor aggregation in industrial panels where 16 I/O is enough to read switches, encoders or 4–20 mA-derived analog signals via the built-in comparators, and the USART streams digital values to a host PLC. Its automotive-extended -40 °C to +125 °C range plus 5 V I/O tolerates the harsh installed environments of factory floors and outdoor cabinets. The CCP driving PWMs also drives analog inputs via filter-and-buffer front-ends for proportional-valve control loops.
Recommended
Battery-Powered Sensor Node
PIC16F87-E/ML supports battery-powered sensor nodes thanks to its nanoWatt Sleep modes drawing low quiescent current, 7 KB Flash holding sensor-fusion firmware, and USART waking the radio transceiver only on events. With 4 V to 5.5 V supply and 16 I/O, the device can be paired with a 4-series AA pack or a lithium chemistries via an LDO. Designers extend battery life by clocking down to the 8 MHz internal oscillator and parking the CPU in Sleep between sensor reads.
Recommended
HVAC and Thermostat Controller
In HVAC and thermostat controllers the PIC16F87-E/ML executes on/off and PID loops for relays and TRIACs while monitoring NTC thermistors via the 2 built-in comparators. The 256-byte EEPROM stores schedule and setpoint data that survives power cycles, and the 7 KB Flash handles menu logic and adaptive control algorithms. The 28-QFN 6x6 mm footprint fits inside slim wall-mount thermostats where PCB height is at a premium.
Recommended
Simple Consumer Remote and HMI
PIC16F87-E/ML serves as the controller inside simple consumer remotes and HMI panels: the addressable USART or SSP port drives LED drivers, while the CCP drives PWM dim control, and the 16 I/O support key matrices and rotary encoders. The 7 KB Flash holds IR/RF protocol stacks and audio-cue firmware, and the 28-QFN 6x6 mm package stays small inside slim remote enclosures. The automotive-grade temperature grade also makes the same firmware usable in dashboards or motorcycles.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F87-E/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F87-I/ML | PIC16F86-I/ML | PIC16F87T-E/ML | PIC16F871-E/PT | PIC16F876A-E/ML |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-QFN (6x6) | 28-QFN (6x6) - same | 28-QFN (6x6) - same | 28-QFN (6x6) - same | 28-QFN (6x6) - same | 28-QFN (6x6) - same |
| Maximum Clock Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 16 MHz (-20%) | 20 MHz |
| Program Flash | 7 KB (4K x 14) | 7 KB (4K x 14) | 3.5 KB (-50%) | 7 KB (4K x 14) | 5 KB | 14 KB (+100%) |
| Data EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 64 bytes | 256 bytes |
| Data SRAM | 368 bytes | 368 bytes | 368 bytes | 368 bytes | 128 bytes | 368 bytes |
| Temperature Grade | -40 °C to +125 °C (E / automotive) | -40 °C to +85 °C (industrial) | -40 °C to +85 °C (industrial) | -40 °C to +125 °C (E / automotive) | -40 °C to +125 °C (E / automotive) | -40 °C to +125 °C (E / automotive) |
| Analog Peripherals | 2 Comparators | 2 Comparators | 2 Comparators | 2 Comparators | 8 ch 10-bit ADC, no comparators | 5 ch 10-bit ADC + Comparators |
Key Differentiators
- Larger program Flash within same family footprint (vs PIC16F86-I/ML)
- Automotive temperature grade in a 28-QFN footprint (vs PIC16F876A-E/ML)
- On-chip EEPROM data memory (vs PIC16F871-E/PT)
Design Notes
Decoupling must include a 100 nF X7R ceramic placed within 3 mm of VDD and a bulk 1–10 µF tantalum or ceramic at the board supply entry. PIC16F87-E/ML has multiple VDD/VSS pins on a QFN package — every one must be tied to reduce supply-noise coupling and to provide a low-impedance return for the internal logic. Brown-out detection should be enabled in the configuration bits so partial-power-down events do not corrupt EEPROM writes.
Keep MCLR traces short and use an RC delay (typ. 10 kΩ plus 1 µF) to provide reset noise immunity in automotive environments where ignition transients can couple onto the line. Reserve pins RB6 (PGC) and RB7 (PGD) for ICSP/ICD and avoid routing noisy signals over them, otherwise production programmers lose contact. For QFN devices, expose the exposed thermal pad — even though 8-bit PICs dissipate very little power — and tie it to the ground plane for thermal relief and mechanical solder-joint robustness.
Do not assume the 8 MHz internal oscillator is accurate enough for USART operation at higher baud rates; switch to an external crystal (HS mode) or LF-INTOSC with calibrated USART divider values when serial error budgets tighten. Watch out for read-modify-write hazards on the PORT registers — read the LAT register and use it for the write-back to avoid spurious I/O toggling. Finally, when migrating from PIC16F86 to PIC16F87, double-check that the larger Flash region is mapped into the program's high-water-mark and the reset/interrupt vectors still land at 0x0000/0x0004.
Compliance Information
E-grade -40 °C to +125 °C suffix suggests automotive intent but AEC-Q100 is not explicitly listed in Microchip automotive grade table for this part number per the verified data. Verify factory certificate of conformance for safety-critical automotive platforms.