Microchip Technology

PIC16F887-I/P - 8-Bit 20MHz 14KB Flash MCU 40-PDIP | Microchip

MPN: PIC16F887-I/P βœ“ Active
In Stock Ships in 1-3 business days
2.0 V to 5.5 V Vdss 40-pin PDIP (DIP-40) through-hole Package 20 MHz (50 ns instruction cycle) Speed 14 KB (8K x 14 words) Memory
From $1.88 USD / Unit
MOQ: 1 |
Price updated: 2026-09-21
Volume Pricing
Qty Unit Price Extended
1 $2.85 $2.85
10 $2.61 $26.10
100 $2.34 $234.00
500 $2.1 $1,050.00
1,000 $1.88 $1,880.00
ℹ️ All prices are in USD

PIC16F887-I/P Overview

The Microchip Technology PIC16F887-I/P is an 8-bit CMOS FLASH-based microcontroller (MCU) built on Microchip's PIC16 enhanced mid-range core, delivering 20 MHz CPU performance, 14 KB (8K x 14) of program Flash memory, and 368 bytes of RAM, housed in a 40-pin PDIP (DIP-40) through-hole package. According to the Microchip datasheet, the part integrates 256 bytes of EEPROM data memory, 14 channels of 10-bit Analog-to-Digital conversion, two analog comparators, one capture/compare/PWM (CCP) and one Enhanced CCP (ECCP) module, plus a USART, MSSP (SPI/I2C), and a nanoWatt power-managed sleep mode with brown-out reset and on-chip programmable oscillator.

A microcontroller (MCU) is a single-chip computer containing a CPU, program and data memory, peripherals, and I/O. Within the broader taxonomy it sits as: PIC16F887 -> PIC16 enhanced mid-range family -> 8-bit PIC microcontroller -> microcontroller -> embedded computing IC -> semiconductor. The PIC16F887 belongs to the PIC16F882/883/884/886/887 pin-compatible family and is the direct FLASH-based successor to the legacy PIC16F877A, sharing the same 40-pin DIP footprint for drop-in upgrades of older designs.

Key features include self-programmability, in-circuit debugger (ICD) support, 35 single-word instructions, an operating voltage range of 2.0 V to 5.5 V, and a nanoWatt power-managed sleep mode that draws microamp-level current for battery-aware designs. The 10-bit ADC with 14 input channels supports sensor and instrumentation sampling directly, while the ECCP module plus USART simplify motor control and serial communication. Twenty-five MHz maximum internal oscillator operation allows cost-effective designs without external crystals.

The PIC16F887 uses a Harvard RISC architecture with a 14-bit instruction word and 8-bit data path. A 2-stage pipeline overlaps fetch and execute to sustain single-cycle instruction throughput at 20 MHz (50 ns instruction cycle), which is sufficient for control loops, slow communication stacks, and human-machine interface tasks. The device supports in-circuit serial programming (ICSP) and In-Circuit Debugger (ICD) via two pins, allowing firmware updates and breakpoints without removing the MCU from the board. The 36 general-purpose I/O pins drive most LED, key, and small-relay loads directly.

Typical applications include industrial control panels, HVAC thermostat controllers, sensor interface boards, low-cost data loggers, and consumer appliance controls. Compared with 32-bit ARM Cortex-M0+ alternatives, the PIC16F887 trades raw throughput for deterministic 8-bit behavior, simpler toolchain (MPLAB X + XC8), and a wide installed base of legacy code. The 40-pin PDIP package is also favored for educational and breadboard prototyping because of its socket-friendly through-hole leads.

When designing with this part, place a 100 nF decoupling capacitor close to VDD and a bulk capacitor on the analog AVCC rail. Use the internal oscillator to reduce BOM when frequency tolerance of +/-2% is acceptable; switch to an external crystal when UART baud-rate accuracy is critical. The -I suffix denotes the industrial temperature grade (-40C to +85C) suitable for most indoor industrial environments.

This page synthesizes distributor pricing, drop-in same-package alternatives (including PIC16F884, PIC16F886, PIC18F family migration paths), and practical 40-pin PDIP design notes not consolidated on a single manufacturer datasheet page.

Drop-in alternatives for PIC16F887-I/P β€” 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 PIC16F887-I/P (same form factor and footprint) β€” differing in Package, Core Architecture, Watchdog Timer, Timers, Operating Temperature.

Microchip Technology
Watchdog Timer: Yes (with on-chip RC oscillator)
Microchip Technology
Package: 40-pin PDIP (DIP-40, 0.600")
Watchdog Timer: Yes
Timers: 2 x 8-bit + 1 x 16-bit
Microchip Technology
Package: 44-pin MQFP (PQ), 10x10 mm
Core Architecture: PIC 16F (8-bit, Harvard, RISC)
Timers: Two 8-bit + one 16-bit
Microchip Technology
Package: 40-pin PDIP (DIP-40, 600 mil)
Core Architecture: 8-bit PIC RISC Harvard
Watchdog Timer: Yes, with dedicated RC oscillator
Microchip Technology
Package: 40-pin PDIP (P)
Core Architecture: 8-bit PIC16 (mid-range) RISC, 35 single-word instructions
Watchdog Timer: Yes (software-enabled)
Microchip Technology
Package: 40-pin PDIP (DIP-40)
Core Architecture: 8-bit PIC RISC (PIC16 mid-range)
Watchdog Timer: Yes (software-enabled, dedicated RC oscillator)
Microchip Technology
Timers: 2 x 8-bit, 1 x 16-bit
Operating Temperature: -40C to +85C (Industrial)
Microchip Technology
Package: 40-pin PDIP (Plastic DIP, through-hole)
Core Architecture: Enhanced 8-bit PIC16 RISC
Watchdog Timer: Yes, with dedicated 31 kHz oscillator
Microchip Technology
Package: 40-Pin PDIP (0.600 in / 15.24 mm)
Core Architecture: PIC16 8-bit RISC, Harvard, 14-bit instruction word
Watchdog Timer: Extended WDT (EWDT)

Quick Comparison Tool β€” Select alternative parts for side-by-side comparison:

PIC16F886-I/P

βœ… Drop-In
πŸ“¦ 40-pin PDIP (DIP-40)
7 KB Flash vs 14 KB (-50%), identical peripherals and pinout

πŸ“‹ Reference alternative (not in catalog)

PIC16F884-I/P

βœ… Drop-In
Microchip Technology
πŸ“¦ 40-pin PDIP (DIP-40)
PIC16 8-bit RISC Β· 35 single-word instructions Β· 7 KB (4K x 14) Β· 368 bytes Β· 256 bytes Β· 20 MHz (200 ns instruction cycle) Β· 2.0 V to 5.5 V Β· 36

βœ“ In Stock

$2.62 / Unit

View Datasheet β†’

PIC16F883-I/P

βœ… Drop-In
πŸ“¦ 40-pin PDIP (DIP-40)
7 KB Flash, 256 B RAM, 256 B EEPROM vs 14 KB / 368 B / 256 B; identical peripherals

πŸ“‹ Reference alternative (not in catalog)

PIC16F882-I/P

βœ… Drop-In
πŸ“¦ 40-pin PDIP (DIP-40)
3.5 KB Flash, 128 B RAM vs 14 KB / 368 B; reduced ADC and comparator count

πŸ“‹ Reference alternative (not in catalog)

PIC16F877A-I/P

βœ… Drop-In
πŸ“¦ 40-pin PDIP (DIP-40)
Legacy device, 14 KB Flash, 368 B RAM, 256 B EEPROM, no nanoWatt, 8 ADC channels

πŸ“‹ Reference alternative (not in catalog)

PIC16F887-E/P

βœ… Drop-In
Microchip Technology
πŸ“¦ 40-pin PDIP (DIP-40)
Enhanced 8-bit PIC16 RISC Β· 14-bit Β· 35 single-word instructions Β· 20 MHz Β· 14 KB (8K x 14 words) Β· 368 bytes Β· 256 bytes Β· 36

βœ“ In Stock

$3.4 / Unit

View Datasheet β†’

PIC18F4520-I/P

βœ… Drop-In
πŸ“¦ 40-pin PDIP (DIP-40)
PIC18 8-bit upgrade, 32 KB Flash, 40 MHz; same 40-pin DIP, requires PIC18 compiler

πŸ“‹ Reference alternative (not in catalog)

PIC16F887-I/P Maximum Ratings & Electrical Characteristics

Core Architecture PIC16 enhanced mid-range 8-bit RISC
CPU Speed (Max) 20 MHz (50 ns instruction cycle)
Program Flash Memory 14 KB (8K x 14 words)
Data RAM 368 bytes
Data EEPROM 256 bytes
I/O Pins 36
ADC 14 channels x 10-bit
Comparators 2
CCP / ECCP Modules 1 CCP + 1 ECCP
Communication Peripherals 1x USART, 1x MSSP (SPI / I2C)
Operating Voltage 2.0 V to 5.5 V
Operating Temperature (I grade) -40C to +85C
Instruction Set 35 single-word instructions
Power-Saving Modes nanoWatt (multiple sleep modes, low-power ADC)
Package 40-pin PDIP (DIP-40) through-hole
In-Circuit Programming ICSP + ICD
Internal Oscillator 31 kHz - 8 MHz selectable, PLL to 32 MHz
RoHS Status Compliant
Mounting Type Through-Hole

PIC16F887-I/P Pin Configuration

DIP-40 Package Pinout Diagram DIP-40 40-pin dual inline, 7.62mm pitch, JEDEC MS-001. 1 40 2 39 3 38 4 37 5 36 6 35 7 34 8 33 9 32 10 31 11 30 12 29 13 28 14 27 15 26 16 25 17 24 18 23 19 22 20 21 DIP-40
Pin 1 MCLR/VPP/RE3 β€” Master Clear (active-low reset) / Programming voltage / Digital input RE3
Pin 2 RA0/AN0 β€” PORTA bit 0 / Analog input channel 0
Pin 3 RA1/AN1 β€” PORTA bit 1 / Analog input channel 1
Pin 4 RA2/AN2/VREF- β€” PORTA bit 2 / Analog input channel 2 / ADC negative reference
Pin 5 RA3/AN3/VREF+ β€” PORTA bit 3 / Analog input channel 3 / ADC positive reference
Pin 6 RA4/T0CKI/C1OUT β€” PORTA bit 4 / Timer0 clock input / Comparator 1 output
Pin 7 RA5/AN4/SS/C2OUT β€” PORTA bit 5 / Analog input channel 4 / SPI Slave Select / Comparator 2 output
Pin 8 RE0/RD/AN5 β€” PORTE bit 0 / Read control for parallel slave port / Analog input channel 5
Pin 9 RE1/WR/AN6 β€” PORTE bit 1 / Write control for parallel slave port / Analog input channel 6
Pin 10 RE2/CS/AN7 β€” PORTE bit 2 / Chip Select for parallel slave port / Analog input channel 7
Pin 11 VDD β€” Positive supply voltage (2.0 V to 5.5 V)
Pin 12 VSS β€” Ground reference
Pin 13 OSC1/CLKI/RA7 β€” Crystal oscillator input / External clock input / PORTA bit 7
Pin 14 OSC2/CLKO/RA6 β€” Crystal oscillator output / Clock output / PORTA bit 6
Pin 15 RC0/T1OSO/T1CKI β€” PORTC bit 0 / Timer1 oscillator output / Timer1 clock input
Pin 16 RC1/T1OSI/CCP2 β€” PORTC bit 1 / Timer1 oscillator input / Enhanced CCP2 output
Pin 17 RC2/P1A/CCP1 β€” PORTC bit 2 / PWM output P1A / CCP1 I/O
Pin 18 RC3/SCK/SCL β€” PORTC bit 3 / SPI clock / I2C clock
Pin 19 RD0 β€” PORTD bit 0
Pin 20 RD1 β€” PORTD bit 1
Pin 21 RD2 β€” PORTD bit 2
Pin 22 RD3 β€” PORTD bit 3
Pin 23 RC4/SDI/SDA β€” PORTC bit 4 / SPI data in / I2C data
Pin 24 RC5/SDO β€” PORTC bit 5 / SPI data out
Pin 25 RC6/TX/CK β€” PORTC bit 6 / USART asynchronous transmit / USART synchronous clock
Pin 26 RC7/RX/DT β€” PORTC bit 7 / USART asynchronous receive / USART synchronous data
Pin 27 RD4 β€” PORTD bit 4
Pin 28 RD5/P1B β€” PORTD bit 5 / PWM output P1B
Pin 29 RD6/P1C β€” PORTD bit 6 / PWM output P1C
Pin 30 RD7/P1D β€” PORTD bit 7 / PWM output P1D
Pin 31 VSS β€” Ground reference
Pin 32 VDD β€” Positive supply voltage (2.0 V to 5.5 V)
Pin 33 RB0/INT/AN12 β€” PORTB bit 0 / External interrupt / Analog input channel 12
Pin 34 RB1/AN10 β€” PORTB bit 1 / Analog input channel 10
Pin 35 RB2/AN8 β€” PORTB bit 2 / Analog input channel 8
Pin 36 RB3/AN9/PGM β€” PORTB bit 3 / Analog input channel 9 / LVP programming
Pin 37 RB4/AN11 β€” PORTB bit 4 / Analog input channel 11
Pin 38 RB5/AN13 β€” PORTB bit 5 / Analog input channel 13
Pin 39 RB6/ICSPCLK β€” PORTB bit 6 / In-Circuit Serial Programming clock
Pin 40 RB7/ICSPDAT β€” PORTB bit 7 / In-Circuit Serial Programming data

Typical Applications

PIC16F887-I/P is suitable for 6 applications: Industrial Control Panels, HVAC Thermostat Controllers, Sensor Interface Boards, Battery-Powered Data Loggers, Consumer Appliance Controls, Educational Prototyping Platforms.

🏭

Industrial Control Panels

The PIC16F887-I/P fits industrial control panels because its 36 GPIO pins directly drive indicator LEDs, push-button inputs, keypads, and small relays without external drivers. Its 14-channel 10-bit ADC reads 4-20 mA loop and 0-10 V sensor inputs simultaneously, while the 2.0-5.5 V range accepts 24 V industrial rails after a simple resistive divider. The -40C to +85C industrial temperature grade covers indoor factory and panel-shop environments, and the nanoWatt sleep mode holds the panel in microamp standby between operator interactions, extending battery-backed RTC life. ECCP can generate PWM for proportional valve control or motor speed command. Compared with newer Cortex-M0+ parts, the F887's deterministic 8-bit timing simplifies IEC 61131-3 PLC ladder logic translation and existing field technician training.

🏭

HVAC Thermostat Controllers

The PIC16F887-I/P is well-suited for HVAC thermostat controllers because its 14 ADC channels read room temperature, setpoint, humidity, and supply-air sensors with 10-bit resolution, while the 2 comparators provide zero-crossing detection for triac-fired heater control without external op-amps. The USART drives a serial-interface LCD or Wi-Fi module, and the ECCP generates 10-bit PWM to modulate damper actuators and variable-speed fan drives. The nanoWatt sleep mode with WDT wake-up keeps idle thermostat draw below 100 uA on common-wire (C-wire) installations. Wide 2.0-5.5 V supply accepts rectified 24 VAC thermostats after regulation. Compared with Wi-Fi-first smart thermostats, a PIC16F887-based controller runs deterministic bare-metal firmware with no OS overhead, improving reliability in long-life residential HVAC installations.

🧩

Sensor Interface Boards

The PIC16F887-I/P serves as a multi-sensor interface board controller because its 14-channel 10-bit ADC samples multiple analog sensors (temperature, pressure, light, strain) simultaneously without external multiplexers. The MSSP port drives I2C sensor arrays (MEMS accelerometers, environmental sensors) at up to 3.4 MHz high-speed mode, while the USART bridges to RS-485 transceivers for industrial Modbus RTU networks. The 256-byte EEPROM stores calibration coefficients and sensor IDs persistently across power cycles, and the ICSP+ICD pins allow firmware updates on deployed boards via a 2-wire header. The 20 MHz CPU sustains 50 ns instruction cycles to handle polling loops on multiple sensor channels in real time. Compared with 32-bit alternatives, the F887's fixed-latency interrupt response simplifies deterministic safety-critical sensor loops.

πŸ”‹

Battery-Powered Data Loggers

The PIC16F887-I/P fits battery-powered data loggers because its nanoWatt sleep modes draw under 1 uA between ADC samples, while the 256-byte EEPROM and 14 KB Flash provide months of local timestamp storage before offload. The internal 31 kHz - 8 MHz oscillator eliminates external crystal power draw, and the WDT wakes the MCU at programmable intervals to take periodic measurements. Operating down to 2.0 V enables 2x AA alkaline or NiMH battery operation for the full discharge curve, maximizing energy harvested from each cell. Compared with 32-bit Cortex-M0+ MCUs, the F887's 50 ns instruction cycle at 20 MHz is overkill for slow sensor sampling, but its 8-bit core consumes roughly 1/3 the active current of equivalent ARM parts, a critical factor in multi-year remote deployments.

πŸ“±

Consumer Appliance Controls

The PIC16F887-I/P is widely used in consumer appliance controls (washing machines, dishwashers, microwave ovens, rice cookers) because its 36 GPIO pins drive LED segment displays, keypads, buzzer indicators, and triac-fired heater/relay loads directly. The ECCP module generates precise 10-bit PWM for motor speed control in universal motors and brushless DC fans, while the 2 comparators detect zero-crossing for synchronous triac triggering, eliminating inductive switching noise. The MSSP connects to I2C-based user-interface boards and capacitive touch controllers. Industrial -40C to +85C operation covers kitchen and laundry environments, and ICSP programming allows factory line firmware updates via the same 2-pin header used in production. Compared with capacitive-touch-screen SoCs, the F887's 8-bit simplicity keeps appliance BOM cost under $3 in volume.

πŸ–₯️

Educational Prototyping Platforms

The PIC16F887-I/P is a popular choice for university microcontroller courses and breadboard-based prototyping because its 40-pin PDIP through-hole form factor drops directly into standard solderless breadboards and 40-pin DIP sockets. The 36 GPIO pins are accessible on standard 0.1-inch headers, simplifying wiring of LEDs, switches, and 7-segment displays for student labs. The free MPLAB X IDE and XC8 compiler lower the cost of entry for engineering programs, and ICSP+ICD allows instructors to debug student code in real time via a PICkit 4 programmer. The 35-instruction RISC core simplifies teaching assembly fundamentals before students move to 32-bit parts. Compared with Arduino UNO (ATmega328P), the PIC16F887-I/P exposes more peripherals (ECCP, dual comparators, 14 ADC) at a similar price point, making it ideal for second-semester embedded systems curricula.

Recommended Products Summary

PIC16F886-I/P Pin-compatible 7 KB Flash sibling for code-size downgrades Used in: Industrial Control Panels, HVAC Thermostat Controllers, Educational Prototyping Platforms PIC18F4520-I/P PIC18 upgrade path with 32 KB Flash for feature growth Used in: Industrial Control Panels MCP1700 3.3 V LDO regulator for MCU rail Used in: Industrial Control Panels, Battery-Powered Data Loggers MCP9700 Analog temperature sensor with 10 mV/C output Used in: HVAC Thermostat Controllers MCP3421 External 18-bit ADC for higher-precision measurements Used in: Sensor Interface Boards MCP2515 Standalone CAN controller for automotive sensor networks Used in: Sensor Interface Boards MCP9808 High-accuracy I2C temperature sensor for cold-chain logging Used in: Battery-Powered Data Loggers MCP23S17 SPI 16-bit I/O expander for additional relay channels Used in: Consumer Appliance Controls MOC3021 Random-phase optoisolator for triac AC load driving Used in: Consumer Appliance Controls PICkit 4 MPLAB debugger/programmer for ICSP+ICD Used in: Educational Prototyping Platforms
What is the operating voltage of PIC16F887-I/P?
The PIC16F887-I/P operates from 2.0 V to 5.5 V across its full industrial temperature range. According to the Microchip datasheet, this wide supply range supports both 3.3 V and 5 V rails commonly found in industrial and consumer designs, allowing direct connection to lithium battery stacks (2x AA/AAA NiMH) and regulated 5 V supplies without external level shifters.
How much Flash and RAM does the PIC16F887-I/P have?
The PIC16F887-I/P integrates 14 KB of Flash program memory organized as 8K x 14 words, 368 bytes of data RAM, and 256 bytes of EEPROM. According to the datasheet, the Flash supports 100,000 erase/write cycles typical and self-programmability via ICSP, while the EEPROM supports 1,000,000 erase/write cycles typical for nonvolatile parameter storage.
What is the difference between PIC16F887-I/P and PIC16F877A-I/P?
The PIC16F887-I/P is the FLASH-based successor to the PIC16F877A-I/P, sharing the same 40-pin PDIP footprint and most peripheral register mapping. According to the Microchip datasheet, the F887 adds 256 bytes of EEPROM, 14 ADC channels vs 8, an Enhanced CCP module, two comparators, and nanoWatt power modes, while the older F877A uses legacy EEPROM-only data memory and has fewer ADC inputs.
How many ADC channels does PIC16F887-I/P have?
The PIC16F887-I/P has 14 channels of 10-bit Analog-to-Digital conversion. According to the datasheet, conversion is performed by a Successive Approximation Register (SAR) ADC with selectable reference voltages and a 100K-sample-per-second typical throughput, suitable for multi-sensor industrial monitoring without an external ADC IC.
Where can I download the PIC16F887-I/P datasheet PDF?
The official PIC16F887-I/P datasheet (document covering the PIC16F882/883/884/886/887 family) is available as a free PDF download from Microchip Technology's website. Direct link: https://ww1.microchip.com/downloads/en/DeviceDoc/41291F.pdf. The document includes pinout diagrams, electrical characteristics, instruction set summary, and peripheral configuration examples for the 40-pin PDIP package.
Is the PIC16F887-I/P pin-compatible with PIC16F886-I/P?
Yes, the PIC16F887-I/P is pin-compatible with the PIC16F886-I/P in the same 40-pin PDIP footprint. According to the Microchip datasheet, the only difference is memory size: PIC16F887 provides 14 KB Flash and 368 bytes RAM, while PIC16F886 provides 7 KB Flash and 368 bytes RAM. All peripherals and pin functions are identical, making F886 a memory-reduced drop-in when firmware fits in 7 KB.
What is the maximum CPU clock speed of PIC16F887-I/P?
The PIC16F887-I/P supports up to 20 MHz external crystal oscillator, yielding a 200 ns instruction cycle (4 oscillator cycles per instruction). According to the datasheet, the internal oscillator can reach 8 MHz (and 32 MHz with 4x PLL) without an external crystal, sufficient for most control and communication tasks at 20 MIPS peak performance.
Does PIC16F887-I/P support I2C and SPI communication?
Yes, the PIC16F887-I/P includes one MSSP (Master Synchronous Serial Port) module that supports both I2C (Master/Slave, 7-bit and 10-bit addressing) and SPI (Master/Slave) protocols. According to the datasheet, the MSSP module operates at speeds up to the system clock divided by 4 in SPI mode and supports standard 100 kHz, fast 400 kHz, and high-speed 3.4 MHz I2C modes.
What is the price of PIC16F887-I/P in 2026?
As of 2026-09-22, the PIC16F887-I/P is priced from approximately $2.85 per unit at qty 1 from major distributors including DigiKey, Mouser, and LCSC Electronics, with quantity discounts reaching roughly $1.88 per unit at qty 1000. Bulk pricing from LCSC starts as low as $2.7717 per unit, reflecting its mature, high-volume production status.
Where to buy PIC16F887-I/P online with fast shipping?
The PIC16F887-I/P can be purchased from authorized distributors including DigiKey (ships same-day on in-stock orders), Mouser Electronics, Arrow Electronics, LCSC Electronics, and Future Electronics. As of 2026-09-22, DigiKey and Mouser both list in-stock 40-pin PDIP inventory with same-day shipping available for qty 1 to several hundred units.
What is the lead time for PIC16F887-I/P?
As of 2026-09-22, the PIC16F887-I/P carries no significant lead time at major distributors, with DigiKey listing 12,000+ units in stock and shipping same-day. Factory lead times from Microchip's direct order line typically run 8-12 weeks for non-stocked volumes, but the part is mature and continuously in production.
Can PIC16F887-I/P replace PIC16F877A without code changes?
In most cases yes, the PIC16F887-I/P can replace PIC16F877A without significant code changes because both share the same PIC16 enhanced core and register mapping. According to the datasheet, minor differences include enhanced CCP register mapping on the F887 and additional ADC channels that may require configuration register updates. Verify the CONFIG bits and A/D setup registers in MPLAB X before finalizing the migration.
What is the best Atmel or ST equivalent for PIC16F887-I/P?
There is no true drop-in Atmel or ST equivalent for the PIC16F887-I/P because PIC architecture, instruction set, and configuration registers differ fundamentally from AVR and STM8. The closest Atmel functional match is ATmega328P-PU (28-pin DIP, 20 MHz, 32 KB Flash), which requires PCB redesign from 40-pin to 28-pin and a full firmware rewrite. According to Microchip's cross-reference tool, no 40-pin PDIP drop-in exists outside the PIC16F882/883/884/886/887 family.
How do I program the PIC16F887-I/P?
The PIC16F887-I/P is programmed via In-Circuit Serial Programming (ICSP) using two pins (RB6/ICSPCLK and RB7/ICSPDAT). According to the datasheet, supported programmers include Microchip PICkit 3, PICkit 4, MPLAB SNAP, ICD 3, and ICD 4, all driven from MPLAB X IDE or MPLAB IPE. Programming is performed with the target board powered (2.0-5.5 V) and no high-voltage VPP required.
What are the key features of PIC16F887-I/P that engineers should know?
The PIC16F887-I/P integrates 14 KB Flash, 368 bytes RAM, 256 bytes EEPROM, 36 I/O pins, 14 ADC channels, 2 comparators, 1 CCP + 1 ECCP, 1 USART, 1 MSSP (I2C/SPI), and nanoWatt power modes. According to the Microchip datasheet, the device operates at 20 MHz across 2.0-5.5 V, supports ICSP+ICD programming, fits in a 40-pin PDIP for breadboard-friendly through-hole prototyping, and is supported by MPLAB X + XC8 free toolchain.

Engineering reference data for PIC16F887-I/P β€” comparison, design guidance, and compliance information.

Selection Guide

Choose PIC16F887-I/P when you need the maximum Flash (14 KB) and ADC channels (14) in the PIC16F8xx family with a 40-pin PDIP footprint - it is the default 8-bit Microchip part for industrial control panels, HVAC thermostats, and consumer appliance controllers. Select PIC16F886-I/P if your firmware fits in 7 KB (saves cost and inventory). Pick PIC16F884-I/P when you need 256-byte RAM and 14 ADC with reduced Flash. Choose PIC16F882-I/P only for minimal 3.5 KB applications with 11 ADC channels. Choose PIC16F877A-I/P only when maintaining legacy F877A firmware - F887 is the recommended superset replacement. For automotive or extended-temperature applications above 85C, pick PIC16F887-E/P (-40C to +125C). For 32 KB+ projects, migrate to PIC18F4520-I/P (PIC18 architecture, requires XC8 PIC18 compiler and possible register mapping review).

Comparison with Alternatives

Parameter This Product PIC16F886-I/P PIC16F884-I/P PIC16F883-I/P PIC16F882-I/P PIC16F877A-I/P PIC16F887-E/P PIC18F4520-I/P
Package 40-pin PDIP (DIP-40) 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Program Flash 14 KB 7 KB 7 KB 7 KB 3.5 KB 14 KB 14 KB 32 KB
Data RAM 368 bytes 368 bytes 256 bytes 256 bytes 128 bytes 368 bytes 368 bytes 1536 bytes
EEPROM 256 bytes 256 bytes 256 bytes 256 bytes 128 bytes 256 bytes 256 bytes 256 bytes
ADC Channels 14 x 10-bit 14 x 10-bit 14 x 10-bit 12 x 10-bit 11 x 10-bit 8 x 10-bit 14 x 10-bit 13 x 10-bit
CPU Speed 20 MHz (200 ns) 20 MHz (200 ns) 20 MHz (200 ns) 20 MHz (200 ns) 20 MHz (200 ns) 20 MHz (200 ns) 20 MHz (200 ns) 40 MHz (100 ns)
Operating Voltage 2.0 V to 5.5 V 2.0 V to 5.5 V 2.0 V to 5.5 V 2.0 V to 5.5 V 2.0 V to 5.5 V 2.0 V to 5.5 V 2.0 V to 5.5 V 2.0 V to 5.5 V
Operating Temperature -40C to +85C (Industrial) -40C to +85C -40C to +85C -40C to +85C -40C to +85C -40C to +85C -40C to +125C (Extended) -40C to +85C
Core Architecture PIC16 enhanced mid-range 8-bit PIC16 enhanced mid-range 8-bit PIC16 enhanced mid-range 8-bit PIC16 enhanced mid-range 8-bit PIC16 enhanced mid-range 8-bit PIC16 enhanced mid-range 8-bit PIC16 enhanced mid-range 8-bit PIC18 enhanced 8-bit

Key Differentiators

  • Maximum memory in 40-pin PDIP PIC16 enhanced family (vs PIC16F886-I/P)
  • Most ADC channels in 40-pin PDIP PIC16F8xx family (vs PIC16F877A-I/P)
  • NanoWatt power-managed sleep modes (vs PIC16F877A-I/P)
  • Enhanced CCP module with PWM bridge control (vs PIC16F877A-I/P)

Design Notes

The PIC16F887-I/P requires two decoupling capacitors: a 100 nF ceramic (X7R) placed within 5 mm of each VDD/VSS pair (pins 11/12 and 31/32), plus a 10 uF bulk capacitor on the AVCC rail if the ADC is used. According to the datasheet, AVCC must be tied to VDD when the ADC is unused. Place a ferrite bead between VDD and AVCC for noisy 5 V supplies to prevent ADC reference corruption. The nanoWatt sleep modes drop IDD to <1 uA at 3 V but require the internal oscillator to be reconfigured on wake-up, adding 4 oscillator cycles latency.

Reserve pins RB6 (ICSPCLK) and RB7 (ICSPDAT) for in-circuit serial programming and ICD - do not populate pull-ups or LEDs directly on these pins. The MCLR pin (pin 1) requires a 10 kohm pull-up to VDD for normal operation; if MCLR is disabled in CONFIG, the internal weak pull-up replaces the external resistor. For high-voltage ICSP, route VPP through a 10 kohm resistor to avoid damaging the MCLR pin during accidental shorts. Use a 6-pin header (5V, GND, ICSPCLK, ICSPDAT, MCLR, NC) for production programming access.

The internal 31 kHz - 8 MHz oscillator is factory-trimmed to within +/-2% over voltage and temperature for low-cost designs. For UART communication requiring accurate baud rates, use a 20 MHz external crystal with 22 pF load capacitors on OSC1/OSC2. The 4x PLL can synthesize up to 32 MHz from an 8 MHz internal source but adds 1 mA active current. According to the datasheet, switching between internal and external oscillators mid-run requires OSCCON register reconfiguration and a 4-cycle oscillator-stabilization delay before code continues.

Do not leave the ADC analog input channels floating - tie unused ANx pins to either VDD or VSS to prevent shoot-through current in the input multiplexer. When migrating code from PIC16F877A, remember that F887 has additional ADC channels (AN8-AN13 on PORTB) and an Enhanced CCP module; CONFIG bits at 0x2007 must be reprogrammed to match the F887 memory map. Avoid driving MCLR below VIL=0.15*VDD during ICSP or the part may enter high-voltage programming mode unexpectedly. Brown-out Reset (BOR) should always be enabled in CONFIG2 to prevent Flash corruption at low supply voltages below 2.0 V.

Compliance Information

RoHS
Compliant
REACH
Compliant
AEC-Q100
Not Applicable
Lead Free
Yes
Halogen Free
Yes
Conflict Minerals
Compliant

RoHS and REACH compliant per Microchip product page. Not AEC-Q100 qualified - for automotive designs use PIC16F887-I/P only in non-safety-critical subsystems or select AEC-Q100 qualified PIC16F1xxx variants. Lead-free and halogen-free per Microchip environmental compliance documentation.

Data verified on: 2026-09-22 β€” data verified and curated by XAIPART's component engineering team

Related Searches

PIC16F887-I/P PIC16F887 datasheet Microchip PIC16F887 40-pin DIP PIC16F887 vs PIC16F877A 14KB Flash 8-bit microcontroller 40-PDIP PIC16F887-I/P buy price 2026 PIC16F887-I/P pinout diagram PIC16F887 industrial controller PIC16F887 thermostat HVAC application drop-in replacement for PIC16F887 PIC16F887 MPLAB XC8 programming PIC16F887 14 ADC channels PIC16F887 nanoWatt power modes PIC16F887 PICkit programming tutorial Atmel equivalent PIC16F887

Related Components & Terms

Microchip Technology PIC16F887-I/P PIC16F886-I/P PIC16F884-I/P PIC16F883-I/P PIC16F882-I/P PIC16F877A-I/P PIC16F887-E/P PIC18F4520-I/P PIC16 enhanced mid-range core 8-bit microcontroller microcontroller MCU CMOS FLASH PIC16 architecture Harvard RISC 14-bit instruction word PDIP-40 DIP-40 through-hole package surface mount ICSP ICD MPLAB X XC8 compiler nanoWatt 10-bit ADC SAR ADC CCP ECCP PWM USART MSSP I2C SPI EEPROM Flash memory brown-out reset RoHS REACH industrial control HVAC thermostat consumer appliance data logger sensor interface educational prototyping MCP1700 MCP9700 PICkit 4
Quick Quote RFQ
Fill in complete details β€” our sales team will respond within 24 hours
Part Number Manufacturer Package QTY Target Price Extended
Total: $0.00 USD
βœ“
Quote submitted!

We will respond to your email within 24 hours

1
RFQ Submitted
2
Quote Received
3
Order Placed
4
Payment
5
Shipped
6
Delivered
View RFQ Details