PIC16F874-04E/PQ - 4MHz 8-bit PIC MCU 7KB Flash 44-MQFP | Microchip
MPN: PIC16F874-04E/PQ ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $7.42 | $7.42 |
| 10 | $6.95 | $69.50 |
| 100 | $6.21 | $621.00 |
| 500 | $5.62 | $2,810.00 |
| 1,000 | $5.1 | $5,100.00 |
PIC16F874-04E/PQ Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, non-volatile program memory (FLASH/ROM), volatile data memory (RAM), and configurable I/O peripherals onto one die. The PIC16F874-04E/PQ belongs to the broader product taxonomy: PIC16 mid-range family -> 8-bit PIC microcontrollers -> Microcontroller ICs -> Integrated Circuits -> Semiconductors. Within the power-management hierarchy, the device is the central "brain" that orchestrates analog and digital peripherals on a PCB.
Key features include an integrated 10-bit successive-approximation ADC with up to 8 channels, a USART module for asynchronous serial communication, a Synchronous Serial Port (SSP) supporting SPI and I2C master/slave modes, two 8-bit timers plus one 16-bit timer with capture/compare/PWM, a watchdog timer with its own on-chip RC oscillator, and a brown-out reset circuit. The device operates from 4.0 V to 5.5 V and offers up to 33 digital I/O lines across five ports (PORTA-PORTE), making it suitable for mixed-signal embedded designs.
The architecture combines a Harvard-bus CPU with peripheral modules clocked from a user-supplied oscillator; instruction throughput of 5 MIPS at 20 MHz enables real-time control loops. In-circuit serial programming (ICSP) is supported via two pins, allowing firmware updates after PCB assembly.
Typical applications include industrial control panels, automotive body and chassis subsystems (the -E temperature grade is qualified for this segment), appliance controllers, instrumentation front-ends, and sensor-interface boards that need EEPROM-backed data logging.
When designing with this MCU, plan the oscillator and ICSP layout carefully: place the 4 MHz crystal within 5 mm of OSC1/OSC2, and keep the ICSP lines accessible. The 44-MQFP footprint also has a pin-compatible 40-pin PDIP cousin (PIC16F874-04/P) for through-hole prototypes.
This page synthesizes distributor pricing, drop-in same-package alternatives, and practical design notes that go beyond the manufacturer datasheet summary, helping engineers evaluate the PIC16F874-04E/PQ for new designs and legacy maintenance.
Drop-in alternatives for PIC16F874-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 PIC16F874-04E/PQ (same form factor and footprint) — differing in Core Architecture, Package, Timers, Operating Temperature, Instruction Cycle Time.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F874-04/PQ
✅ Drop-In✓ In Stock
$5.9 / Unit
View Datasheet →PIC16F874-04/L
✅ Drop-In✓ In Stock
$6.85 / Unit
View Datasheet →PIC16F877-04/PQ
✅ Drop-In✓ In Stock
$5.7 / Unit
View Datasheet →PIC16F874-04I/PQ
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$5.78 / Unit
View Datasheet →PIC16F871-I/PT
✅ Drop-In✓ In Stock
$2.82 / Unit
View Datasheet →PIC16F874-04E/PQ Maximum Ratings & Electrical Characteristics
| Core Architecture | 8-bit RISC (PIC16 mid-range) |
| Instruction Set Width | 14-bit |
| Number of Instructions | 35 (single-word) |
| Program Memory Type | FLASH |
| Program Memory Size | 7 KB (4K x 14) |
| RAM Size | 192 bytes |
| EEPROM Size | 128 bytes |
| Maximum Clock Frequency | 20 MHz (4 MHz external oscillator for -04 speed grade) |
| Instruction Cycle Time | 200 ns at 20 MHz |
| Supply Voltage | 4.0 V to 5.5 V |
| I/O Pins | 33 |
| ADC | 10-bit, up to 8 channels |
| Timers | 2 x 8-bit + 1 x 16-bit with CCP |
| Communication Modules | USART (SCI), SSP (SPI / I2C) |
| Watchdog Timer | Yes, with dedicated on-chip RC oscillator |
| Brown-Out Reset | Yes |
| In-Circuit Serial Programming (ICSP) | Yes |
| Package | 44-pin MQFP (10x10 mm), Gull-Wing leads |
| Temperature Grade | AUTOMOTIVE (-E suffix, -40C to +125C) |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
PIC16F874-04E/PQ Pin Configuration
| Pin 1 | MCLR/VPP — Master Clear (reset, active low) / Programming voltage input |
| Pin 2 | RA0/AN0 — PORTA bit 0 / Analog input 0 |
| Pin 3 | RA1/AN1 — PORTA bit 1 / Analog input 1 |
| Pin 4 | RA2/AN2/VREF- — PORTA bit 2 / Analog input 2 / ADC Vref- |
| 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-port read / Analog input 5 |
| Pin 9 | RE1/WR/AN6 — PORTE bit 1 / Parallel-port write / Analog input 6 |
| Pin 10 | RE2/CS/AN7 — PORTE bit 2 / Parallel-port chip-select / Analog input 7 |
| Pin 11 | VDD — Positive supply voltage |
| Pin 12 | VSS — Ground reference |
| Pin 13 | OSC1/CLKIN — Oscillator crystal input / external clock input |
| Pin 14 | OSC2/CLKOUT — Oscillator crystal 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 output |
| Pin 17 | RC2/CCP1 — PORTC bit 2 / CCP1 output (PWM) |
| Pin 18 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Pin 19 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port bit 0 |
| Pin 20 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port bit 1 |
| Pin 21 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port bit 2 |
| Pin 22 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port 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 TX / USART clock |
| Pin 26 | RC7/RX/DT — PORTC bit 7 / USART RX / USART data |
| Pin 27 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port bit 4 |
| Pin 28 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port bit 5 |
| Pin 29 | RD6/PSP6 — PORTD bit 6 / Parallel Slave Port bit 6 |
| Pin 30 | RD7/PSP7 — PORTD bit 7 / Parallel Slave Port bit 7 |
| Pin 31 | VSS — Ground reference |
| Pin 32 | VDD — Positive supply voltage |
| 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 / LVP 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
PIC16F874-04E/PQ is suitable for 6 applications: Automotive Body Control Module, Industrial Control Panel, Appliance Motor Controller, Sensor Interface / Data Logger, Instrumentation Front-End, Smart Home / IoT Edge Node.
Automotive Body Control Module
The PIC16F874-04E/PQ's -40C to +125C automotive temperature grade makes it a natural fit for body and chassis control subsystems where under-hood or cabin heat would otherwise compromise commercial-grade MCUs. The PIC16F874's 5 MIPS throughput at 20 MHz instruction rate is sufficient for real-time body tasks such as window lift control, mirror positioning, and lighting sequencing, while the 33 digital I/O lines drive relays and switch matrices directly. The on-chip 10-bit ADC samples sensor inputs (temperature, position feedback) at up to 8 channels, eliminating an external ADC. EEPROM-backed non-volatile memory stores trim values and fault logs that survive battery disconnection.
Recommended
Industrial Control Panel
On factory floors the PIC16F874-04E/PQ controls discrete I/O, drives 7-segment or character LCDs, and reads analog sensors through its integrated 10-bit ADC. With 7 KB of FLASH the device can host a small RTOS-style scheduler for sequencing valves, conveyor motors, and interlocks; the 192 bytes of RAM are adequate for typical panel-state machines. The 33 I/O lines and the SPI/I2C peripherals of the PIC16F874 let a single MCU drive an operator keypad, an LCD, and several sensors without external bus expanders. Robust brown-out reset on the PIC16F874 protects against noisy 24 V industrial supply rails that step down to 5 V.
Recommended
Appliance Motor Controller
White-goods appliances such as washing machines, dishwashers, and refrigerator compressors benefit from the PIC16F874-04E/PQ's PWM/CCP modules and its 16-bit timer that supports precise duty-cycle generation for triac-gated motor phases. The PIC16F874's 7 KB FLASH holds speed profiles and sensor-fusion logic, while the 128-byte EEPROM stores cycle counters, calibration constants, and last-used settings across power cycles. The -40C to +125C operating range of the PIC16F874-04E handles compressor-bay heat in refrigerators, where ambient temperatures can exceed 70C.
Recommended
Sensor Interface / Data Logger
The PIC16F874-04E/PQ's 10-bit ADC plus on-chip 128-byte EEPROM makes it a compact choice for stand-alone sensor-interface boards that periodically sample and log data. The 192-byte RAM buffers samples before committing them to EEPROM in page-write cycles, and the USART module of the PIC16F874 forwards the log to a host PC for analysis. Brown-out reset prevents corrupted EEPROM writes during brown-out events. With the -E automotive grade, the PIC16F874-04E/PQ handles under-hood automotive logging such as battery-health and tire-pressure monitoring.
Recommended
Instrumentation Front-End
Test-and-measurement front-ends leverage the PIC16F874-04E/PQ's ADC, USART, and ICSP for field-programmable bench instruments. The PIC16F874's 10-bit ADC with up to 8 channels handles multi-channel analog scanning, while the USART pipes measurements to a host display. The -E temperature grade tolerates thermally demanding lab environments. The ICSP feature of the PIC16F874 lets engineers iterate on firmware without removing the chip, which is especially useful for one-off prototype boxes and remote sensors.
Recommended
Smart Home / IoT Edge Node
In IoT edge nodes the PIC16F874-04E/PQ serves as a low-power local controller that wakes on interrupt, reads sensors via its 10-bit ADC, and forwards data over the USART to a Wi-Fi or sub-GHz radio module. The 7 KB FLASH of the PIC16F874 fits small MQTT or Modbus client stacks, and the 192-byte RAM is sufficient for buffer-and-forward operation. ICSP allows over-the-air firmware updates routed through an external bootloader. Designers can prototype with the 44-MQFP and migrate firmware to smaller PIC16 parts once the code size is finalized.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F874-04E/PQ — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F874-04/PQ | PIC16F874-04/L | PIC16F877-04/PQ | PIC16F874-04I/PQ | PIC16F871-I/PT |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-MQFP (10x10 mm) | 44-MQFP (10x10 mm) - same | 44-MQFP (10x10 mm) - same | 44-MQFP (10x10 mm) - same | 44-MQFP (10x10 mm) - same | 44-MQFP (10x10 mm) - same |
| Program Memory (FLASH) | 7 KB (4K x 14) | 7 KB (4K x 14) - same | 7 KB (4K x 14) - same | 14 KB (8K x 14) | 7 KB (4K x 14) - same | 5.5 KB |
| RAM | 192 bytes | 192 bytes - same | 192 bytes - same | 256 bytes | 192 bytes - same | 128 bytes |
| EEPROM | 128 bytes | 128 bytes - same | 128 bytes - same | 256 bytes | 128 bytes - same | 64 bytes |
| Max Clock Frequency | 20 MHz (4 MHz external for -04) | 20 MHz (4 MHz for -04) - same | 20 MHz (4 MHz for -04) - same | 20 MHz (4 MHz for -04) - same | 20 MHz (4 MHz for -04) - same | 20 MHz |
| Temperature Grade | Automotive -40C to +125C (-E) | Commercial 0C to +70C | Commercial 0C to +70C | Commercial 0C to +70C | Industrial -40C to +85C | Industrial -40C to +85C |
| I/O Pins | 33 | 33 - same | 33 - same | 33 - same | 33 - same | 33 |
| ADC | 10-bit, 8 channels | 10-bit, 8 channels - same | 10-bit, 8 channels - same | 10-bit, 8 channels - same | 10-bit, 8 channels - same | 10-bit, 8 channels |
Key Differentiators
- Automotive temperature grade (-E) in the same 44-MQFP footprint (vs PIC16F874-04/PQ)
- More program memory than the PIC16F871 family (vs PIC16F871-I/PT)
- Upgrade path with same footprint (vs PIC16F877-04/PQ)
Design Notes
Place the 4 MHz crystal (or ceramic resonator) within 5 mm of the PIC16F874-04E/PQ's OSC1 (pin 13) and OSC2 (pin 14) pins, with short, symmetrical traces and a ground guard ring to minimize EMI pickup. Both VDD pins (11 and 32) require individual 0.1 uF ceramic bypass capacitors placed as close to the pins as possible, plus a 10 uF tantalum bulk capacitor on the supply rail. Decoupling the two VDD pins separately is critical because the ADC's analog VREF can share an internal rail with digital VDD.
Brown-out reset (BOR) is enabled by configuration fuse on the PIC16F874-04E/PQ and protects against EEPROM corruption during 5 V rail dips. Confirm BOR voltage threshold in the configuration bits to match the minimum rail (4.0 V). For automotive supplies where load-dump transients can exceed 40 V, add a TVS diode (e.g., SMBJ5.0A) and a series inductor ahead of the 5 V regulator. Estimated: at 20 MHz and 5 V, the PIC16F874 typically draws 15 mA, but verify on your board with the actual firmware.
Keep ICSP pins PGC (pin 39) and PGD (pin 40) accessible on the PCB or via test points to enable in-circuit firmware updates without removing the PIC16F874-04E/PQ. Route RB6/PGC and RB7/PGD away from high-current switching nodes and away from analog ADC traces to prevent programming glitches. The MCLR/VPP pin (pin 1) must have a 10 kohm pull-up to VDD and a 100 nF decoupling cap to ground; this is essential for proper reset and ICSP entry.
A common pitfall with the PIC16F874-04E/PQ is exceeding the 4 MHz maximum external oscillator input - this is the -04 speed variant. Substituting a 20 MHz crystal on the OSC1 pin will cause the MCU to malfunction, and the PIC16F874-20 (not -04) speed grade is required. Also note that the automotive "-E" temperature grade part may be substituted in commercial-only designs, but the reverse is not true: do not use a commercial-grade PIC16F874-04/PQ in automotive (-40C to +125C) applications.
Compliance Information
RoHS and lead-free per Microchip product page. -E suffix denotes automotive temperature grade per Microchip's product family designation, but explicit AEC-Q100 qualification is not separately documented in the verified web data - see manufacturer datasheet for full automotive compliance status.