PIC16F876-04/SP - 8-Bit 4MHz 14KB Flash MCU | Microchip
MPN: PIC16F876-04/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.5 | $4.50 |
| 10 | $4.05 | $40.50 |
| 100 | $3.6 | $360.00 |
| 500 | $3.24 | $1,620.00 |
| 1,000 | $2.88 | $2,880.00 |
PIC16F876-04/SP Overview
A microcontroller (MCU) is a single-chip computer containing a CPU core, program memory, data memory, peripherals, and I/O. The PIC16F876 belongs to the PIC16F mid-range 8-bit family, positioned in the taxonomy 8-bit MCU -> microcontroller -> embedded processor -> semiconductor IC. The PIC16F87X family is one of Microchip's most widely adopted mid-range architectures, characterized by a 14-bit instruction word, 35 single-word instructions, and Harvard bus architecture.
Key features include 22 digital I/O pins, hardware USART, MSSP supporting both SPI and I2C (master/slave), two 8-bit timers and one 16-bit timer, a 10-bit A/D converter with up to 5 channels, a watchdog timer with its own on-chip RC oscillator, and In-Circuit Serial Programming (ICSP) via two pins. The device operates from 4.0 V to 5.5 V and includes a brown-out reset circuit. The Flash program memory supports 1000 erase/write cycles typical and 40-year data retention.
The PIC16F876-04/SP uses Microchip's PIC16 mid-range core with a 2-stage pipeline, executing most instructions in a single 200 ns cycle at 4 MHz. The Harvard architecture separates program and data buses, allowing simultaneous instruction fetch and operand access. The on-chip ICD (In-Circuit Debug) and ICSP capability enable development without removing the chip from the board, which is critical for legacy through-hole designs that cannot be replaced with smaller surface-mount packages.
Typical applications include industrial control systems, sensor signal conditioning, motor drive PWM control, automotive body electronics, HVAC thermostat controllers, instrumentation, and educational embedded platforms. The 28-pin SPDIP package is ideal for through-hole prototyping on perfboard and legacy PCB designs that require socketed or hand-replaceable parts.
When designing with this device, note that the older PIC16F876 has been superseded by the PIC16F876A (improvements: nanoWatt technology, 1% internal oscillator accuracy) and later by the PIC16F886 (more memory and peripherals). New designs should consider the PIC16F886 or PIC16F1xxx enhanced family; however, the PIC16F876-04/SP remains widely available for production boards and repair replacements where a drop-in 28-pin SPDIP pinout is required.
Drop-in alternatives for PIC16F876-04/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-04/SP (same form factor and footprint) — differing in Communication, Package, ADC, Instruction Set, Timers.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F876-04I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F876-20/SP
✅ Drop-In✓ In Stock
$7.1 / Unit
View Datasheet →PIC16F876A-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F873-04/SP
✅ Drop-In✓ In Stock
$5.74 / Unit
View Datasheet →PIC16F873A-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F876-04/SP Maximum Ratings & Electrical Characteristics
| Core | PIC16 8-bit RISC |
| Instruction Set | 35 single-word instructions, 14-bit opcode |
| Program Memory (Flash) | 14 KB (8192 x 14 words) |
| Data RAM | 368 bytes |
| Data EEPROM | 256 bytes |
| Maximum Clock Frequency | 4 MHz (4 MIPS, 200 ns instruction cycle) |
| Supply Voltage (VDD) | 4.0 V to 5.5 V |
| I/O Pins | 22 digital I/O |
| ADC | 10-bit, 5 channels |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Communication | USART (asynchronous/synchronous), MSSP (SPI / I2C master-slave) |
| Watchdog Timer | Yes, with dedicated on-chip RC oscillator |
| Brown-Out Reset (BOR) | Yes |
| In-Circuit Programming | ICSP via RB6/RB7, ICD support |
| Package | 28-pin SPDIP (0.300", 7.62 mm) |
PIC16F876-04/SP Pin Configuration
| Pin 1 | RA0/AN0 — Digital I/O / Analog input channel 0 |
| Pin 2 | RA1/AN1 — Digital I/O / Analog input channel 1 |
| Pin 3 | RA2/AN2/VREF- — Digital I/O / Analog input 2 / ADC negative reference |
| Pin 4 | RA3/AN3/VREF+ — Digital I/O / Analog input 3 / ADC positive reference |
| Pin 5 | RA4/T0CKI — Digital I/O / Timer0 clock input |
| Pin 6 | RA5/AN4/SS — Digital I/O / Analog input 4 / SPI slave select |
| Pin 7 | RE0/RD/AN5 — Digital I/O / Parallel Slave Port read / Analog input 5 |
| Pin 8 | RE1/WR/AN6 — Digital I/O / Parallel Slave Port write / Analog input 6 |
| Pin 9 | RE2/CS/AN7 — Digital I/O / Parallel Slave Port chip select / Analog input 7 |
| Pin 10 | VDD — Positive supply voltage (4.0 V to 5.5 V) |
| Pin 11 | VSS — Ground reference |
| Pin 12 | OSC1/CLKIN — Crystal oscillator input / external clock input |
| Pin 13 | OSC2/CLKOUT — Crystal oscillator output / clock output |
| Pin 14 | RC0/T1OSO/T1CKI — Digital I/O / Timer1 oscillator output / Timer1 clock input |
| Pin 15 | RC1/T1OSI/CCP2 — Digital I/O / Timer1 oscillator input / Capture-Compare-PWM 2 |
| Pin 16 | RC2/CCP1 — Digital I/O / Capture-Compare-PWM 1 |
| Pin 17 | RC3/SCK/SCL — Digital I/O / SPI clock / I2C clock |
| Pin 18 | RD0/PSP0 — Digital I/O / Parallel Slave Port data bit 0 |
| Pin 19 | RD1/PSP1 — Digital I/O / Parallel Slave Port data bit 1 |
| Pin 20 | RD2/PSP2 — Digital I/O / Parallel Slave Port data bit 2 |
| Pin 21 | RD3/PSP3 — Digital I/O / Parallel Slave Port data bit 3 |
| Pin 22 | RC4/SDI/SDA — Digital I/O / SPI data in / I2C data |
| Pin 23 | RC5/SDO — Digital I/O / SPI data out |
| Pin 24 | RC6/TX/CK — Digital I/O / USART transmit / USART clock |
| Pin 25 | RC7/RX/DT — Digital I/O / USART receive / USART data |
| Pin 26 | RB0/INT — Digital I/O / External interrupt input |
| Pin 27 | RB1 — Digital I/O |
| Pin 28 | RB2 — Digital I/O |
Typical Applications
PIC16F876-04/SP is suitable for 6 applications: Industrial Control and Sensor Signal Conditioning, Motor Drive PWM Control, HVAC Thermostat and Building Automation, Automotive Body Electronics and Legacy Repair, Instrumentation and Data Acquisition Front Ends, Educational Embedded Platforms and Prototyping.
Industrial Control and Sensor Signal Conditioning
The PIC16F876-04/SP fits industrial sensor-interface designs because its 10-bit ADC with 5 input channels and 22 digital I/O provide sufficient resolution for thermocouple, RTD, pressure transducer, and 4-20 mA loop signal conditioning. With 14 KB of Flash program memory the MCU can host PID control algorithms, scaling math, and HMI UART command handlers. The MSSP peripheral enables I2C connection to external EEPROM for data logging or SPI to a front-panel display controller. Hardware USART supports RS-485 communication with industrial PLCs or sensor hubs. The 4 MHz clock is fast enough for sensor sampling rates up to a few kHz, and the 5 V supply matches legacy industrial instrumentation rails.
Recommended
Motor Drive PWM Control
The PIC16F876-04/SP supports DC motor speed control and small stepper motor sequencing via its 16-bit Timer1 with CCP module, providing 10-bit PWM resolution at the 4 MHz clock. The 22 I/O pins handle quadrature encoder inputs, end-stop sensors, and H-bridge enable signals. With 368 bytes of SRAM, the MCU can buffer motion profiles and PID error terms. The USART allows host communication for command and parameter updates. For BLDC and small AC drive, the 4 MHz speed grade suffices for sub-1 kHz PWM carrier frequencies typical in appliance-class motor control.
Recommended
HVAC Thermostat and Building Automation
The PIC16F876-04/SP is widely used in HVAC thermostat controllers and small building-automation nodes because its 14 KB Flash accommodates user-interface state machines, scheduling logic, and Modbus communication stacks. The 5-channel ADC reads onboard temperature sensors, humidity transducers, and potentiometer set-point adjustments, while the I2C MSSP connects to character-LCD displays and external EEPROM for schedule storage. The 22 I/O drive LEDs, relays, and triac optocouplers for HVAC control. Operation from 4.0-5.5 V suits 5 V wall-cube adapters commonly used in HVAC control boards, and brown-out reset ensures clean start-up after power interruptions.
Recommended
Automotive Body Electronics and Legacy Repair
The PIC16F876-04/SP is found in older automotive body-control modules (door-lock controllers, seat controllers, instrument cluster back-end drivers) and remains a common replacement part for production-line repair. The 28-pin SPDIP package is socketable in legacy automotive PCBs, simplifying dealership repair workflows. The MCU operates from the standard 5 V automotive rail, and the USART/MSSP peripherals handle LIN-bus emulation via UART plus sensor and switch scan via I/O. Brown-out reset is critical for cranking-voltage dropouts in 12 V automotive systems. The watchdog timer with dedicated RC oscillator provides independent fail-safe against main clock glitches.
Recommended
Instrumentation and Data Acquisition Front Ends
The PIC16F876-04/SP serves as a low-cost front-end controller in laboratory instrumentation and bench-top data-acquisition devices where its 10-bit ADC samples analog signals and the USART streams results to a host PC or display. The 256-byte EEPROM stores calibration coefficients and unit identification, while the 368-byte RAM buffers instantaneous sample windows. The MSSP peripheral can drive SPI ADC front-ends for higher-precision external conversion or I2C sensor breakouts. With 4 MHz clock, sustained sampling rates of a few hundred Hz are achievable, suitable for slow-changing process variables like temperature, pressure, and strain gauges in physics and chemistry labs.
Recommended
Educational Embedded Platforms and Prototyping
The PIC16F876-04/SP is a staple in university embedded-systems courses and hobby prototyping because its 28-pin SPDIP form factor fits breadboards and perfboards cleanly, allowing through-hole soldering by students without surface-mount rework equipment. The 14 KB Flash holds complete student projects including interrupt-driven scheduling, I2C sensor reads, and UART debug output. ICSP via RB6/RB7 enables in-circuit programming and debugging without removing the chip from the board. The 35-instruction PIC16 mid-range instruction set is documented in Microchip datasheet DS30262D, simplifying teaching. Migrating from this part to the PIC16F876A-I/SP introduces nanoWatt and internal oscillator concepts in later coursework.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F876-04/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F876-04I/SP | PIC16F876-20/SP | PIC16F876A-I/SP | PIC16F873-04/SP | PIC16F873A-I/SP |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-pin SPDIP | 28-pin SPDIP - same | 28-pin SPDIP - same | 28-pin SPDIP - same | 28-pin SPDIP - same | 28-pin SPDIP - same |
| Maximum Clock Frequency | 4 MHz | 4 MHz | 20 MHz | 20 MHz | 4 MHz | 20 MHz |
| Program Memory (Flash) | 14 KB | 14 KB | 14 KB | 14 KB | 7 KB | 7 KB |
| Data RAM | 368 bytes | 368 bytes | 368 bytes | 368 bytes | 192 bytes | 192 bytes |
| Data EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 128 bytes | 128 bytes |
| ADC | 10-bit, 5 channels | 10-bit, 5 channels | 10-bit, 5 channels | 10-bit, 5 channels | 10-bit, 5 channels | 10-bit, 5 channels |
| Operating Temperature | 0°C to +70°C (commercial) | -40°C to +85°C (industrial) | 0°C to +70°C | -40°C to +85°C | 0°C to +70°C | -40°C to +85°C |
| Supply Voltage | 4.0 V to 5.5 V | 4.0 V to 5.5 V | 4.0 V to 5.5 V | 2.0 V to 5.5 V | 4.0 V to 5.5 V | 2.0 V to 5.5 V |
| Low-Power (nanoWatt) Modes | No | No | No | Yes | No | Yes |
Key Differentiators
- Through-hole SPDIP package for legacy PCB compatibility (vs PIC16F876A-I/SP)
- Mature legacy design support with extensive documentation (vs PIC16F886)
- Larger 14 KB Flash versus PIC16F873 family members (vs PIC16F873-04/SP)
Design Notes
The PIC16F876-04/SP requires a regulated 4.0 V to 5.5 V VDD supply with a decoupling capacitor (typically 100 nF ceramic) placed within 5 mm of the VDD pin, plus a bulk capacitor (10 µF tantalum or aluminum) at the board power entry. The brown-out reset (BOR) holds the MCU in reset when VDD drops below the configured threshold (typically ~4.0 V), preventing code execution from corrupted Flash states. For automotive cranking environments, add a TVS clamp and series ferrite on the 12 V supply feeding the 5 V regulator.
Place the decoupling capacitor as close as possible to pin 10 (VDD) and pin 11 (VSS). For crystal-oscillator operation, keep the crystal or resonator and its load capacitors within 5 mm of pins 12 (OSC1) and 13 (OSC2); trace lengths should be symmetric and short to minimize stray capacitance. ICSP pins (RB6/RB7 on pins 27/28 in the SPDIP package) should route to a 2x3 or 1x6 header with no series resistors, per Microchip ICD header guidelines. MCLR (pin 1) requires a 10 kΩ pull-up to VDD; do not leave MCLR floating.
Do not confuse the PIC16F876-04/SP (4 MHz speed grade, 14 KB Flash, 256 B EEPROM, 5 V only) with the PIC16F876A-I/SP (enhanced silicon, 20 MHz max, 2.0-5.5 V, nanoWatt technology). New designs should default to the 'A' variant. The 28-pin SPDIP package is identified by suffix "/SP"; do not confuse with "/SO" (SOIC-28) or "/ML" (QFN-28) which require different PCB footprints. When migrating legacy code, verify CONFIG bits since the BOR threshold and oscillator selection changed between PIC16F876 and PIC16F876A.
Compliance Information
RoHS, REACH, lead-free, and halogen-free status not confirmed in the verified web data; recommend verifying directly with Microchip's product compliance page. The PIC16F876-04/SP is commercial-grade, not AEC-Q100 qualified; use automotive-grade PIC variants for vehicle applications.