PIC16F877-04/L - 4MHz 8-Bit Flash MCU, 14KB, 44-PLCC | Microchip
MPN: PIC16F877-04/L ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $5.95 | $5.95 |
| 10 | $5.36 | $53.60 |
| 100 | $4.77 | $477.00 |
| 500 | $4.29 | $2,145.00 |
| 1,000 | $3.82 | $3,820.00 |
PIC16F877-04/L Overview
An 8-bit microcontroller (MCU) is a single-chip computer that contains a CPU, program memory, data RAM, and a fixed set of peripherals, all accessed through a unified instruction set. The PIC16F877 family belongs to Microchip's mid-range PIC architecture, sitting hierarchically between the baseline PIC10/12/16 families and the high-performance PIC18/dsPIC families. PIC16F MCUs are widely used because they offer Harvard-architecture efficiency with only 35 single-word instructions, allowing deterministic timing for embedded control tasks. The 'F' suffix indicates Flash program memory, which supports in-circuit serial programming (ICSP) for field upgrades.
Key features include an 8-channel, 10-bit Analog-to-Digital Converter (ADC), two 8-bit timers plus one 16-bit timer, two Capture/Compare/PWM (CCP) modules, a Watchdog Timer (WDT) with its own on-chip RC oscillator, and a Synchronous Serial Port configurable as either SPI or I²C. The PIC16F877 also implements In-Circuit Debugger (ICD) support, simplifying firmware development on the production hardware. According to the Microchip product page, the device is recommended for new designs to migrate to the PIC16F887 or PIC16F877A, although the PIC16F877-04/L remains in active production for legacy systems.
The architecture uses a Harvard memory layout with a 14-bit instruction word and a separate 8-bit data bus, achieving deterministic interrupt latency ideal for motor control and real-time I/O. The 10-bit ADC runs up to 8 channels with selectable reference voltages, providing acquisition-and-conversion throughput adequate for environmental and instrumentation sensor reads. Five I/O ports allow the MCU to drive up to 33 general-purpose signals, plus dedicated analog inputs, capture inputs, and PWM outputs.
Typical applications include industrial automation controllers (sensor interfacing and relay driving), consumer appliance control panels (washing machines, HVAC), automotive body electronics (interior lighting, mirror control), and educational/development platforms due to its breadboard-friendly legacy. The 44-PLCC package suits socketed prototyping, allowing fast field replacement without soldering.
When designing with the PIC16F877-04/L, ensure the system clock does not exceed 4 MHz, and apply Microchip's recommended decoupling (0.1 µF ceramic plus 10 µF bulk) on VDD. Designers targeting extended temperature ranges should select the -I or -E suffix industrial-grade variants rather than the -04/L grade, which is commercial temperature rated.
This page synthesizes distributor pricing, parametric comparisons, and practical engineering notes that complement the manufacturer's datasheet, helping procurement and design engineers select, source, and apply this legacy PIC microcontroller confidently.
Drop-in alternatives for PIC16F877-04/L — 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-04/L (same form factor and footprint) — differing in Package, ADC, Timers, Program Memory Size, Serial Interfaces.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F877A-I/L
✅ Drop-In✓ In Stock
$7.12 / Unit
View Datasheet →PIC16F887-I/L
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F877-04/PQ
✅ Drop-In✓ In Stock
$5.7 / Unit
View Datasheet →PIC16F877-04/PT
✅ Drop-In✓ In Stock
$5.2 / Unit
View Datasheet →PIC16C77-20I/L
✅ Drop-In✓ In Stock
$4.1 / Unit
View Datasheet →PIC18F4550-I/L
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874A-I/PQ
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F877-04/L Maximum Ratings & Electrical Characteristics
| Architecture | PIC 16-bit instruction word, 8-bit data path (Harvard) |
| Core | 8-bit PIC16 mid-range MCU |
| Instruction Set | 35 single-word instructions |
| Instruction Cycle Time | 200 ns @ 4 MHz |
| Program Memory | 14 KB (8K x 14) Flash |
| Data RAM | 368 bytes |
| Data EEPROM | 256 bytes |
| Digital I/O Pins | 33 (PORTA–PORTE) |
| ADC | 8 channels, 10-bit resolution |
| Timers | Two 8-bit + One 16-bit + WDT |
| CCP Modules | 2 (Capture/Compare/PWM) |
| Serial Interfaces | 1 x SPI / I²C (MSSP) |
| In-Circuit Debug | ICD supported |
| Package | 44-PLCC (16.59 x 16.59 mm) |
| Operating Temperature | 0°C to +70°C (commercial) |
| Mounting Type | Surface Mount (PLCC socket) |
PIC16F877-04/L Pin Configuration
| Pin 1 | MCLR/VPP — Master clear reset input / ICSP programming voltage |
| 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 2 / ADC negative reference |
| Pin 5 | RA3/AN3/VREF+ — PORTA bit 3 / analog input 3 / ADC positive reference |
| Pin 6 | RA4/T0CKI — PORTA bit 4 / Timer0 clock input (open-drain) |
| Pin 7 | RA5/AN4/SS — PORTA bit 5 / analog input 4 / SPI slave select |
| Pin 8 | RE0/RD/AN5 — PORTE bit 0 / read control for parallel port / analog input 5 |
| Pin 9 | RE1/WR/AN6 — PORTE bit 1 / write control for parallel port / analog input 6 |
| Pin 10 | RE2/CS/AN7 — PORTE bit 2 / chip select for parallel port / analog input 7 |
| Pin 11 | VDD — +5 V digital supply |
| Pin 12 | VSS — Digital ground |
| Pin 13 | OSC1/CLKIN — Oscillator crystal input / external clock in |
| Pin 14 | OSC2/CLKOUT — Oscillator crystal output / clock out (Fosc/4) |
| 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 / CCP2 output |
| Pin 17 | RC2/CCP1 — PORTC bit 2 / CCP1 output capture/compare/PWM |
| Pin 18 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I²C clock |
| Pin 19 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I²C data |
| Pin 20 | RC5/SDO — PORTC bit 5 / SPI data out |
| Pin 21 | RC6/TX/CK — PORTC bit 6 / USART transmit / synchronous clock |
| Pin 22 | RC7/RX/DT — PORTC bit 7 / USART receive / synchronous data |
| Pin 23 | VSS — Digital ground |
| Pin 24 | RD0/PSP0 — PORTD bit 0 / parallel slave port bit 0 |
| Pin 25 | RD1/PSP1 — PORTD bit 1 / parallel slave port bit 1 |
| Pin 26 | RD2/PSP2 — PORTD bit 2 / parallel slave port bit 2 |
| Pin 27 | RD3/PSP3 — PORTD bit 3 / parallel slave port bit 3 |
| Pin 28 | RD4/PSP4 — PORTD bit 4 / parallel slave port bit 4 |
| Pin 29 | RD5/PSP5 — PORTD bit 5 / parallel slave port bit 5 |
| Pin 30 | RD6/PSP6 — PORTD bit 6 / parallel slave port bit 6 |
| Pin 31 | RD7/PSP7 — PORTD bit 7 / parallel slave port bit 7 |
| Pin 32 | VSS — Digital ground |
| Pin 33 | RB0/INT — PORTB bit 0 / external interrupt input |
| Pin 34 | RB1 — PORTB bit 1 |
| Pin 35 | RB2 — PORTB bit 2 |
| Pin 36 | RB3/PGM — PORTB bit 3 / low-voltage ICSP programming |
| Pin 37 | RB4 — PORTB bit 4 |
| Pin 38 | RB5 — PORTB bit 5 |
| Pin 39 | RB6/PGC — PORTB bit 6 / ICSP clock |
| Pin 40 | RB7/PGD — PORTB bit 7 / ICSP data |
| Pin 41 | VSS — Digital ground |
| Pin 42 | VDD — +5 V digital supply |
| Pin 43 | NC — Not connected (per datasheet) |
| Pin 44 | NC — Not connected (per datasheet) |
Typical Applications
PIC16F877-04/L is suitable for 7 applications: Industrial Sensor Acquisition Panels, Consumer Appliance Control Boards, Automotive Body Electronics, Educational Development Boards, HVAC and Building Automation, Legacy System Maintenance and Field Replacement, Data Acquisition and Instrumentation.
Industrial Sensor Acquisition Panels
The PIC16F877-04/L fits industrial sensor acquisition panels because its 8-channel, 10-bit ADC supports multiple analog sensor inputs simultaneously, while the 33 I/O pins drive relays, optocouplers, and front-panel LEDs without multiplexing. At 4 MHz the 200 ns instruction cycle gives deterministic timing for polling loops running up to 5 MIPS, sufficient to scan 4–20 mA loop sensors, RTDs, and digital encoders every 5 ms. Designers pair the PIC16F877-04/L with the MCP2551 CAN transceiver for fieldbus nodes, or with the 24LC256 EEPROM for non-volatile calibration storage. The 256 bytes of on-chip EEPROM lets the panel store probe offsets persistently, and the MSSP-configurable SPI/I²C bus interfaces to ADCs and DACs from the same code base.
Recommended
Consumer Appliance Control Boards
The PIC16F877-04/L is widely used in consumer appliance control boards (washing machines, dishwashers, HVAC thermostats) where its 33 I/O lines drive seven-segment displays, keypads, and triac outputs simultaneously. The two CCP modules generate zero-cross detection timing for triac phase-angle control on heater elements, while the 16-bit timer captures zero-cross edges for precise half-cycle timing. At 4 MHz the MCU completes standard control loops inside a single 50/60 Hz half-cycle (8.33/10 ms), allowing direct mains-synchronous control without RTOS overhead. The PLCC socket allows manufacturers to swap firmware revisions during production without reworking the assembly line.
Recommended
Automotive Body Electronics
For automotive body electronics (interior lighting, mirror control, seat modules), the PIC16F877-04/L provides enough I/O to drive multiple LED chains and PWM-controlled mirror actuators. Its two CCP modules output PWM to headlamp-level motors and mirror-adjust DC motors simultaneously. The MSSP SPI/I²C interfaces to body controllers and LIN transceivers. Note that the commercial temperature range (0°C to +70°C) of the -04/L means automotive designs under the hood should use the PIC16F877A-I/L industrial-temperature variant instead. The PLCC package allows service-depot MCU replacement in legacy vehicles where supply chain continuity for automotive grade parts is unreliable.
Recommended
Educational Development Boards
The PIC16F877-04/L remains a favorite for educational development boards and university curricula because the PLCC package fits a low-cost socket, allowing students to reuse the MCU across multiple lab exercises. The 14 KB Flash holds large firmware examples (interrupt-driven ADC, UART printf, I²C master/slave), while 368 bytes of RAM is sufficient for stack-heavy recursive algorithms. The ICD interface supports MPLAB X IDE and ICD 3/4 programmers, simplifying student debugging workflows. MPLAB X provides free C and assembly toolchains that target the PIC16F877 directly, including software UART libraries and ADC driver templates.
Recommended
HVAC and Building Automation
The PIC16F877-04/L fits HVAC and building automation controllers where its 8-channel ADC reads thermistor temperature sensors, humidity probes, and CO₂ sensor outputs concurrently. The 33 I/O lines drive blower relay control, damper actuators, and LED status displays while the MSSP SPI/I²C interfaces to digital temperature/humidity sensors like the MCP9808. The 14 KB Flash holds the entire HVAC control algorithm including PID loops and fault-history tables, while the on-chip 256-byte EEPROM logs fault codes that survive power-cycling. Designers can add a UART-based RS-485 transceiver (MCP2515, MAX485) for BACnet or Modbus RTU gateway nodes.
Recommended
Legacy System Maintenance and Field Replacement
The PIC16F877-04/L is the specified service part for many industrial controllers and factory automation systems originally built in the 2000s. Field service technicians replace failed PLCC-socketed MCUs without soldering, preserving the original PCB design. With Microchip's life-cycle status still ACTIVE, the -04/L is reliably available through authorized distributors with 4–6 week lead time on bulk orders. The PLCC socket in existing equipment standardizes around JEDEC MS-018, making the PIC16F877-04/L a turnkey repair part for legacy machine builders.
Recommended
Data Acquisition and Instrumentation
For low-speed data acquisition and instrumentation, the PIC16F877-04/L offers sufficient ADC throughput (8 channels @ 10 bits) for multi-channel sensor logging at 1 kHz aggregate sample rates. At 4 MHz the ADC acquisition time fits within the recommended 1.6 µs window for 10-bit conversions without loss of linearity. The 14 KB Flash holds the data logger firmware, while 256 bytes of EEPROM store calibration constants and 368 bytes of RAM buffer small logging bursts before flush to an external SD card via SPI. Engineers pair the PIC16F877-04/L with the MCP3201 (12-bit ADC upgrade) and 23LC1024 SRAM buffer for low-cost, multi-channel USB/COM-based loggers.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F877-04/L — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F877A-I/L | PIC16F887-I/L | PIC16F877-04/PT | PIC18F4550-I/L |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-PLCC (16.59 x 16.59 mm) | 44-PLCC - identical | 44-PLCC - identical | 44-TQFP - different footprint | 44-PLCC - identical |
| Max Clock Frequency | 4 MHz | 20 MHz (+400%) | 20 MHz (+400%) | 4 MHz | 48 MHz (+1100%) |
| Program Memory | 14 KB Flash | 14 KB Flash | 14 KB Flash | 14 KB Flash | 32 KB Flash (+129%) |
| Data RAM | 368 bytes | 368 bytes | 368 bytes | 368 bytes | 2048 bytes (+456%) |
| Data EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes |
| ADC Resolution | 10-bit | 10-bit | 11-bit (enhanced) | 10-bit | 10-bit / 12-bit (enhanced) |
| Digital I/O | 33 | 33 | 36 | 33 | 35 |
| USB Support | None | None | None | None | USB 2.0 Full-Speed OTG |
| Instruction Word | 14-bit (mid-range PIC) | 14-bit | 14-bit | 14-bit | 16-bit (PIC18) |
| Temperature Range | 0°C to +70°C (commercial) | -40°C to +85°C (industrial) | -40°C to +85°C | 0°C to +70°C | -40°C to +85°C |
| Unit Price (qty 1) | $5.95 | ~$7.20 (+21%) | ~$3.20 (-46%) | ~$5.85 | ~$8.50 (+43%) |
Key Differentiators
- Original legacy 4 MHz grade in PLCC socket-friendly package (vs PIC16F877A-I/L)
- Lowest-cost 4 MHz option in the PIC16F87x family (vs PIC16F887-I/L)
- Commercial temperature rated, full datasheet characterization at 4 MHz (vs PIC16F877-04/P (PDIP-40))
Design Notes
Estimated: The PIC16F877-04/L in commercial temperature grade is rated for 0°C to +70°C operation. In a sealed enclosure without airflow, internal ambient rise above the rating may occur above ~70 mA I/O load with simultaneous ADC sampling. For industrial deployments, switch to the PIC16F877A-I/L variant rated for -40°C to +85°C. PLCC packages have an exposed pad beneath the chip carrier that conducts heat into the PCB copper pour; increasing top-side copper area around pins 41–44 (the VSS/VDD pair) reduces junction-to-ambient thermal resistance by roughly 15–20%.
Place a 0.1 µF ceramic decoupling capacitor within 5 mm of pins 11 and 12 (VDD/VSS pair), and a bulk 10 µF tantalum or aluminum polymer capacitor on each VDD/VSS pin pair on the package (pins 11/12, 23/24, 32/33, 41/42). The PIC16F877-04/L has four VDD pins and four VSS pins (see pinout) and decoupling each pair isolates analog and digital noise. Keep the oscillator crystal traces to pins 13 and 14 short (under 10 mm) and ground-guard both sides to suppress CMOS clock noise.
Do not assume the PIC16F877-04/L can be driven at 20 MHz - it is the 4 MHz speed grade and operation above 4 MHz is not guaranteed. The speed grade is the dash number (-04 = 4 MHz, -10 = 10 MHz, -20 = 20 MHz). The PLCC package does not provide low thermal resistance; high PWM duty cycles driving heavy loads can push junction temperature above rated limits even in commercial temperature ranges. Always include an external watchdog or ensure the internal WDT is enabled for unattended embedded designs.
Route the ICSP signals (MCLR/VPP at pin 1, PGC at pin 39, PGD at pin 40) to a programming header that is accessible without disassembling the enclosure. Reserve a 6-pin 0.1 inch header footprint even if not populated in production. Route analog inputs (RA0–RA5, RE0–RE2) away from PWM outputs (RC1/RC2) to prevent digital switching noise from coupling into ADC measurements. The ADC noise performance degrades noticeably if analog traces are length-matched to clock traces within ±10 mm.
Compliance Information
RoHS and REACH compliance confirmed via Microchip product page; AEC-Q100 not qualified for automotive under-hood. The /L industrial-trailing suffix is a package specifier, not an automotive grade - for AEC-Q100 use PIC16F877A-I/PQ or PIC16F877AT-I/PT automotive variants.