PIC16F877-20I/L - 8-Bit 20MHz 14KB Flash MCU 44-PLCC | Microchip
MPN: PIC16F877-20I/L β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $14.3 | $14.30 |
| 10 | $12.85 | $128.50 |
| 100 | $11.4 | $1,140.00 |
| 500 | $10.2 | $5,100.00 |
| 1,000 | $9.05 | $9,050.00 |
PIC16F877-20I/L Overview
Key features include 33 digital I/O pins, a 10-bit 8-channel Analog-to-Digital Converter (ADC), two 8-bit and one 16-bit timers, two capture/compare/PWM modules, a USART, an MSSP (SPI/I2C) port, a Parallel Slave Port, and a watchdog timer with its own on-chip RC oscillator. The Harvard architecture with separate program and data buses enables single-cycle instruction execution for most opcodes, and only 35 single-word instructions are required to learn the entire instruction set.
The PIC16F877 belongs to the PIC16F mid-range family, which sits hierarchically below the PIC18F (enhanced 8-bit) and above the PIC12F/PIC10F baseline families. Its successor recommended by Microchip is the PIC16F887, which retains pin compatibility while adding twice the program memory (14 KB) and a 14-bit ADC. The device supports in-circuit serial programming (ICSP) and in-circuit debugging via two I/O lines, enabling low-cost development with tools like PICkit and MPLAB ICD.
The "-20" suffix denotes the 20 MHz maximum operating frequency, while "I" indicates the industrial operating temperature grade of -40C to +85C. The "/L" package code designates the leaded PLCC-44 (J-Lead) form factor with socket compatibility for legacy through-hole designs, instrumentation, and industrial control boards. The 20 MHz oscillator drives a 4-phase clock that effectively delivers 5 MIPS of throughput, sufficient for closed-loop control, sensor sampling, and serial-protocol bridging.
Typical applications include industrial automation controllers, HVAC thermostats, data acquisition front-ends, motor control for small BLDC and stepper drivers, educational development boards, and consumer appliance control panels. The large 33-I/O count allows direct interface to keypads, LCD character modules, EEPROMs, and 4-20 mA sensor front-ends without external logic.
When designing with this part, ensure the oscillator configuration bits (HS, XT, LP, RC) match the external resonator or crystal you intend to use. Brown-out detect (BOR) and low-voltage programming (LVP) configuration bits must be set correctly to avoid intermittent reset behavior. Place decoupling capacitors (100 nF + 10 uF bulk) within 5 mm of VDD/VSS pins.
This page synthesizes distributor pricing from DigiKey, Mouser, LCSC, and Octopart, drop-in replacement candidates from Microchip's PIC16F family, and practical design notes not found in the standalone datasheet PDF.
Drop-in alternatives for PIC16F877-20I/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-20I/L (same form factor and footprint) β differing in Package, Core Architecture, Operating Temperature, Watchdog Timer, Timers.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F877-20/L
β Drop-Inβ In Stock
$4.85 / Unit
View Datasheet βPIC16F877-20/PT
β Drop-Inπ Reference alternative (not in catalog)
PIC16F877A-I/L
β Drop-In β οΈ εζ°εΎ ιͺθ―β In Stock
$7.12 / Unit
View Datasheet βPIC16F877-04I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F887-I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC18F452-I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F877-20I/L Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16F (8-bit Harvard RISC) |
| Program Memory (Flash) | 14 KB (8K x 14 words) |
| Data SRAM | 368 bytes |
| Data EEPROM | 256 bytes |
| Maximum CPU Frequency | 20 MHz |
| Instruction Execution Time | 200 ns (single cycle) |
| Digital I/O Pins | 33 |
| ADC | 10-bit, 8 channels |
| Timers | 2 x 8-bit + 1 x 16-bit |
| CCP Modules | 2 |
| Communication | USART, MSSP (SPI/I2C), PSP |
| Operating Voltage | 2.0 V to 5.5 V |
| Operating Temperature | -40C to +85C (Industrial) |
| Package | 44-pin PLCC (J-Lead, 16.59x16.59 mm) |
| Mounting Type | Surface Mount (PLCC socket compatible) |
| Watchdog Timer | Yes (with dedicated on-chip RC) |
| In-Circuit Programming | ICSP, ICD support |
| Instruction Set Size | 35 single-word instructions |
| RoHS Status | Compliant (verify with datasheet) |
PIC16F877-20I/L Pin Configuration
| Pin 1 | MCLR/VPP β Master Clear (reset) input / programming voltage |
| Pin 2 | RA0/AN0 β PORTA bit 0 / analog input 0 |
| Pin 3 | RA1/AN1 β PORTA bit 1 / analog input 1 |
| Pin 4 | RA2/AN2 β PORTA bit 2 / analog input 2 |
| Pin 5 | RA3/AN3/VREF+ β PORTA bit 3 / analog input 3 / ADC VREF+ |
| Pin 6 | RA4/T0CKI β PORTA bit 4 / Timer0 clock input |
| Pin 7 | RA5/AN4/SS β PORTA bit 5 / analog input 4 / SPI slave select |
| Pin 8 | RE0/RD/AN5 β PORTE bit 0 / parallel slave port read / analog input 5 |
| Pin 9 | RE1/WR/AN6 β PORTE bit 1 / parallel slave port write / analog input 6 |
| Pin 10 | RE2/CS/AN7 β PORTE bit 2 / parallel slave port chip select / analog input 7 |
| Pin 11 | VDD β Positive supply voltage (+5V typical) |
| Pin 12 | VSS β Ground reference |
| Pin 13 | OSC1/CLKIN β Oscillator crystal input / external clock in |
| Pin 14 | OSC2/CLKOUT β Oscillator crystal output / clock out |
| Pin 15 | RC0/T1OSO/T1CKI β PORTC bit 0 / Timer1 oscillator output / Timer1 clock |
| Pin 16 | RC1/T1OSI/CCP2 β PORTC bit 1 / Timer1 oscillator input / CCP2 |
| Pin 17 | RC2/CCP1 β PORTC bit 2 / CCP1 PWM output |
| Pin 18 | RC3/SCK/SCL β PORTC bit 3 / SPI clock / I2C clock |
| Pin 19 | RD0/PSP0 β PORTD bit 0 / parallel slave port data bit 0 |
| Pin 20 | RD1/PSP1 β PORTD bit 1 / parallel slave port data bit 1 |
| Pin 21 | RD2/PSP2 β PORTD bit 2 / parallel slave port data bit 2 |
| Pin 22 | RD3/PSP3 β PORTD bit 3 / parallel slave port data 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 transmit / USART clock |
| Pin 26 | RC7/RX/DT β PORTC bit 7 / USART receive / USART data |
| Pin 27 | RD4/PSP4 β PORTD bit 4 / parallel slave port data bit 4 |
| Pin 28 | RD5/PSP5 β PORTD bit 5 / parallel slave port data bit 5 |
| Pin 29 | RD6/PSP6 β PORTD bit 6 / parallel slave port data bit 6 |
| Pin 30 | RD7/PSP7 β PORTD bit 7 / parallel slave port data bit 7 |
| Pin 31 | VSS β Ground reference (second pin) |
| Pin 32 | VDD β Positive supply voltage (second pin) |
| Pin 33 | RB0/INT β PORTB bit 0 / external interrupt 0 |
| Pin 34 | RB1 β PORTB bit 1 |
| Pin 35 | RB2 β PORTB bit 2 |
| Pin 36 | RB3/PGM β PORTB bit 3 / low-voltage 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 | NC β Not connected (per datasheet) |
| Pin 42 | NC β Not connected (per datasheet) |
| Pin 43 | NC β Not connected (per datasheet) |
| Pin 44 | NC β Not connected (per datasheet) |
Typical Applications
PIC16F877-20I/L is suitable for 6 applications: Industrial Automation Controllers, HVAC Thermostat and Sensor Hub, Data Acquisition Front-End, Educational Development Boards, Small Motor and Stepper Driver Controller, Consumer Appliance Control Panels.
Industrial Automation Controllers
The PIC16F877-20I/L fits industrial PLC and process-control front-ends because of its 33 digital I/O and integrated 10-bit ADC in a single PLCC-44 IC. With 20 MHz CPU clock delivering 5 MIPS throughput, it can scan digital inputs, drive relays and triacs, and sample analog process variables within a 10 ms loop typical of industrial control. Its industrial -40C to +85C temperature rating supports factory-floor enclosures without derating. The integrated USART and MSSP allow direct connection to RS-485 transceivers and I2C sensor arrays, reducing external component count. Legacy PLC designs using PIC16F877 have decades of validated firmware, and Microchip continues to ship this part for industrial maintenance.
Recommended
HVAC Thermostat and Sensor Hub
The PIC16F877-20I/L is well-suited to HVAC thermostat designs where multiple analog temperature sensors, a keypad, and an LCD character display are multiplexed across PORTB, PORTC, and PORTE. Its 8-channel 10-bit ADC samples thermistor bridges and setpoint potentiometers at adequate resolution, while the 33 I/O drive LCD data lines, relay coils, and triac optocouplers directly. The 256-byte EEPROM stores user setpoints and calibration values across power cycles. Industrial temperature grade supports equipment-room mounting. The USART interfaces to a Modbus or BACnet module for building-automation integration.
Recommended
Data Acquisition Front-End
The PIC16F877-20I/L functions as a low-cost 8-channel data-acquisition front-end by leveraging its integrated 10-bit ADC and 33 I/O for triggering and channel multiplexing. At 20 MHz the ADC can run at the recommended Fosc/32 conversion clock, sampling each channel at roughly 50 kSPS aggregate. The MSSP port streams acquisition data over SPI to a host PC or co-processor, while the USART provides an alternative asynchronous channel. On-chip 256-byte EEPROM logs calibration coefficients, and the 14 KB Flash stores local DSP-style averaging routines. Industrial temperature grade suits laboratory and field-instrument enclosures.
Recommended
Educational Development Boards
The PIC16F877-20I/L is a canonical teaching MCU on university microcontroller courses thanks to its 44-pin PLCC socket compatibility (easy to swap damaged parts during labs), 20 MHz CPU clock (fast enough for real-time demonstrations), and 14 KB Flash supporting multi-module firmware examples. The 33 I/O map cleanly to breadboard-friendly breakout boards with LEDs, pushbuttons, potentiometers, and UART-to-USB bridges. The 35-instruction RISC set is small enough to teach assembly in a single semester while remaining practical. MPLAB X IDE, XC8 compiler, and PICkit programmers support it fully, making PIC16F877 a stable reference platform for embedded education.
Recommended
Small Motor and Stepper Driver Controller
The PIC16F877-20I/L drives small DC motors, unipolar steppers, and BLDC sensorless controllers using its two CCP modules for PWM generation and the 16-bit Timer1 for commutation timing. With 20 MHz CPU clock the PWM frequency can be set above 20 kHz to keep switching above the audible range, while the 10-bit ADC reads back current-sense amplifiers for closed-loop torque control. The 33 I/O map easily to gate-driver enable lines, Hall-sensor inputs, and direction-control pins. Industrial temperature rating supports under-hood automotive aftermarket and appliance motor-control applications.
Recommended
Consumer Appliance Control Panels
The PIC16F877-20I/L fits washing-machine, dishwasher, and microwave control panels where a 33-I/O MCU scans a keypad, drives 7-segment or character LCD indicators, and toggles triac outputs for heater and motor relays. The 256-byte EEPROM retains user cycle settings, and the 14 KB Flash stores appliance-specific state machines. The USART interfaces to a wireless module for smart-appliance retrofit, while the MSSP drives an I2C real-time clock for cycle timing. The industrial temperature grade supports the elevated ambient inside appliance cabinets, and the PLCC-44 socket simplifies field service.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F877-20I/L β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F877-20/L | PIC16F877-20/PT | PIC16F877A-I/L | PIC16F877-04I/L | PIC16F887-I/L | PIC18F452-I/L |
|---|---|---|---|---|---|---|---|
| Package | 44-PLCC (J-Lead) | 44-PLCC (J-Lead) - same | 44-TQFP | 44-PLCC (J-Lead) - same | 44-PLCC (J-Lead) - same | 44-PLCC (J-Lead) - same | 44-PLCC (J-Lead) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Max CPU Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 4 MHz | 20 MHz | 40 MHz |
| Flash Memory | 14 KB | 14 KB | 14 KB | 14 KB | 14 KB | 14 KB | 32 KB |
| RAM | 368 B | 368 B | 368 B | 368 B | 368 B | 368 B | 1536 B |
| EEPROM | 256 B | 256 B | 256 B | 256 B | 256 B | 256 B | 256 B |
| Digital I/O | 33 | 33 | 33 | 33 | 33 | 36 | 34 |
| ADC Resolution | 10-bit, 8 ch | 10-bit, 8 ch | 10-bit, 8 ch | 10-bit, 8 ch | 10-bit, 8 ch | 14-bit, 14 ch | 10-bit, 8 ch |
| Operating Temperature | -40C to +85C | 0C to +70C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
| Architecture / Family | PIC16F (mid-range 8-bit) | PIC16F (mid-range 8-bit) | PIC16F (mid-range 8-bit) | PIC16F (mid-range 8-bit) | PIC16F (mid-range 8-bit) | PIC16F (mid-range 8-bit) | PIC18F (enhanced 8-bit) |
Key Differentiators
- Highest CPU throughput in PIC16F877 family (vs PIC16F877-04I/L)
- Industrial temperature range vs commercial (vs PIC16F877-20/L)
- Official Microchip pin-compatible successor with same footprint (vs PIC16F887-I/L)
Design Notes
Estimated: Power-supply decoupling for the PIC16F877-20I/L requires a 100 nF ceramic capacitor placed within 5 mm of each VDD/VSS pair (the device has two VDD pins at 11 and 32, and two VSS pins at 12 and 31). Add a single 10 uF bulk tantalum or aluminum-polymer capacitor near the IC for transient load events. According to the Microchip datasheet DS30292, in-circuit serial programming (ICSP) places 50 mA peak in-rush transients on VDD during bulk Flash erase; the bulk capacitor must be sized to absorb this. Avoid routing high-current switching traces adjacent to VDD pins to prevent supply noise coupling into ADC samples.
Configuration bits (fuses) frequently cause board bring-up issues with the PIC16F877. The oscillator mode (HS, XT, LP, RC) must match the external resonator; an HS-mode part driven by a 4 MHz RC oscillator will not start reliably. Brown-out detect (BOR) and low-voltage programming (LVP) must be configured explicitly β leaving LVP enabled on a board that does not route PGM (RB3) can lock out high-voltage programming. Watchdog timer (WDT) post-scaler and code-protection (CP) bits should be reviewed in every firmware build before committing fuses. Per Microchip MPLAB defaults, WDT is enabled; disable it in code if not needed to avoid unintended resets.
Place the 20 MHz crystal or resonator within 5 mm of OSC1 (pin 13) and OSC2 (pin 14) with symmetric trace lengths and a ground guard ring. The Microchip datasheet recommends 33 pF load capacitors for HS mode at 20 MHz; using higher capacitance slows the oscillator startup and may fail at cold temperatures. Keep the AVDD reference trace (RA3/AN3/VREF+ when used) away from PORTB switching lines that toggle during ADC acquisition. The 10-bit ADC achieves specified accuracy only with adequate source impedance (less than 10 kohm) β add an op-amp buffer for high-impedance sensors to avoid gain error.
Compliance Information
RoHS and REACH compliance per Microchip product page and DigiKey listing. AEC-Q100 not applicable β Microchip does not offer an automotive-grade PIC16F877; for AEC-Q100 designs use PIC18F or dsPIC families.