LAST TIME BUY NOTICE: PIC16F877-04E/PQ is approaching end-of-life. Last order date: Contact us. View available alternative parts β†’
Microchip Technology

PIC16F877-04E/PQ - 8-bit MCU, 14KB Flash, 4MHz, 44-MQFP | Microchip

MPN: PIC16F877-04E/PQ ⚠ Last Time Buy
In Stock Ships in 1-3 business days
2.0 V to 5.5 V Vdss 44-pin MQFP (10 x 10 mm), PQ suffix Package 4 MHz (200 ns instruction cycle) Speed 14 KB (8K x 14 words) Memory
From $5.72 USD / Unit
MOQ: 1 |
Price updated: 2026-09-21
Volume Pricing
Qty Unit Price Extended
1 $9.85 $9.85
10 $8.92 $89.20
100 $7.65 $765.00
500 $6.48 $3,240.00
1,000 $5.72 $5,720.00
ℹ️ All prices are in USD

PIC16F877-04E/PQ Overview

The Microchip Technology PIC16F877-04E/PQ is an 8-bit CMOS Flash-based RISC microcontroller from the PIC16F family, offering 14KB (8K x 14) of on-chip program memory, 368 bytes of RAM, and 256 bytes of EEPROM data memory in a 44-pin Metric Quad Flat Pack (MQFP) package. It executes instructions in a 200 ns cycle at a 4 MHz clock (10 MHz equivalent at higher speeds) using only 35 single-word instructions, giving the PIC16F877-04E/PQ an outstanding MIPS-to-power ratio for its class.

An 8-bit microcontroller (MCU) is a single-chip computer that integrates a CPU, program memory (Flash/ROM), data memory (RAM), non-volatile EEPROM, and a configurable set of peripherals (timers, ADC, USART, I/O ports, PWM, I2C/SPI). Within the semiconductor hierarchy, an MCU sits above a microprocessor (which requires external memory) and below a SoC (system-on-chip with application processor cores). The PIC16F877-04E/PQ belongs to Microchip's mid-range PIC16F877 family, which became an industry workhorse for embedded control because of its simple instruction set, deterministic timing, and rich peripheral set.

Key features of the PIC16F877-04E/PQ include 33 digital I/O pins, a 10-bit 8-channel Analog-to-Digital Converter (ADC), two 8-bit and one 16-bit timers, a USART with RS-485 support, an MSSP module (Master Synchronous Serial Port) supporting SPI and I2C (both Master and Slave), a Parallel Slave Port, a Capture/Compare/PWM module, and a watchdog timer with its own on-chip RC oscillator. The 04E speed grade denotes a 4 MHz maximum oscillator input, and the E suffix indicates the Extended (Automotive) temperature range of -40C to +125C.

The device uses a Harvard RISC architecture with separate program and data buses, providing predictable instruction execution. Its 14-bit instruction word enables most operations to complete in a single cycle, and the wide instruction encoding supports literal, register, and branch operations without dedicated move instructions.

Typical applications for the PIC16F877-04E/PQ include industrial control systems, automotive body and chassis electronics, sensor interface boards, low-power instrumentation, motor control, HVAC controls, and educational development platforms. Its 33 I/O pins comfortably support keypad scanning, LCD driving, and multi-drop communication buses.

When designing with this part, observe the brown-out reset, power-on reset, and watchdog configuration bits in the configuration word; misuse of these settings is a common cause of field returns. Also confirm that your application code fits within the 14KB Flash and 8-level hardware stack, since the PIC16F877 family lacks the extended stack and interrupt hardware of the newer PIC18 and PIC16F1xxx Enhanced mid-range families.

This page synthesizes distributor stock levels, parametric drop-in alternatives, and practical design notes that complement the manufacturer datasheet for the PIC16F877-04E/PQ.

Drop-in alternatives for PIC16F877-04E/PQ β€” 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-04E/PQ (same form factor and footprint) β€” differing in Package, RoHS Status, Timers, Communication, Core Architecture.

Microchip Technology
Package: 40-pin PDIP (P)
RoHS Status: Compliant (lead-free matte-tin finish)
Timers: 3 (Timer0 8-bit, Timer1 16-bit, Timer2 8-bit)
Microchip Technology
Package: 44-pin MQFP (10x10 mm)
RoHS Status: Compliant
Timers: Three 16-bit (TMR0/TMR1/TMR2) + WDT
Microchip Technology
Package: 44-pin MQFP (10x10 mm, PQ)
RoHS Status: Compliant per Microchip PQ package description
Timers: 2 x 8-bit + 1 x 16-bit

Quick Comparison Tool β€” Select alternative parts for side-by-side comparison:

PIC16F877-04/PQ

βœ… Drop-In
πŸ“¦ 44-MQFP (PQ)
same 44-MQFP and same Flash/RAM/ADC but commercial 0 C to +70 C temperature grade instead of -40 C to +125 C (-15% spec) β€” drop-in where thermal headroom permits

πŸ“‹ Reference alternative (not in catalog)

PIC16F877-04I/PQ

βœ… Drop-In
Microchip Technology
πŸ“¦ 44-MQFP (PQ)
8-bit PIC Mid-Range Harvard RISC Β· PIC16 Β· PIC 16F Β· 4 MHz Β· 200 ns Β· FLASH Β· 14 KB (8K x 14 words) Β· 368 bytes

βœ“ In Stock

$4.35 / Unit

View Datasheet β†’

PIC16F877-20E/PQ

βœ… Drop-In
πŸ“¦ 44-MQFP (PQ)
same 44-MQFP package, 20 MHz max oscillator vs 4 MHz (+400% compute throughput) at identical memory map; -40 C to +125 C retained β€” drop-in replacement that runs faster at the same Vdd

πŸ“‹ Reference alternative (not in catalog)

PIC16F887-I/PQ

βœ… Drop-In
πŸ“¦ 44-MQFP (PQ)
modern Microchip-recommended successor in same 44-MQFP; +36% compute at 20 MHz, enhanced PWM, NanoWatt power modes, ADC upgraded to 14 channels β€” drop-in mechanically with minor register-level firmware touch-ups

πŸ“‹ Reference alternative (not in catalog)

PIC16F877A-04E/PQ

βœ… Drop-In
πŸ“¦ 44-MQFP (PQ)
PIC16F877A 'A-silicon' revision in same 44-MQFP; identical 14 KB Flash and peripheral set, enhanced in-circuit debug, brown-out and LVP improvements, same -40 C to +125 C β€” drop-in for legacy E-grade designs

πŸ“‹ Reference alternative (not in catalog)

PIC16F887-E/PQ

βœ… Drop-In
πŸ“¦ 44-MQFP (PQ)
PIC16F887 with -40 C to +125 C Extended grade in same 44-MQFP; faster 20 MHz core and 14-channel ADC vs 8; same peripheral map β€” drop-in mechanically for thermal upgrades

πŸ“‹ Reference alternative (not in catalog)

PIC16F877-04E/PQ Maximum Ratings & Electrical Characteristics

Core Architecture PIC (8-bit RISC, Harvard)
Family PIC16F877 Series
Program Memory (Flash) 14 KB (8K x 14 words)
Data SRAM 368 bytes
Data EEPROM 256 bytes
Maximum CPU Frequency 4 MHz (200 ns instruction cycle)
Operating Voltage (Vdd) 2.0 V to 5.5 V
I/O Pins 33 digital I/O
ADC 10-bit, 8 channels
Timers 2 x 8-bit, 1 x 16-bit
Communication USART (RS-485), MSSP (SPI / I2C Master & Slave), PSP
Capture/Compare/PWM (CCP) 1 module (16-bit)
Watchdog Timer Yes, with dedicated on-chip RC oscillator
Instruction Set Size 35 single-word instructions
Interrupt Sources 13
Package 44-pin MQFP (10 x 10 mm), PQ suffix
Operating Temperature Range -40 C to +125 C (E = Extended / Automotive)
Speed Grade Suffix 04 = 4 MHz maximum oscillator
RoHS Status Compliant (Pb-free MQFP)
Mounting Type Surface Mount

PIC16F877-04E/PQ Pin Configuration

Generic Component Pin Configuration Generic integrated-circuit pinout placeholder. Pin 1 indicated by dot; exact pin count and functions in the pin table below. 1 N 2 N-1 3 N-2 4 N-3 Pin Configuration See pin table below for pin functions Package-specific diagram not available
Pin 1 MCLR/Vpp/RE3 β€” Master Clear (Reset) input / Programming voltage / PORTE bit 3
Pin 2 RA0/AN0 β€” PORTA bit 0 / Analog channel 0
Pin 3 RA1/AN1 β€” PORTA bit 1 / Analog channel 1
Pin 4 RA2/AN2/Vref- β€” PORTA bit 2 / Analog channel 2 / ADC Vref negative
Pin 5 RA3/AN3/Vref+ β€” PORTA bit 3 / Analog channel 3 / ADC Vref positive
Pin 6 RA4/T0CKI β€” PORTA bit 4 / Timer0 clock input (open drain)
Pin 7 RA5/AN4/SS β€” PORTA bit 5 / Analog channel 4 / SPI Slave Select
Pin 8 RE0/RD/AN5 β€” PORTE bit 0 / Parallel Slave Port read / Analog channel 5
Pin 9 RE1/WR/AN6 β€” PORTE bit 1 / Parallel Slave Port write / Analog channel 6
Pin 10 RE2/CS/AN7 β€” PORTE bit 2 / Parallel Slave Port chip select / Analog channel 7
Pin 11 Vdd β€” Positive supply (2.0 V to 5.5 V)
Pin 12 Vss β€” Ground
Pin 13 OSC1/CLKI β€” Crystal oscillator input / External clock input
Pin 14 OSC2/CLKO β€” Crystal oscillator output / Clock output
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 I/O
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 asynchronous transmit / synchronous clock
Pin 26 RC7/RX/DT β€” PORTC bit 7 / USART asynchronous receive / synchronous 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
Pin 32 Vdd β€” Positive supply (2.0 V to 5.5 V)
Pin 33 RB0/INT β€” PORTB bit 0 / External interrupt
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 AVdd β€” Analog positive supply (separate from Vdd for noise isolation)
Pin 42 AVss β€” Analog ground (separate from Vss for noise isolation)
Pin 43 NC β€” Not connected
Pin 44 NC β€” Not connected

Typical Applications

PIC16F877-04E/PQ is suitable for 6 applications: Industrial Sensor Hub, Automotive Body Control Module, HVAC Fan & Blower Controller, Educational / Hobby Development Board, Low-Power Instrumentation & Data Logger, Motor Control & PWM Drive.

🏭

Industrial Sensor Hub

The PIC16F877-04E/PQ is well suited as a multi-channel industrial sensor hub: its 10-bit 8-channel ADC reads thermistors, pressure transducers, and 4-20 mA loop sensors while the MSSP and USART drive simultaneous SPI and RS-485 buses. The 4 MHz CPU clock and 200 ns instruction cycle provide deterministic sample-to-output latency without DSP overhead. The -40 C to +125 C extended temperature grade supports factory-floor and outdoor enclosures without additional thermal conditioning. Place bypass capacitors on Vdd/Vss within 5 mm of the pins and route the analog AVdd/AVss pair separately to minimize digital switching noise coupling into ADC measurements, which preserves the 10-bit ENOB across the 0-5 V sensor span.

πŸš—

Automotive Body Control Module

The PIC16F877-04E/PQ is a classic automotive body-electronics workhorse: 33 digital I/O drive door lock relays, courtesy lamps, mirror controls, and wiper stages, while the USART links to a body control CAN bridge. Its -40 C to +125 C extended grade meets under-hood and cabin thermal requirements. The 256-byte EEPROM retains learn-mode settings (window anti-pinch calibration, seat memory position) across battery disconnects. Use the 16-bit CCP module to generate accurate PWM dimming for instrument cluster backlights and verify brown-out reset settings (BOREN<1:0>) to survive crank-voltage sags down to 4 V without spurious resets.

⚑

HVAC Fan & Blower Controller

In HVAC blower controllers the PIC16F877-04E/PQ reads NTC intake-air temperature on its ADC, drives a triac-fired AC motor via the 16-bit CCP PWM module, and modulates a closed-loop air-flow profile. The 35-instruction PIC16 RISC ISA makes the proportional + integral control loop easy to verify by hand. The extended -40 C to +125 C temperature range handles attic and rooftop installations. The on-chip watchdog timer with dedicated RC oscillator is invaluable for unattended service: a stalled main oscillator automatically triggers a system reset instead of a frozen blower, and zero-crossing detection on a CCP pin reduces triac EMI.

🧩

Educational / Hobby Development Board

The PIC16F877-04E/PQ powers countless university courses, hobbyist trainers, and development boards thanks to its 35-instruction RISC ISA that beginners can fully grasp in one semester. The Parallel Slave Port provides a clean interface to an external bus analyzer or 8-bit host for teaching memory-mapped I/O. The PIC's Harvard architecture separates program and data memory, which pedagogically illustrates how single-cycle instructions work. Use the USART for PC serial console output at 9600 baud, the MSSP for SPI EEPROM labs, and the 10-bit ADC for analog sensor tutorials β€” all without external peripherals beyond an ICSP header.

πŸ“±

Low-Power Instrumentation & Data Logger

Battery-powered data loggers exploit the PIC16F877-04E/PQ's Sleep mode drawing under 1 uA with the watchdog timer active. The 256-byte EEPROM stores calibration constants and rolling log headers, while the 368-byte SRAM buffers samples between writes. The 10-bit ADC digitizes thermocouple, pressure, or process-current inputs, and the MSSP writes batches to an external SPI Flash. The 4 MHz speed grade keeps active current low. Implement a sample-on-interrupt wake pattern with TIMER1 gated by a 32.768 kHz crystal for sub-second scheduling accuracy across weeks of unattended logging on a single 3.6 V lithium primary cell.

πŸ€–

Motor Control & PWM Drive

For brushed DC or stepper motor control the PIC16F877-04E/PQ pairs its 16-bit CCP module with the 8-bit timer/counters to generate phase-correct PWM up to 20 kHz. Quadrature encoders feed TMR0 for direction and TMR1 for speed, while a hardware SPI link synchronizes with a companion motor-driver IC. The 33 I/O pins easily accommodate limit-switch inputs, brake-driver outputs, and a serial command interface. The Extended temperature grade suits industrial cabinet environments, and the watchdog timer recovers the controller from ESD-induced lockups on factory floors. Optimize dead-time insertion in firmware to prevent shoot-through in the H-bridge.

Recommended Products Summary

PIC16F877-04/PQ Same peripheral set, commercial temperature variant for lab/prototype hubs Used in: Industrial Sensor Hub, Educational / Hobby Development Board PIC16F887-I/PQ Drop-in upgrade with enhanced ADC (14 channels) and 20 MHz clock Used in: Industrial Sensor Hub PIC16F877A-04E/PQ A-silicon revision with improved brown-out and LVP for automotive Used in: Automotive Body Control Module PIC16F877-20E/PQ Same Extended grade at 20 MHz for higher-rate LIN/J1850 stacks Used in: Automotive Body Control Module, Motor Control & PWM Drive PIC16F887-E/PQ Drop-in Extended-grade replacement with enhanced PWM and 20 MHz headroom Used in: HVAC Fan & Blower Controller PIC16F877-04I/PQ Industrial-grade alternative for indoor air-handler boards Used in: HVAC Fan & Blower Controller PIC16F876A-I/SO Smaller 28-pin SO sibling for introductory labs Used in: Educational / Hobby Development Board PIC16F818-I/P Microchip Technology Used in: Low-Power Instrumentation & Data Logger PIC16F887-I/P Microchip Technology Used in: Low-Power Instrumentation & Data Logger PIC16F871-I/PT Microchip Technology Used in: Motor Control & PWM Drive
What is the flash memory size and CPU clock speed of PIC16F877-04E/PQ?
The PIC16F877-04E/PQ provides 14 KB of on-chip Flash program memory (8K x 14-bit words) and runs at a maximum CPU clock of 4 MHz, producing a 200 ns instruction cycle. According to the Microchip PIC16F877 datasheet (DS39582), the 04 suffix designates the 4 MHz oscillator input grade, while the E suffix extends the operating temperature range to -40 C to +125 C.
How many I/O pins and ADC channels does the PIC16F877-04E/PQ have?
The PIC16F877-04E/PQ provides 33 digital I/O pins grouped across ports A through E, plus an 8-channel 10-bit Analog-to-Digital Converter (ADC) shared with port E. The Parallel Slave Port (PSP) on port D can also be repurposed as a digital 8-bit data bus interface to external microprocessors or FIFOs.
Where can I buy the PIC16F877-04E/PQ and what is the price?
The PIC16F877-04E/PQ is listed at authorized distributors including DigiKey, Mouser, Hotenda, Xecor, and OMO Electronic as of 2026-09-21. Single-piece pricing starts near $9.85 USD, with volume pricing reaching approximately $5.72 USD at 1000 pieces. Because Microchip has designated the PIC16F877 family as legacy/last-time-buy in favor of the PIC16F887 and PIC16F1xxx replacements, lead times may extend as inventory depletes.
What is the lead time and stock availability of PIC16F877-04E/PQ?
Distributor pages (DigiKey 442372, Mouser) list limited stock for PIC16F877-04E/PQ as of 2026-09-21; the part is widely classified as Last Time Buy because Microchip recommends the PIC16F887 or PIC16F1939 as modern replacements. Expect variable lead times from 4 to 16 weeks depending on inventory. Verify real-time stock before placing volume orders.
What is the operating temperature range of PIC16F877-04E/PQ?
The PIC16F877-04E/PQ carries the Extended (E) temperature suffix and operates from -40 C to +125 C junction temperature. This range suits automotive under-hood, industrial, and outdoor deployments. The non-E variants (PIC16F877-04/PQ, PIC16F877-04I/PQ) cover 0 C to +70 C and -40 C to +85 C respectively.
What is the difference between PIC16F877-04E/PQ and PIC16F887-I/P?
The PIC16F877-04E/PQ is a 4 MHz 8-bit MCU in the legacy PIC16F877 family, while the PIC16F887-I/P is Microchip's modern recommended replacement running up to 20 MHz with 14 KB Flash and 36 I/O. Both share compatible peripheral naming (USART, MSSP, ADC, CCP, PSP) and similar 40-/44-pin DIP/QFP footprints. The PIC16F887 adds an Enhanced PWM module and NanoWatt power management, so firmware ports may need minor register changes.
What is the best drop-in replacement for PIC16F877-04E/PQ?
The closest drop-in replacement for the PIC16F877-04E/PQ in the same 44-pin MQFP package is the PIC16F877-04/PQ (commercial temp range 0 to +70 C) when thermal demands permit. For new designs, the PIC16F887-I/P (industrial temp, 20 MHz, enhanced peripherals) provides code-compatible peripheral registers and substantially higher performance without a layout change.
Is PIC16F877-04E/PQ pin-compatible with PIC16F887 in the same MQFP package?
Yes. Both the PIC16F877-04E/PQ (44-MQFP) and the PIC16F887 share the same MQFP-44 pinout to the extent required for PIC16F877-compatible code: power, ground, oscillator, MCLR, port pins, and peripheral functions map identically. The PIC16F887 adds internal pull-ups and NanoWatt features on certain pins, so legacy code generally runs unchanged once you re-flash.
Where can I download the PIC16F877-04E/PQ datasheet PDF?
The official Microchip PIC16F877 datasheet is available as PDF at https://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf and mirrors on DigiKey (442372), Mouser, Octopart, and FindIC. The datasheet covers electrical characteristics, DC/AC timing diagrams, memory maps, instruction set reference, and peripheral driver examples for the PIC16F877-04E/PQ.
Where is the PIC16F877-04E/PQ pinout diagram located?
The PIC16F877-04E/PQ pinout for the 44-MQFP (PQ) package is documented in Figure 1-2 (Pinout Description) of the Microchip PIC16F877 datasheet DS39582, and visually rendered in the package SVG on this product page. Pin 1 is at the top-left bevel, with the package numbered counter-clockwise. Pins include Vdd, Vss, MCLR, OSC1/CLKI, OSC2/CLKO, PORTA through PORTE, and dedicated CCP/PSP signals.
Does the PIC16F877-04E/PQ support I2C and SPI?
The PIC16F877-04E/PQ includes a Master Synchronous Serial Port (MSSP) module that supports both SPI (Master and Slave, all four modes) and I2C (Master and Slave, 7-bit and 10-bit addressing). Combined with the USART for RS-232/RS-485, the device can simultaneously drive multiple industrial communication buses, a key reason for its popularity in sensor hubs and motor controllers.
What is the difference between the 04 and 20 speed grades of PIC16F877?
The PIC16F877-04 grade accepts a maximum oscillator input of 4 MHz, while the PIC16F877-20 grade supports up to 20 MHz. Both share identical 14 KB Flash, 368 B SRAM, and 256 B EEPROM. Choose 20 MHz for computation-intensive applications such as motor control loops; choose 04 MHz for low-EMI, battery-operated designs.
Is the PIC16F877-04E/PQ still recommended for new designs?
Microchip explicitly states on its PIC16F877 product page that a newer device (PIC16F887) is available and recommends it for new designs. The PIC16F877-04E/PQ is suitable for legacy maintenance, existing production lines, and cost-sensitive industrial retrofits where firmware re-qualification is undesirable. For greenfield projects, the PIC16F887 or PIC16F1xxx Enhanced mid-range families provide better performance per dollar.
What are the key specifications engineers should know about the PIC16F877-04E/PQ?
Five specifications define the PIC16F877-04E/PQ: (1) 14 KB Flash program memory, (2) 4 MHz maximum CPU clock / 200 ns instruction cycle, (3) 33 digital I/O across ports A-E, (4) 10-bit ADC with 8 input channels, and (5) -40 C to +125 C Extended temperature. It also exposes USART, MSSP (SPI/I2C), PSP, two 8-bit timers, one 16-bit timer, and a CCP/PWM module.

Engineering reference data for PIC16F877-04E/PQ β€” comparison, design guidance, and compliance information.

Selection Guide

Choose the PIC16F877-04E/PQ for legacy production lines, automotive body electronics, or industrial designs that require the -40 C to +125 C extended temperature grade on a proven 8-bit RISC architecture with 14 KB Flash and 33 I/O. For new designs, prefer the PIC16F887-I/PQ (industrial, 20 MHz) or PIC16F887-E/PQ (extended, 20 MHz) in the same 44-MQFP footprint β€” both are Microchip's recommended replacements and deliver a 5x compute boost with enhanced peripherals. Choose the PIC16F877-04/PQ only when the design runs at room temperature and the lowest unit cost matters more than Extended-grade qualification. For 20 MHz applications like motor control or LIN stacks, the PIC16F877-20E/PQ provides the same -40 C to +125 C range at five times the clock. All six listed drop-in alternatives share the 44-MQFP (PQ) land pattern, so PCB layout does not change.

Comparison with Alternatives

Parameter This Product PIC16F877-04/PQ PIC16F877-04I/PQ PIC16F877-20E/PQ PIC16F887-I/PQ PIC16F877A-04E/PQ PIC16F887-E/PQ
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Package 44-MQFP (PQ) 10x10 mm 44-MQFP (PQ) 10x10 mm 44-MQFP (PQ) 10x10 mm 44-MQFP (PQ) 10x10 mm 44-MQFP (PQ) 10x10 mm 44-MQFP (PQ) 10x10 mm 44-MQFP (PQ) 10x10 mm
Maximum CPU Frequency 4 MHz 4 MHz 4 MHz 20 MHz 20 MHz 4 MHz 20 MHz
Flash Memory 14 KB 14 KB 14 KB 14 KB 14 KB 14 KB 14 KB
SRAM 368 B 368 B 368 B 368 B 368 B 368 B 368 B
Operating Temperature -40 C to +125 C (Extended) 0 C to +70 C (Commercial) -40 C to +85 C (Industrial) -40 C to +125 C (Extended) -40 C to +85 C (Industrial) -40 C to +125 C (Extended) -40 C to +125 C (Extended)
ADC Channels / Resolution 8 / 10-bit 8 / 10-bit 8 / 10-bit 8 / 10-bit 14 / 10-bit 8 / 10-bit 14 / 10-bit
I/O Pins 33 33 33 33 36 33 36
Lifecycle Status Last Time Buy (Legacy) Last Time Buy Last Time Buy Last Time Buy Active (Recommended replacement) Last Time Buy Active

Key Differentiators

  • Extended -40 C to +125 C automotive temperature grade in the same MQFP-44 package (vs PIC16F877-04/PQ)
  • Modern drop-in successor with 5x more CPU throughput (vs PIC16F887-I/PQ)
  • A-silicon revision with improved brown-out and LVP (vs PIC16F877-04E/PQ vs PIC16F877A-04E/PQ)

Design Notes

Estimated: at 5 V Vdd, 4 MHz clock and full I/O load the PIC16F877-04E/PQ draws approximately 5-10 mA active. Connect a 0.1 uF ceramic bypass capacitor within 5 mm of Vdd (pin 11) and another on Vdd (pin 32), plus a 10 uF bulk capacitor near the supply pin pair. For ADC accuracy, decouple AVdd (pin 41) separately through a ferrite bead and a 0.1 uF + 10 uF combination; AVss (pin 42) should return directly to the ground plane via a short, low-inductance trace to avoid reference noise coupling.

Route the quartz crystal traces between OSC1 (pin 13) and OSC2 (pin 14) as short, symmetric traces with a grounded guard ring to minimize EMI pickup. Place the two load capacitors (typically 15-33 pF) immediately adjacent to the MCU pins. If a resonator or external clock is used instead, drive OSC1 only and leave OSC2 floating. The MCLR/RE3 pin (pin 1) requires a 10 kohm pull-up to Vdd; do not connect MCLR directly to Vdd without a resistor, otherwise in-circuit serial programming (ICSP) cannot drive the line low to enter programming mode.

Three common pitfalls with the PIC16F877-04E/PQ: (1) configuration-word mistakes β€” set FOSC, WDTE, PWRTE, BOREN and LVP bits to match the design; a misconfigured watchdog will reset the part every few ms, and an unintended LVP pin disables RB5 as I/O. (2) ADC input impedance β€” the ADC requires a source impedance below 2.5 kohm for full 10-bit accuracy; add an op-amp buffer for higher-impedance sensors. (3) Stack depth β€” the PIC16F877 hardware stack is only 8 levels deep; deep interrupt nesting or recursive function calls overflow it silently. Use inline functions or restructure to keep call depth shallow.

The PIC16F877-04E/PQ's Parallel Slave Port (port D plus RE0/RE1/RE2) is intended for short-distance communication to a host microprocessor or FIFO. Keep PSP traces under 50 mm, source-terminate with 100 ohm resistors if the bus is longer, and place a 10 kohm pull-up on RE2/CS to prevent spurious deselect during MCU reset. For USART RS-485 communications at 115200 baud or above, add a 120 ohm termination at the bus ends and route the differential pair with controlled impedance; the USART does not include internal slew-rate limiting.

Compliance Information

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

Pb-free MQFP per Microchip product page. AEC-Q100 not formally stated for PIC16F877-04E; automotive qualification pursued at system level. REACH and RoHS per EU directives as of 2026-09-21.

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

Related Searches

PIC16F877-04E/PQ PIC16F877-04E/PQ datasheet PIC16F877-04E/PQ price Microchip PIC16F877-04E/PQ PIC16F877 44-MQFP 8-bit microcontroller PIC16F877 automotive extended temperature PIC16F877 vs PIC16F887 PIC16F877-04E/PQ pinout diagram PIC16F877 drop-in replacement buy PIC16F877-04E/PQ distributor what is the flash memory of PIC16F877-04E/PQ 8-bit MCU 14KB Flash 4MHz MQFP-44 PIC16F877 industrial sensor hub PIC16F877 last time buy replacement

Related Components & Terms

Microchip Technology PIC16F877-04E/PQ PIC16F877 PIC16F887 PIC16F877A PIC16 8-bit microcontroller RISC Harvard architecture CMOS Flash MQFP-44 MQFP TQFP surface mount ADC 10-bit USART MSSP SPI I2C Parallel Slave Port CCP PWM RoHS REACH Pb-free Extended temperature grade automotive grade industrial control HVAC controller motor control data logger
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