PIC16F874-04I/L - 8-bit MCU, 4MHz, 7KB Flash, 44-PLCC | Microchip
MPN: PIC16F874-04I/L β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $8.2 | $8.20 |
| 10 | $7.45 | $74.50 |
| 100 | $6.6 | $660.00 |
| 500 | $5.95 | $2,975.00 |
| 1,000 | $5.4 | $5,400.00 |
PIC16F874-04I/L Overview
What is a PIC microcontroller? The PIC (Peripheral Interface Controller) is a family of 8/16/32-bit RISC microcontrollers originally developed by General Instrument's microelectronics division and later popularized by Microchip Technology. PIC MCUs occupy the hypernym hierarchy microcontroller -> embedded processor -> semiconductor IC, and are widely adopted for deterministic real-time control tasks in industrial, automotive, and consumer applications due to their compact instruction set, low power modes, and rich peripheral integration. The PIC16F874 belongs to the PIC16F mid-range family, sitting between the baseline PIC10/12/16 and the high-performance PIC18/PIC24 families.
Key features of the PIC16F874-04I/L include 33 digital I/O lines, a 10-bit 8-channel Analog-to-Digital Converter (ADC), two 8-bit timers plus one 16-bit timer, a USART for asynchronous/synchronous serial communication, an MSSP module supporting both SPI and IΒ²C (Master/Slave), a Capture/Compare/PWM (CCP) module, and a watchdog timer with on-chip RC oscillator for reliable operation. The device supports in-circuit serial programming (ICSP) via two pins, enabling field firmware updates without desoldering.
Architecturally, the PIC16F874 employs a Harvard-style RISC core with separate program and data buses, a 14-bit instruction word, and a 200 ns instruction execution time at 4 MHz. The four available oscillator modes (RC, LP, XT, HS) plus the on-chip 4 MHz RC oscillator allow designers to balance cost, EMI, and power. An integrated brown-out reset (BOR) circuit and power-on reset (POR) ensure deterministic startup across the 4.0β5.5 V supply range.
Typical applications include industrial control panels, HVAC actuators, automotive body electronics, sensor signal conditioning, low-end human-machine interfaces (HMIs) with character LCDs, and legacy embedded designs originally built around the 16F family. The wide operating temperature range of -40 Β°C to +85 Β°C (industrial 'I' suffix) makes the part suitable for uncontrolled thermal environments.
When designing with this part, observe the 4 MHz maximum clock for the -04 speed grade; for designs migrating from the 20 MHz -20 variant, simply replace the speed-grade suffix and verify timing margins. The PLCC-44 socket allows convenient prototyping, and pin compatibility with the PIC16F877 enables memory upgrade paths without PCB rework.
This page synthesizes verified distributor pricing, drop-in alternatives within the PLCC-44 footprint, and practical design notes not found in the manufacturer datasheet alone.
Drop-in alternatives for PIC16F874-04I/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 PIC16F874-04I/L (same form factor and footprint) β differing in Package, Timers, Communication Peripherals, ADC, Core Architecture.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F877-04I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F874-20I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F874-04/L
β Drop-Inβ In Stock
$6.85 / Unit
View Datasheet βPIC16LF874-04I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F874T-04I/L
β Drop-Inβ In Stock
$4.69 / Unit
View Datasheet βPIC16F874-04I/L Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16 (8-bit RISC, Harvard) |
| Instruction Set Width | 14-bit |
| Maximum Clock Frequency | 4 MHz |
| MIPS (Dhrystone equivalent) | 4 MIPS |
| Instruction Execution Time | 200 ns @ 4 MHz |
| Program Memory (Flash) | 7 KB (4K x 14 words) |
| Data RAM | 192 bytes |
| Data EEPROM | 128 bytes |
| I/O Pins | 33 |
| ADC | 10-bit, 8 channels |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Communication Peripherals | USART, MSSP (SPI / IΒ²C) |
| CCP Modules | 1 (Capture/Compare/PWM) |
| Supply Voltage | 4.0 V to 5.5 V |
| Operating Temperature | -40 Β°C to +85 Β°C (Industrial 'I' grade) |
| Package | 44-PLCC (16.59 x 16.59 mm) |
| Mounting Type | Surface Mount (PLCC socket compatible) |
| In-Circuit Programming | ICSP (2-wire) |
| Oscillator Modes | LP, XT, HS, RC + internal 4 MHz RC |
| Watchdog Timer | Yes, with on-chip RC oscillator |
| Brown-out Reset | Yes |
| RoHS Status | Compliant |
| Speed Grade | -04 (4 MHz) |
PIC16F874-04I/L Pin Configuration
| Pin 1 | MCLR/VPP β Master Clear (Reset) input / ICSP programming voltage |
| Pin 2 | RA0/AN0 β PORTA bit 0 / Analog input channel 0 |
| Pin 3 | RA1/AN1 β PORTA bit 1 / Analog input channel 1 |
| Pin 4 | RA2/AN2 β PORTA bit 2 / Analog input channel 2 |
| Pin 5 | RA3/AN3/VREF+ β PORTA bit 3 / Analog input channel 3 / ADC positive reference |
| Pin 6 | RA4/T0CKI β PORTA bit 4 / Timer0 clock input |
| Pin 7 | RA5/AN4/SS β PORTA bit 5 / Analog input channel 4 / SPI Slave Select |
| Pin 8 | RE0/RD/AN5 β PORTE bit 0 / Read control for parallel slave port / Analog input 5 |
| Pin 9 | RE1/WR/AN6 β PORTE bit 1 / Write control for parallel slave port / Analog input 6 |
| Pin 10 | RE2/CS/AN7 β PORTE bit 2 / Chip Select for parallel slave port / Analog input 7 |
| Pin 11 | VDD β Positive supply voltage (4.0β5.5 V) |
| Pin 12 | VSS β Ground reference |
| Pin 13 | OSC1/CLKIN β Oscillator crystal input / external clock input |
| Pin 14 | OSC2/CLKOUT β Oscillator crystal output / clock output (FOSC/4) |
| 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 PWM output |
| Pin 18 | RC3/SCK/SCL β PORTC bit 3 / SPI clock / IΒ²C 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 / IΒ²C 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 reference |
| Pin 32 | VDD β Positive supply voltage (4.0β5.5 V) |
| 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 / Low-voltage ICSP programming input |
| Pin 37 | RB4 β PORTB bit 4 |
| Pin 38 | RB5 β PORTB bit 5 |
| Pin 39 | RB6/PGC β PORTB bit 6 / ICSP clock (programming/debug) |
| Pin 40 | RB7/PGD β PORTB bit 7 / ICSP data (programming/debug) |
| 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-04I/L is suitable for 6 applications: Industrial Control Panels, Automotive Body Electronics, Sensor Signal Conditioning, HVAC Actuator Control, Character LCD Human-Machine Interface, Legacy Embedded Maintenance Designs.
Industrial Control Panels
The PIC16F874-04I/L's industrial -40 Β°C to +85 Β°C temperature range, integrated brown-out reset, and 33 I/O pins make it a strong fit for industrial control panels driving relays, contactors, and indicator LEDs. Its 7 KB Flash accommodates state-machine logic and Modbus RTU slave firmware via the integrated USART. With 4 MIPS of deterministic throughput, the part executes a typical PLC scan cycle in well under 1 ms, while the 10-bit ADC reads 4β20 mA loopback signals from field transmitters. The 44-PLCC socket simplifies field replacement during maintenance. Compared with newer Cortex-M0 parts, the PIC16F874 offers lower cost for non-connected panels and a mature toolchain with MPLAB X IDE.
Recommended
Automotive Body Electronics
The PIC16F874-04I/L's -40 Β°C to +85 Β°C operating range, hardware PWM (CCP) module, and watchdog timer suit it to non-safety automotive body applications such as seat controllers, mirror adjusters, and ambient lighting drivers. The 10-bit 8-channel ADC reads multiple position sensors and temperature inputs; the MSSP drives SPI-controlled LED drivers or IΒ²C ambient-light sensors. While not AEC-Q100 qualified, the part is widely deployed in commercial-vehicle body modules where automotive certification is delegated to the vehicle-level ECU. The 44-PLCC package supports through-hole prototyping on legacy body-electronics PCBs still in production. For new designs Microchip recommends the PIC16F18877 in automotive grades.
Recommended
Sensor Signal Conditioning
The PIC16F874-04I/L's 10-bit 8-channel ADC, 192 B RAM, and 7 KB Flash make it well suited to multi-channel sensor signal-conditioning nodes that read, linearize, and forward measurement data. With 33 I/O, the part can directly drive 7β8 analog sensors plus a digital display via SPI. The MSSP IΒ²C master mode reads external digital sensors (pressure, humidity), while the CCP module generates timing pulses for ultrasonic or capacitive sensors. The on-chip 4 MHz RC oscillator reduces BOM cost for non-timing-critical applications, and the ICSP interface allows calibration updates in the field.
Recommended
HVAC Actuator Control
The PIC16F874-04I/L controls HVAC damper and valve actuators by reading temperature sensors through the 10-bit ADC and driving triac-gated outputs via the CCP PWM module. Its 4 MIPS throughput closes the PID loop in under 250 Β΅s, ensuring stable damper positioning without overshoot. The 128-byte EEPROM stores calibration coefficients for each actuator channel, while the USART connects to a building-automation bus. Industrial temperature rating supports rooftop unit deployment. The 44-PLCC socket on legacy damper boards simplifies field replacement. Compared with discrete analog PID loops, the digital implementation reduces tuning time and improves long-term stability.
Recommended
Character LCD Human-Machine Interface
The PIC16F874-04I/L drives HD44780-compatible character LCDs (16x2 or 20x4) using software-generated timings or via the MSSP SPI interface to LCD controller chips. With 7 KB Flash, the part supports menu hierarchies, button debouncing, and simple graphics in firmware. The 33 I/O handle up to a 4x4 keypad matrix plus dedicated control outputs for backlight PWM. The integrated USART enables serial debug output for in-system parameter tuning. The 44-PLCC package fits legacy industrial HMI enclosures still using through-hole assembly. Compared with character-LCD-only COB solutions, the PIC16F874 offers flexible firmware updates.
Recommended
Legacy Embedded Maintenance Designs
The PIC16F874-04I/L is the production-keepalive part for legacy products originally designed in the late 1990s and 2000s that must continue to manufacture without PCB respins. Its 44-PLCC socket and PIC16F instruction set guarantee forward compatibility with the original firmware image, while modern Microchip MPLAB X IDE supports recompilation. The -04 speed grade and -I industrial temperature rating match the original BOM. For products requiring more code space, the pin-compatible PIC16F877-04I/L or newer PIC16F884-I/L offers drop-in upgrade paths. Stock availability at major distributors remains strong as of 2026-09-21.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F874-04I/L β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F877-04I/L | PIC16F874-20I/L | PIC16F874-04/L | PIC16LF874-04I/L | PIC16F874T-04I/L |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-PLCC | 44-PLCC - same | 44-PLCC - same | 44-PLCC - same | 44-PLCC - same | 44-PLCC - same |
| Maximum Clock Frequency | 4 MHz | 4 MHz | 20 MHz | 4 MHz | 4 MHz | 4 MHz |
| Program Flash Memory | 7 KB | 14 KB | 7 KB | 7 KB | 7 KB | 7 KB |
| Data RAM | 192 bytes | 368 bytes | 192 bytes | 192 bytes | 192 bytes | 192 bytes |
| Data EEPROM | 128 bytes | 256 bytes | 128 bytes | 128 bytes | 128 bytes | 128 bytes |
| Supply Voltage Range | 4.0β5.5 V | 4.0β5.5 V | 4.0β5.5 V | 4.0β5.5 V | 2.0β5.5 V | 4.0β5.5 V |
| Operating Temperature | -40 Β°C to +85 Β°C (Industrial) | -40 Β°C to +85 Β°C (Industrial) | -40 Β°C to +85 Β°C (Industrial) | 0 Β°C to +70 Β°C (Commercial) | -40 Β°C to +85 Β°C (Industrial) | -40 Β°C to +85 Β°C (Industrial) |
| I/O Pins | 33 | 33 | 33 | 33 | 33 | 33 |
| ADC | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels |
| Lifecycle Status | Active | Active | Active | Active | Active | Active |
Key Differentiators
- Wide industrial temperature range with proven PLCC-44 supply chain (vs PIC16LF874-04I/L)
- Mature PIC16F instruction set compatibility (vs PIC16F884-I/L)
- 44-PLCC socket compatibility with PIC16F877 family (vs PIC16F874-04/P (commercial temp))
Design Notes
The PIC16F874-04I/L operates from a single 4.0β5.5 V supply. Place a 100 nF decoupling capacitor as close as possible to each VDD/VSS pin pair (pins 11/12 and 31/32), with a bulk 10 Β΅F tantalum or ceramic capacitor at the regulator output. The integrated brown-out reset (BOR) trip threshold is configurable in the configuration word; leave BOR enabled for industrial designs to avoid code execution at marginal voltages. The MCLR pin (pin 1) should be tied to VDD through a 10 kΞ© pull-up and decoupled with a 100 nF capacitor for noise immunity.
For the 44-PLCC package, use a PLCC-44 through-hole socket to support prototyping and field replacement. Reserve a 4-pin header (or 2x3 ICSP header) connected to MCLR/VPP, VDD, VSS, PGC (RB6), and PGD (RB7) to enable in-circuit serial programming and MPLAB ICD debugging without removing the MCU. Keep the trace from OSC1 to the crystal shorter than 12 mm, and guard the crystal area with a ground ring to reduce EMI. When using the on-chip 4 MHz RC oscillator (CONFIG FOSC = INTRC), leave the OSC1/OSC2 pins as GPIO on PORTA/ PORTA ALT.
Two common pitfalls: (1) Configuring analog pins without setting ADCON1 β analog pins default to analog mode on POR, so leaving the TRISA bits alone does not free a pin for digital I/O. Always write ADCON1 before reading PORTA if any pins are digital. (2) Forgetting the configuration word β the PIC16F874 requires the oscillator, watchdog, BOR, code-protect, and LVP bits to be set at programming time via the __CONFIG macro. A blank configuration word defaults to RC oscillator with WDT enabled and may leave the device unresponsive. Use MPLAB X IDE's configuration bits window to verify before programming.
When using the MSSP module in IΒ²C mode, install 4.7 kΞ© pull-ups on SDA (RC4) and SCL (RC3) to VDD, and add 100 pF series termination on long bus segments (>50 mm) to damp ringing. For SPI master mode, route SDO/SDI/SCK as a tightly coupled bus with ground guard traces; maximum SPI clock at 4 MHz FOSC is 1 MHz (FOSC/4). For ADC accuracy, place the analog input traces away from digital switching signals and add a 100 nF bypass at each analog input pin to reduce sample-charge kickback noise.
Compliance Information
RoHS and REACH compliant per Microchip product page. Not AEC-Q100 qualified β for automotive safety applications, choose PIC16F18877 in AEC-Q100 grade.