Microchip Technology

PIC16F877-04I/P - 8-bit 4MHz 14KB Flash MCU, 40-PDIP | Microchip

MPN: PIC16F877-04I/P ✓ Active
In Stock Ships in 1-3 business days
2.0 V to 5.5 V Vdss 40-pin PDIP (DIP-40, 600 mil) Package 4 MHz Speed 14 KB (8K x 14 words) Memory
From $4.95 USD / Unit
MOQ: 1 |
Price updated: 2026-09-21
Volume Pricing
Qty Unit Price Extended
1 $7.5 $7.50
10 $6.85 $68.50
100 $6.2 $620.00
500 $5.55 $2,775.00
1,000 $4.95 $4,950.00
ℹ️ All prices are in USD

PIC16F877-04I/P Overview

The Microchip Technology PIC16F877-04I/P is a CMOS FLASH-based 8-bit microcontroller from the PIC16F family, delivering 4 MHz maximum clock speed with 14 KB of on-chip Flash program memory (8K x 14 words), 368 bytes of RAM, and 256 bytes of EEPROM data memory, all packaged in a 40-pin PDIP through-hole footprint. The device executes instructions in a 200 ns single-cycle period and contains 33 digital I/O lines distributed across five ports (RA, RB, RC, RD, RE).

An 8-bit MCU (microcontroller) is a small self-contained computer on a single integrated circuit that combines a CPU, non-volatile program memory (Flash/ROM), volatile data memory (RAM), non-volatile data storage (EEPROM), and a rich set of programmable peripherals. The 8-bit PIC16F877 sits in the power-management hierarchy between simple 8-bit controllers and 16/32-bit MCUs, offering a balance of low cost, deterministic interrupt response, and sufficient peripherals for embedded control in industrial, automotive, and consumer applications. The "I" suffix indicates the industrial temperature grade of -40C to +85C.

Key differentiating features of the PIC16F877-04I/P include a 10-bit multi-channel Analog-to-Digital Converter (ADC) with eight input channels, two 8-bit and one 16-bit Timer/Counter modules, two Capture/Compare/PWM (CCP) peripherals, a USART for asynchronous and synchronous serial communication, and a Master Synchronous Serial Port (MSSP) configurable as SPI or I2C. The device also integrates a brown-out reset (BOR), power-on reset (POR), watchdog timer (WDT) with its own on-chip RC oscillator, and In-Circuit Serial Programming (ICSP) for field-upgradeable firmware.

Architecturally, the PIC16F877 uses a RISC-style Harvard architecture with separate program and data buses, allowing simultaneous instruction fetch and operand access in a single instruction cycle. The 14-bit wide instruction word supports 35 single-word instructions, providing compact code density and deterministic timing. The 04 speed grade denotes a maximum oscillator frequency of 4 MHz, while the 20 MHz variant (PIC16F877-20I/P) doubles throughput at the cost of slightly higher power consumption.

Typical applications include industrial control systems, sensor interfacing with the 10-bit ADC, motor control via the PWM modules, consumer electronics with USART-based device connectivity, educational platforms such as the PICDEM and development boards, automotive body electronics, and any legacy through-hole design requiring 5V-tolerant digital I/O. The 40-pin PDIP form factor remains popular for breadboarding, hobbyist projects, and through-hole manufacturing lines.

When designing with the PIC16F877-04I/P, ensure the MCLR reset pin is pulled high through a resistor for normal operation and that the Vdd/Vss supply pair is bypassed with a 100 nF ceramic capacitor within a few millimeters of the IC. Designers transitioning to newer Microchip silicon should consider the PIC16F887, which provides pin-to-pin compatibility with additional peripherals, more memory, and an extended instruction set while preserving the same 40-pin PDIP footprint.

This page synthesizes distributor pricing, drop-in PIC16F family alternatives, and practical design notes not found in the standalone manufacturer datasheet, accelerating engineering selection for legacy 8-bit embedded designs.

Drop-in alternatives for PIC16F877-04I/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 PIC16F877-04I/P (same form factor and footprint) — differing in Core Architecture, Package, ADC, Operating Temperature, Timers.

Microchip Technology
Core Architecture: PIC16CXX 8-bit RISC (Harvard)
ADC: 8 channels, 8-bit resolution
Operating Temperature: -40 °C to +85 °C (industrial grade, "I")
Microchip Technology
Core Architecture: PIC16 Mid-Range (8-bit RISC)
Package: 40-pin PDIP (Plastic DIP, through-hole)
ADC: 8 channels x 8-bit
Microchip Technology
Core Architecture: PIC16 8-bit RISC
Package: 40-pin PDIP (P)
Timers: Two 8-bit + One 16-bit
Microchip Technology
Core Architecture: PIC16 (8-bit Harvard RISC)
Package: 44-pin MQFP (10x10 mm)
ADC: 10-bit, up to 8 channels
Microchip Technology
Core Architecture: 8-bit PIC RISC (PIC16 mid-range)
Package: 40-pin PDIP (DIP-40)
Operating Temperature: -40 C to +85 C (Industrial)
Microchip Technology
Package: 40-pin PDIP (DIP-40)
Operating Temperature: -40C to +125C (extended, -E grade)
Microchip Technology
Core Architecture: PIC16 enhanced mid-range 8-bit RISC
Package: 40-pin PDIP (DIP-40) through-hole
ADC: 14 channels x 10-bit

Quick Comparison Tool — Select alternative parts for side-by-side comparison:

PIC16F877-04I/PT

✅ Drop-In
Microchip Technology
📦 40-pin PDIP
PIC 8-bit RISC, mid-range · 35 single-word instructions, 14-bit instruction word · 14 KB (8K x 14 words) · 368 bytes · 256 bytes · 4 MHz (4 MHz part, -04 speed grade) · 4 MIPS at 4 MHz (1 us/instruction) · 2.0 V to 5.5 V

✓ In Stock

$4.95 / Unit

View Datasheet →

PIC16F877A-I/P

✅ Drop-In
📦 40-pin PDIP
A-revision silicon with 4 extra instructions and improved ADC; same Flash/RAM/EEPROM and 40-pin PDIP pinout

📋 Reference alternative (not in catalog)

PIC16F887-I/P

✅ Drop-In
Microchip Technology
📦 40-pin PDIP
PIC16 enhanced mid-range 8-bit RISC · 20 MHz (50 ns instruction cycle) · 14 KB (8K x 14 words) · 368 bytes · 256 bytes · 36 · 14 channels x 10-bit · 2

✓ In Stock

$1.88 / Unit

View Datasheet →

PIC16F877-20I/P

✅ Drop-In
Microchip Technology
📦 40-pin PDIP
8-bit PIC RISC (PIC16 mid-range) · 14 KB (8K x 14 words) · 368 bytes · 256 bytes · 20 MHz · 200 ns · 2.0 V to 5.5 V · 33 (PORTA-PORTE)

✓ In Stock

$5.1 / Unit

View Datasheet →

PIC16F874-04I/P

✅ Drop-In
Microchip Technology
📦 40-pin PDIP
PIC16 8-bit RISC · 4 MHz · 200 ns · 7 KB (4K x 14 words) · 192 bytes · 128 bytes · 33 · 10-bit

✓ In Stock

$5.55 / Unit

View Datasheet →

PIC16F877-04I/P Maximum Ratings & Electrical Characteristics

Product Family PIC16F 8-bit Microcontroller
Core Architecture 8-bit PIC RISC Harvard
Program Memory (Flash) 14 KB (8K x 14 words)
Data RAM 368 bytes
Data EEPROM 256 bytes
Maximum Clock Frequency 4 MHz
Instruction Cycle Time 200 ns
Number of I/O Pins 33
ADC 10-bit, 8 channels
Timers 2 x 8-bit + 1 x 16-bit
CCP Modules 2 (Capture/Compare/PWM)
Serial Interfaces USART + MSSP (SPI/I2C)
Package 40-pin PDIP (DIP-40, 600 mil)
Operating Temperature -40C to +85C (industrial grade)
Supply Voltage (Vdd) 2.0 V to 5.5 V
Watchdog Timer Yes, with dedicated RC oscillator
In-Circuit Programming ICSP (In-Circuit Serial Programming)
RoHS Status Compliant

PIC16F877-04I/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 — Master Clear (reset) input / programming voltage
Pin 2 RA0/AN0 — Port A bit 0 / analog input channel 0
Pin 3 RA1/AN1 — Port A bit 1 / analog input channel 1
Pin 4 RA2/AN2/Vref- — Port A bit 2 / analog input 2 / ADC Vref-
Pin 5 RA3/AN3/Vref+ — Port A bit 3 / analog input 3 / ADC Vref+
Pin 6 RA4/T0CKI — Port A bit 4 / Timer0 clock input
Pin 7 RA5/AN4/SS — Port A bit 5 / analog input 4 / SPI slave select
Pin 8 RE0/RD/AN5 — Port E bit 0 / read control for parallel slave port / analog input 5
Pin 9 RE1/WR/AN6 — Port E bit 1 / write control / analog input 6
Pin 10 RE2/CS/AN7 — Port E bit 2 / chip select / analog input 7
Pin 11 VDD — Positive supply voltage (2.0V to 5.5V)
Pin 12 VSS — Ground reference
Pin 13 OSC1/CLKI — Oscillator input / external clock input
Pin 14 OSC2/CLKO — Oscillator output / clock output
Pin 15 RC0/T1OSO/T1CKI — Port C bit 0 / Timer1 oscillator output / Timer1 clock input
Pin 16 RC1/T1OSI/CCP2 — Port C bit 1 / Timer1 oscillator input / CCP2
Pin 17 RC2/CCP1 — Port C bit 2 / Capture/Compare/PWM 1
Pin 18 RC3/SCK/SCL — Port C bit 3 / SPI clock / I2C clock
Pin 19 RD0/PSP0 — Port D bit 0 / parallel slave port data bit 0
Pin 20 RD1/PSP1 — Port D bit 1 / parallel slave port data bit 1
Pin 21 RD2/PSP2 — Port D bit 2 / parallel slave port data bit 2
Pin 22 RD3/PSP3 — Port D bit 3 / parallel slave port data bit 3
Pin 23 RC4/SDI/SDA — Port C bit 4 / SPI data in / I2C data
Pin 24 RC5/SDO — Port C bit 5 / SPI data out
Pin 25 RC6/TX/CK — Port C bit 6 / USART TX / USART clock
Pin 26 RC7/RX/DT — Port C bit 7 / USART RX / USART data
Pin 27 RD4/PSP4 — Port D bit 4 / parallel slave port data bit 4
Pin 28 RD5/PSP5 — Port D bit 5 / parallel slave port data bit 5
Pin 29 RD6/PSP6 — Port D bit 6 / parallel slave port data bit 6
Pin 30 RD7/PSP7 — Port D bit 7 / parallel slave port data bit 7
Pin 31 VSS — Ground reference
Pin 32 VDD — Positive supply voltage (2.0V to 5.5V)
Pin 33 RB0/INT — Port B bit 0 / external interrupt input
Pin 34 RB1 — Port B bit 1
Pin 35 RB2 — Port B bit 2
Pin 36 RB3/PGM — Port B bit 3 / low-voltage programming input
Pin 37 RB4 — Port B bit 4
Pin 38 RB5 — Port B bit 5
Pin 39 RB6/PGC — Port B bit 6 / ICSP clock
Pin 40 RB7/PGD — Port B bit 7 / ICSP data

Typical Applications

PIC16F877-04I/P is suitable for 6 applications: Industrial Control and Sensor Interfacing, Motor Control with PWM and CCP Modules, Consumer Electronics and USART-Based Connectivity, Educational Platforms and Development Boards, Automotive Body Electronics (Legacy 12V Systems), Data Acquisition and Instrumentation Front-Ends.

🏭

Industrial Control and Sensor Interfacing

The PIC16F877-04I/P is well suited for industrial control panels and sensor-interface boards where its 10-bit 8-channel ADC, 33 digital I/O lines, and industrial -40C to +85C temperature grade match harsh-environment requirements. The 4 MHz clock provides ample throughput for sampling thermocouples, pressure transducers, and 4-20 mA loops at typical 10 Hz update rates. Designers commonly route analog inputs to RA0-RA5 for ADC and use RB0-RB7 for digital limit-switch polling. Compared to a PLC, the PIC16F877 cuts bill-of-materials cost by integrating ADC, PWM, USART, and EEPROM on a single die. The 40-pin PDIP remains the package of choice for through-hole industrial backplanes and screw-terminal daughter cards.

🏭

Motor Control with PWM and CCP Modules

The PIC16F877-04I/P drives brushed DC motors, small stepper motors, and servo valves via its two Capture/Compare/PWM (CCP) peripherals generating 10-bit PWM at the 4 MHz instruction rate. The PWM resolution and frequency can be software-tuned by setting Timer2 prescale and PR2 register values; a typical 1 kHz PWM at 10-bit resolution fits comfortably in firmware overhead. The 33 I/O pins accommodate H-bridge direction logic, encoder feedback, and end-stop limit switches. Industrial temperature grade -40C to +85C supports factory-floor ambient, while 2.0-5.5V operation tolerates unregulated 24V rails stepped down via a linear regulator. The 14 KB Flash holds state-machine code for closed-loop PID at kHz sample rates.

📱

Consumer Electronics and USART-Based Connectivity

The PIC16F877-04I/P provides USART and MSSP (SPI/I2C) peripherals for connecting consumer devices to displays, sensors, and Bluetooth/Wi-Fi modules. The 4 MHz clock supports 9600 baud UART comfortably, while the MSSP can drive I2C LCDs or SPI EEPROMs at full throughput. Typical designs use the USART to send telemetry over an HC-05 Bluetooth module or to debug-print firmware state during development. The 368-byte RAM buffers small UART packets, and the 14 KB Flash holds menu logic for consumer appliances. The 40-pin PDIP package suits hand-soldered prototypes and small-batch production runs typical of consumer electronics development labs.

🧩

Educational Platforms and Development Boards

The PIC16F877-04I/P is the canonical MCU of university embedded-systems curricula and Microchip's PICDEM development ecosystem due to its 40-pin PDIP footprint that drops into standard 0.6 inch wide DIP sockets and breadboards. The 33 I/O pins map cleanly to student-lab exercises covering GPIO, ADC, PWM, UART, I2C, and SPI without needing surface-mount soldering. The 4 MHz instruction rate keeps execution deterministic for teaching real-time scheduling. MPLAB X IDE, XC8 compiler, and PICkit programmers target this part natively, providing a complete free toolchain. The 14 KB Flash accommodates student projects of meaningful complexity while staying within programming-time budgets typical of one-semester labs.

🚗

Automotive Body Electronics (Legacy 12V Systems)

The PIC16F877-04I/P powers automotive body-control modules including interior lighting drivers, HVAC blend-door actuators, and mirror-control circuits in legacy 12V systems. The 2.0-5.5V supply operates from a regulated 5V rail after the vehicle's 12V battery, and the 33 I/O pins drive relays, MOSFET gates, and Hall-effect sensor inputs. The industrial -40C to +85C temperature grade covers cabin and engine-bay environments, though under-hood applications should use AEC-Q100-qualified PIC16 counterparts. The two CCP PWM modules drive DC motor speed and LED dimming, while the 10-bit ADC reads thermistor and potentiometer inputs. The 40-pin PDIP suits prototyping but production automotive designs typically migrate to PIC16F876A-I/SS or QFN equivalents.

📺

Data Acquisition and Instrumentation Front-Ends

The PIC16F877-04I/P serves as the front-end controller in low-cost data-acquisition systems, multiplexing up to 8 analog channels through its 10-bit ADC and streaming samples over UART to a host PC or embedded gateway. The 4 MHz clock drives successive-approximation ADC conversions at the datasheet-specified rate, and the 368-byte RAM holds small circular sample buffers. The MSSP peripheral reads external I2C sensors while the USART outputs formatted CSV data to a terminal. The 14 KB Flash fits firmware for channel scanning, calibration constants in EEPROM, and serial-protocol parsing. The 40-pin PDIP package and 5V-tolerant I/O simplify lab instrumentation where users may apply out-of-range analog signals that would damage 3.3V-only MCUs.

Recommended Products Summary

PIC16F887-I/P Microchip Technology Used in: Industrial Control and Sensor Interfacing, Motor Control with PWM and CCP Modules, Educational Platforms and Development Boards, Data Acquisition and Instrumentation Front-Ends MCP9700 analog temperature sensor for ADC input Used in: Industrial Control and Sensor Interfacing MAX485 RS-485 transceiver for industrial fieldbus Used in: Industrial Control and Sensor Interfacing PIC16F877A-I/P A-revision silicon with same CCP PWM capability Used in: Motor Control with PWM and CCP Modules, Consumer Electronics and USART-Based Connectivity, Automotive Body Electronics (Legacy 12V Systems) DRV8871 H-bridge motor driver companion Used in: Motor Control with PWM and CCP Modules HC-05 Bluetooth UART module for wireless connectivity Used in: Consumer Electronics and USART-Based Connectivity SSD1306 I2C OLED display driven via MSSP Used in: Consumer Electronics and USART-Based Connectivity PICkit 3 in-circuit debugger/programmer for ICSP Used in: Educational Platforms and Development Boards MPLAB X IDE free Microchip development environment Used in: Educational Platforms and Development Boards PIC16F876A-I/SS automotive-grade surface-mount variant Used in: Automotive Body Electronics (Legacy 12V Systems) VNQ660SP quad high-side driver for body loads Used in: Automotive Body Electronics (Legacy 12V Systems) MCP3421 external 18-bit ADC for higher-resolution channels Used in: Data Acquisition and Instrumentation Front-Ends FT232RL USB-UART bridge for PC connectivity Used in: Data Acquisition and Instrumentation Front-Ends
What is the maximum operating frequency of PIC16F877-04I/P?
The PIC16F877-04I/P runs at a maximum oscillator frequency of 4 MHz, with a 200 ns single-cycle instruction execution time. The "04" speed grade in the part number directly denotes this 4 MHz ceiling. According to the Microchip PIC16F877 datasheet, the 20 MHz speed grade (PIC16F877-20I/P) doubles throughput but requires higher supply current and may not be needed for slow control loops typical of sensor and motor applications.
How much program memory does PIC16F877-04I/P have?
The PIC16F877-04I/P contains 14 KB of Flash program memory organized as 8K x 14-bit words, paired with 368 bytes of RAM and 256 bytes of EEPROM. According to the Microchip datasheet, the 14-bit wide instruction word provides 35 single-word instructions, allowing compact code density that maximizes the usable Flash space. For applications needing more memory, the pin-compatible PIC16F887 offers 14 KB Flash plus extended peripherals.
Where can I buy PIC16F877-04I/P online?
The PIC16F877-04I/P is in stock at major authorized distributors including DigiKey (sku 281149) and Mouser, with 14 distributors listed on Octopart. As of 2026-09-21, unit pricing starts around $7.50 at qty 1, dropping to approximately $4.95 at 1000-piece quantities. Lead times are typically short for this mature industrial-temperature variant, although RoHS-compliant lead-free packaging may differ in stock availability from older leaded versions.
What is the lead time for PIC16F877-04I/P?
The PIC16F877-04I/P lead time is typically 8-12 weeks from Microchip authorized distributors as of 2026-09-21, reflecting the part's mature production status. DigiKey and Mouser frequently hold factory-fresh inventory in tube packaging for immediate shipment. For production volumes above 1000 units, contacting Microchip directly or authorized resellers yields the most accurate lead-time quote and volume pricing.
PIC16F877-04I/P vs PIC16F877A-I/P - which is better?
The PIC16F877-04I/P and PIC16F877A-I/P share the same 40-pin PDIP footprint, but the "A" revision adds 4 instruction words, deeper call stack, and slightly faster ADC conversion. For new designs, Microchip recommends the PIC16F877A as the recommended replacement. For drop-in legacy compatibility with older firmware, the original PIC16F877 remains preferable. Both parts share 14 KB Flash, 368 RAM, 256 EEPROM.
Is PIC16F877-04I/P still in production?
Yes, the PIC16F877-04I/P remains in active production by Microchip Technology with lifecycle status ACTIVE as of 2026-09-21. Microchip has historically supported the PIC16F877 family for over two decades due to its widespread adoption in industrial and educational applications. For new designs, Microchip recommends considering the PIC16F887 as a pin-compatible modern alternative with additional features.
What is the best drop-in replacement for PIC16F877-04I/P?
The best drop-in replacement is the PIC16F887-I/P, which shares the 40-pin PDIP footprint and is pin-to-pin compatible with the PIC16F877-04I/P while adding enhanced peripherals and improved ADC performance. According to the Microchip product page for PIC16F877, the PIC16F887 is officially recommended as a newer alternative. For exact firmware compatibility the PIC16F877A-I/P offers an "A" revision silicon update with minimal code changes.
Where to download PIC16F877-04I/P datasheet PDF?
The official PIC16F877-04I/P datasheet (218 pages, document 30292C) is available for download from Microchip's website at the product page URL listed on the manufacturer site, and from secondary distributors like alldatasheet.com. The datasheet includes full electrical characteristics, instruction set reference, peripheral driver examples, and timing diagrams for the ADC, USART, MSSP, and CCP modules.
What are the key specifications of PIC16F877-04I/P that engineers should know?
Critical specifications for the PIC16F877-04I/P: 8-bit PIC Harvard core, 4 MHz max clock (200 ns instruction cycle), 14 KB Flash program memory, 368 bytes RAM, 256 bytes EEPROM, 33 digital I/O pins across 5 ports, 10-bit 8-channel ADC, 2 CCP PWM modules, USART plus MSSP (SPI/I2C), 2.0-5.5V supply, industrial -40C to +85C temperature grade, 40-pin PDIP package. The "04" denotes 4 MHz and "I" denotes industrial temperature.
What is the operating voltage range of PIC16F877-04I/P?
The PIC16F877-04I/P operates from a single Vdd supply of 2.0 V to 5.5 V, with absolute maximum ratings of -0.3 V to +6.5 V on Vdd relative to Vss. According to the Microchip datasheet, the brown-out reset (BOR) circuit is configurable via configuration fuses and trips when Vdd falls below a programmable threshold. The wide 2.0-5.5V range allows direct battery operation from 2xAA cells or a regulated 5V rail.
When should I choose PIC16F877-04I/P over PIC16F887-I/P?
Choose the PIC16F877-04I/P over the PIC16F887-I/P only when maintaining exact register-level compatibility with legacy firmware is mandatory, since the original PIC16F877 instruction set and peripheral register map differ slightly from the "A" revision and PIC16F887. For new designs, the PIC16F887 is strictly better: same 40-pin PDIP, same Flash size, but enhanced peripherals, more PWM resolution, and active Microchip recommendation.
What is the best Microchip equivalent for PIC16F877-04I/P?
The best Microchip equivalent is the PIC16F887-I/P, officially recommended by Microchip as a drop-in replacement for the PIC16F877 family. It shares the 40-pin PDIP footprint, 14 KB Flash, 368 RAM, and same 5V-tolerant I/O. The PIC16F877A-I/P is another same-brand drop-in option with "A" revision silicon that fixes early- silicon errata while remaining code-compatible. Both share Microchip's PIC16 enhanced mid-range core architecture.
Is PIC16F877-04I/P suitable for new product designs in 2026?
While the PIC16F877-04I/P remains active in production and supported, Microchip recommends the PIC16F887 for new designs due to enhanced peripherals, lower power modes, and modern features. The original PIC16F877 is best suited for legacy designs, maintenance of existing products, educational use, and hobbyist breadboard projects where its 40-pin PDIP form factor and well-documented toolchain provide maximum convenience. Pricing as of 2026-09-21 favors the mature PIC16F877.
Can the PIC16F877-04I/P be programmed in-circuit?
Yes, the PIC16F877-04I/P supports In-Circuit Serial Programming (ICSP) via the RB6 (clock) and RB7 (data) pins, allowing firmware updates without removing the MCU from the PCB. According to the Microchip datasheet, ICSP requires Vdd within specification, MCLR held low then raised, and a programming voltage on the MCLR pin during high-voltage programming mode. The ICSP interface is shared with the ICD (In-Circuit Debugger) for development use.

Engineering reference data for PIC16F877-04I/P — comparison, design guidance, and compliance information.

Selection Guide

Choose the PIC16F877-04I/P when you need a mature, well-documented 8-bit MCU with 14 KB Flash, 368 RAM, 256 EEPROM, 33 I/O, and a 40-pin PDIP through-hole footprint for breadboarding, educational use, or legacy industrial designs. The 4 MHz clock is sufficient for sensor sampling, slow control loops, and UART communication below 115200 baud. Choose the PIC16F887-I/P for new designs where Microchip's official recommended successor offers enhanced peripherals. Choose the PIC16F877A-I/P when maintaining exact A-revision silicon compatibility with existing firmware. Choose the PIC16F877-20I/P when 5x faster throughput is needed for high-speed ADC or PWM. All listed alternatives share the same 40-pin PDIP footprint for PCB layout reuse.

Comparison with Alternatives

Parameter This Product PIC16F877-04I/PT PIC16F877A-I/P PIC16F887-I/P PIC16F877-20I/P PIC16F874-04I/P
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Package 40-pin PDIP 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same
Program Memory (Flash) 14 KB 14 KB 14 KB 14 KB 14 KB 7 KB (-50%)
Maximum Clock Frequency 4 MHz 4 MHz 20 MHz 20 MHz 20 MHz (5x faster) 4 MHz
Data RAM 368 bytes 368 bytes 368 bytes 368 bytes 368 bytes 192 bytes (-48%)
Data EEPROM 256 bytes 256 bytes 256 bytes 256 bytes 256 bytes 128 bytes (-50%)
ADC Channels 8 channels, 10-bit 8 channels, 10-bit 8 channels, 10-bit (improved) 14 channels, 10-bit 8 channels, 10-bit 8 channels, 10-bit
Operating Temperature -40C to +85C (industrial) -40C to +85C -40C to +85C -40C to +85C -40C to +85C -40C to +85C
Lifecycle Status Active Active Active Active (recommended) Active Active

Key Differentiators

  • Canonical 40-pin PDIP educational and legacy MCU (vs PIC16F887-I/P)
  • Speed grade matched to low-power industrial applications (vs PIC16F877-20I/P)
  • Industrial -40C to +85C temperature grade (vs PIC16F874-04I/P)

Design Notes

Place a 100 nF ceramic decoupling capacitor within 5 mm of each Vdd pin (pins 11 and 32 on the 40-pin PDIP) with a short, wide trace to Vss. For designs with significant digital switching noise, add a 10 uF tantalum or ceramic bulk capacitor on the supply rail near the MCU. The PIC16F877-04I/P operates from 2.0 V to 5.5 V; a regulated 5V rail from an MC78M05 or equivalent is recommended for noisy industrial environments. Estimated: at 4 MHz clock and 5V supply, typical I_dd is approximately 2-5 mA, requiring negligible heatsinking in PDIP.

Configure the MCLR pin (pin 1) with a 10 kohm pull-up to Vdd and a 100 nF capacitor to Vss for proper reset behaviour; leaving MCLR floating can cause intermittent resets in noisy environments. For ICSP programming, isolate the MCLR pull-up with a series resistor so the programmer can drive MCLR low during programming. The CONFIG register must be programmed with the correct oscillator mode (HS, XT, or RC for the 4 MHz speed grade) and watchdog timer setting before the first instruction executes.

The 40-pin PDIP occupies 0.600 inch row spacing; route power and ground on opposite sides of the package for clean signal integrity. Keep the analog traces (RA0-RA5, RE0-RE2) short and away from digital switching signals to minimize ADC crosstalk; a ground pour under the analog section improves noise rejection. The OSC1/OSC2 crystal traces (pins 13-14) should be as short as possible with the crystal load capacitors (typically 15-33 pF) placed within 5 mm of the oscillator pins.

For 4 MHz operation with a 4 MHz crystal or ceramic resonator, use a 22 pF load capacitor pair; for HS-mode 20 MHz operation, reduce to 15 pF. The I2C bus pins (RC3/SCL, RC4/SDA) require external pull-up resistors (typically 4.7 kohm at 5V, 100 kHz bus speed). The PGC/PGD pins (RB6/RB7) used for ICSP should not be permanently pulled low by external circuitry during programming; design with a current-limiting resistor or buffer if peripheral sharing is required.

Compliance Information

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

RoHS-compliant lead-free PDIP package per Microchip product page. Not AEC-Q100 qualified - choose PIC16F876A automotive-grade variant for under-hood automotive applications. Industrial temperature grade -40C to +85C.

Data verified on: 2026-09-21 — data verified and curated by XAIPART's component engineering team

Related Searches

PIC16F877-04I/P PIC16F877-04I/P datasheet Microchip PIC16F877 40-pin PDIP 8-bit MCU 14KB Flash 368 RAM PIC16F877 pinout 40-pin DIP PIC16F877 industrial motor control PWM PIC16F877 vs PIC16F887 PIC16F877-04I/P drop-in replacement buy PIC16F877-04I/P online PIC16F877 ICSP programming tutorial PIC16F877 ADC 10-bit 8 channel PIC16F877 educational development board

Related Components & Terms

Microchip Technology PIC16F877-04I/P PIC16F877 PIC16F877A PIC16F887 PIC16F874 PIC16F family 8-bit microcontroller MCU PIC Harvard architecture Flash memory EEPROM RAM 10-bit ADC CCP PWM USART MSSP SPI I2C ICSP PDIP-40 through-hole RoHS industrial temperature grade AEC-Q100
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