PIC16F876-20/SP - 8-Bit 20MHz 14KB Flash MCU | Microchip
MPN: PIC16F876-20/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $10.33 | $10.33 |
| 10 | $9.45 | $94.50 |
| 100 | $8.52 | $852.00 |
| 500 | $7.74 | $3,870.00 |
| 1,000 | $7.1 | $7,100.00 |
PIC16F876-20/SP Overview
A microcontroller (MCU) is a single-chip computer containing a processor core, program and data memory, timers, and I/O peripherals. The PIC16F876 sits in Microchip's mid-range PIC16 family, sitting in the taxonomy: 8-bit MCU -> PIC16F mid-range -> FLASH MCU -> embedded controller -> semiconductor. Its RISC architecture uses only 35 single-word instructions and is upward compatible with the PIC16C5X, PIC12CXXX, and PIC16C7X families, enabling easy code migration across the entire mid-range line.
Key features include self-programmability (in-circuit serial programming, ICSP), in-circuit debugging (ICD), two 8-bit timers plus one 16-bit timer, a watchdog timer with its own on-chip RC oscillator, brown-out reset, and a wide 2.0V to 5.5V operating voltage range. The CMOS FLASH process delivers low-power operation with typical sleep currents under 1µA.
The architecture combines a Harvard bus (separate program and data paths) with RISC-like instruction execution, which simplifies code density and deterministic timing. Five 10-bit ADC channels support conversion of analog sensor signals at up to 100ksps, while two PWM modules enable motor control, lighting, or power-conversion applications.
Typical applications include industrial control and sensing nodes, HVAC actuator control, consumer appliance interfaces, automotive body electronics (non-safety), battery chargers, and small- to mid-complexity embedded systems requiring reliable FLASH reprogrammability. The PIC16F886 is the recommended successor for new designs; PIC16F876-20/SP is most often sourced for legacy system maintenance.
When designing, route VDD with a 0.1µF decoupling capacitor close to the pin, ensure MCLR has proper pull-up, and respect the 20MHz oscillator limit. In-circuit programming requires the ICSP header; consult the Microchip PIC16F87X programming specification for timing and voltage constraints.
This page synthesizes distributor pricing, drop-in alternatives such as the PIC16F876A-I/SP enhanced successor, and practical design notes not consolidated on the manufacturer product page, providing a single reference for engineers evaluating, sourcing, or maintaining PIC16F876-20/SP designs.
Drop-in alternatives for PIC16F876-20/SP — 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 PIC16F876-20/SP (same form factor and footprint) — differing in ADC, Core Architecture, Package, Operating Temperature, Timers.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F876A-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F873-20/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F876-10E/SP
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$5.45 / Unit
View Datasheet →PIC16F876-04I/SO
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$5.05 / Unit
View Datasheet →PIC16F873A-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F876-20/SP Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16 (8-bit RISC, Harvard) |
| Instruction Set | 35 single-word instructions |
| Maximum CPU Frequency | 20 MHz (200 ns instruction cycle) |
| Program Flash Memory | 14 KB (8K x 14 words) |
| RAM | 368 bytes |
| EEPROM Data Memory | 256 bytes |
| I/O Pins | 22 |
| ADC | 5 channels, 10-bit resolution |
| PWM / CCP Modules | 2 (Capture/Compare/PWM) |
| Timers | 3 (Timer0 8-bit, Timer1 16-bit, Timer2 8-bit) |
| Communication | USART, SPI, I²C (SSP) |
| Operating Voltage (VDD) | 2.0 V to 5.5 V |
| Operating Temperature | -40C to +85C (industrial) |
| Package | 28-pin SPDIP (Skinny Plastic DIP) |
| Mounting Type | Through-Hole |
| RoHS Status | Compliant |
| Lead-Free | Yes |
| Recommended Successor | PIC16F886 |
PIC16F876-20/SP Pin Configuration
| Pin 1 | MCLR — Master Clear (reset) input, active low, internal pull-up enabled by configuration bit |
| 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 — Port A bit 2 / analog input channel 2 |
| Pin 5 | RA3/AN3/VREF+ — Port A bit 3 / analog input channel 3 / positive voltage reference |
| Pin 6 | RA4/T0CKI — Port A bit 4 / Timer0 clock input (open-drain output) |
| Pin 7 | RA5/AN4/SS — Port A bit 5 / analog input channel 4 / SPI slave select |
| Pin 8 | VSS — Ground reference |
| Pin 9 | OSC1/CLKIN — Oscillator input / external clock input |
| Pin 10 | OSC2/CLKOUT — Oscillator output / clock output (FOSC/4) |
| Pin 11 | RC0/T1OSO/T1CKI — Port C bit 0 / Timer1 oscillator output / Timer1 clock input |
| Pin 12 | RC1/T1OSI/CCP2 — Port C bit 1 / Timer1 oscillator input / Capture/Compare/PWM 2 |
| Pin 13 | RC2/CCP1 — Port C bit 2 / Capture/Compare/PWM 1 |
| Pin 14 | RC3/SCK/SCL — Port C bit 3 / SPI clock / I²C clock |
| Pin 15 | RC4/SDI/SDA — Port C bit 4 / SPI data in / I²C data |
| Pin 16 | RC5/SDO — Port C bit 5 / SPI data out |
| Pin 17 | RC6/TX/CK — Port C bit 6 / USART async transmit / USART sync clock |
| Pin 18 | RC7/RX/DT — Port C bit 7 / USART async receive / USART sync data |
| Pin 19 | VSS — Ground reference (second VSS pin) |
| Pin 20 | VDD — Positive supply voltage (2.0V to 5.5V) |
| Pin 21 | RB0/INT — Port B bit 0 / external interrupt input |
| Pin 22 | RB1 — Port B bit 1 |
| Pin 23 | RB2 — Port B bit 2 |
| Pin 24 | RB3/PGM — Port B bit 3 / low-voltage programming input |
| Pin 25 | RB4 — Port B bit 4 (interrupt-on-change) |
| Pin 26 | RB5 — Port B bit 5 (interrupt-on-change) |
| Pin 27 | RB6/PGC — Port B bit 6 / ICSP clock / interrupt-on-change |
| Pin 28 | RB7/PGD — Port B bit 7 / ICSP data / interrupt-on-change |
Typical Applications
PIC16F876-20/SP is suitable for 7 applications: Industrial Control & Sensing Nodes, HVAC Actuator Control, Consumer Appliance Interfaces, Battery Chargers & Power Management, Automotive Body Electronics (Non-Safety), Educational & Hobby Embedded Development, Small Motor Control (Brushed DC / Stepper).
Industrial Control & Sensing Nodes
The PIC16F876-20/SP is well suited to industrial control and sensor-interface nodes thanks to its 5-channel 10-bit ADC, 22 GPIO pins, and 2.0V to 5.5V operating range. Its on-chip 256-byte EEPROM enables non-volatile storage of calibration coefficients and configuration data without an external memory IC, reducing BOM cost. In a typical sensing node, the PIC16F876-20/SP samples up to five analog sensor channels, performs linearization in firmware, and reports results via USART or SPI to a host controller. The 20MHz CPU (200 ns instruction cycle) provides ample margin for filtering and digital compensation. Designers should budget for the 5V-tolerant I/O when interfacing to industrial 24V busses via resistor dividers, and use the watchdog timer with its dedicated internal RC oscillator for reliable field operation.
Recommended
HVAC Actuator Control
HVAC damper, valve, and fan-speed control applications benefit from the PIC16F876-20/SP's two CCP/PWM modules and 16-bit Timer1 for precise duty-cycle generation. The 20MHz CPU supports real-time PID loops at typical HVAC update rates of 1 to 10 Hz without taxing CPU budget. Five ADC channels read temperature, pressure, or humidity sensors directly, while the USART interfaces to a wall thermostat or building-automation bus. The 14KB Flash comfortably holds state-machine logic, look-up tables for non-linear curves, and communication stacks. EEPROM retention of 100K erase/write cycles is sufficient for trim adjustments over the equipment's lifetime. For serviceability, the ICSP header allows in-field firmware updates without removing the board.
Recommended
Consumer Appliance Interfaces
Consumer appliance user interfaces and control boards are a classic application for the PIC16F876-20/SP. The 22 GPIO pins directly drive 7-segment displays, button matrices, and indicator LEDs without external glue logic, while the 14KB Flash accommodates menu state machines and product feature logic. The 20MHz CPU provides responsive user-interface updates at 50 to 100Hz refresh rates. Brown-out reset and the watchdog timer protect against supply glitches common in appliance environments. EEPROM stores user preferences (last setting, calibration values) across power cycles. The 28-SPDIP package is well suited to through-hole designs and hobby-grade repair workflows, which remain common in appliance service.
Recommended
Battery Chargers & Power Management
Battery charger control loops benefit from the PIC16F876-20/SP's ADC for current/voltage sensing, PWM for switching-element control, and EEPROM for storing charge profile parameters. The 20MHz instruction cycle supports sample rates adequate for CC/CV transition control in lead-acid and NiMH chemistries. The 2.0V to 5.5V VDD range allows direct operation from a single lithium cell or USB supply. Five ADC channels can monitor battery voltage, charge current, temperature (via NTC), and input supply simultaneously. Brown-out reset prevents deep discharge by holding the MCU in reset below 2.0V. For higher-power applications, the PWM outputs drive MOSFET gate drivers such as the TC4427 directly.
Recommended
Automotive Body Electronics (Non-Safety)
Non-safety automotive body applications such as interior lighting, seat controllers, mirror adjust, and accessory multiplex nodes commonly use the PIC16F876-20/SP. Its -40C to +85C industrial temperature range covers cabin environments, while EEPROM stores position memory for mirrors and seats. The 22 GPIO drive small relays, LEDs, and H-bridge drivers via PWM. For CAN bus integration, an external MCP2515 SPI-to-CAN controller pairs with the PIC16F876-20/SP over its synchronous serial port. The 14KB Flash supports J1850 VPW/PWM or LIN slave protocol stacks. Note: this part is not AEC-Q100 qualified; for safety-critical or under-hood use, migrate to an AEC-Q100-grade MCU such as the PIC16F1769-I/SP.
Recommended
Educational & Hobby Embedded Development
The PIC16F876-20/SP remains popular in educational and hobbyist embedded development because of its through-hole 28-SPDIP package, breadboard-friendly pinout, and broad tutorial ecosystem. The PIC16 mid-range architecture uses only 35 single-word instructions, ideal for teaching RISC fundamentals. ICSP (in-circuit serial programming) and ICD (in-circuit debugging) support let students program and debug the part without removing it from the breadboard. The 14KB Flash is more than enough for textbook projects, and the 22 GPIO easily interfaces to common peripherals such as character LCDs, 7-segment displays, and sensors. Compatibility with the free MPLAB X IDE and XC8 compiler keeps the toolchain cost at zero for learners.
Recommended
Small Motor Control (Brushed DC / Stepper)
The PIC16F876-20/SP drives small brushed-DC and unipolar stepper motors through its two CCP/PWM modules and 16-bit Timer1 for precise commutation timing. PWM frequencies up to 20kHz (above audible range) avoid acoustic noise, while the 20MHz CPU handles acceleration/deceleration ramps in firmware. Five ADC channels read back-EMF, current, or position feedback from potentiometers. The 22 GPIO interface directly to H-bridge drivers such as the L293D or TC4427+MOSFET stages. EEPROM stores motion profile parameters across power cycles. For multi-axis coordination, the USART synchronizes multiple PIC16F876-20/SP nodes in a master/slave configuration.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F876-20/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F876A-I/SP | PIC16F873-20/SP | PIC16F876-10E/SP | PIC16F873A-I/SP |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-SPDIP | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same |
| Maximum CPU Frequency | 20 MHz | 20 MHz | 20 MHz | 10 MHz | 20 MHz |
| Program Flash Memory | 14 KB | 14 KB | 7 KB | 14 KB | 7 KB |
| RAM | 368 bytes | 368 bytes | 192 bytes | 368 bytes | 192 bytes |
| EEPROM | 256 bytes | 256 bytes | 128 bytes | 256 bytes | 128 bytes |
| I/O Pins | 22 | 22 | 22 | 22 | 22 |
| ADC Channels | 5 x 10-bit | 5 x 10-bit | 5 x 10-bit | 5 x 10-bit | 5 x 10-bit |
| Operating Voltage | 2.0V to 5.5V | 2.0V to 5.5V | 2.0V to 5.5V | 2.0V to 5.5V | 2.0V to 5.5V |
| Pin Compatible | Yes (28-SPDIP) | Yes - direct drop-in | Yes - direct drop-in (less Flash) | Yes - direct drop-in (slower CPU) | Yes - direct drop-in (less Flash/RAM) |
Key Differentiators
- Drop-in compatibility with the enhanced A-version successor (vs PIC16F876A-I/SP)
- Full 20MHz instruction execution speed in the same family (vs PIC16F876-10E/SP)
- Larger memory than the PIC16F873 sibling (vs PIC16F873-20/SP)
Design Notes
Decouple VDD (pin 20) with a 0.1µF ceramic capacitor placed within 5mm of the pin, and pair it with a bulk 10µF tantalum or aluminum on the same rail. The PIC16F876-20/SP draws roughly 2 to 15mA active at 20MHz depending on I/O loading. For battery-powered designs, leverage the SLEEP instruction plus watchdog wake-up to drop average current below 10µA.
MCLR (pin 1) must be tied to VDD through a 10kΩ resistor; do not leave it floating or the part will randomly reset. If in-circuit programming is required, route MCLR to the ICSP header with a diode-isolated high-voltage path (about 13V for high-voltage programming). For low-voltage ICSP only, a simple pull-up suffices and the PGC/PGD pins (27, 28) connect directly to the programmer.
Place the crystal or resonator as close as possible to OSC1/OSC2 (pins 9, 10) with traces no longer than 5mm to reduce stray capacitance. For crystals, add 10 to 22pF load capacitors to ground. Use a ground guard ring around the oscillator loop. The 28-SPDIP package allows easy rework; route signals to outer pads and keep power/ground on inner pins for cleaner power distribution.
Port A pins used as analog inputs (RA0-RA5) should have their TRIS bits set to input and the corresponding ADCON1 bits configured for analog mode to disable digital input buffers. Without this, ADC readings will be corrupted by digital switching noise. Keep analog traces short and route them away from the PWM outputs on RC1/RC2 to minimize coupling.
Compliance Information
RoHS compliant per Microchip product page. Not AEC-Q100 qualified — not suitable for automotive safety-critical applications. Lead-free and halogen-free per Microchip environmental certification. Conflict minerals compliant per Microchip CMRT filings.