PIC16F874-04/L - 8-Bit 4MHz 7KB Flash MCU 44-PLCC | Microchip
MPN: PIC16F874-04/L β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $11.44 | $11.44 |
| 10 | $10.3 | $103.00 |
| 100 | $9.15 | $915.00 |
| 500 | $8 | $4,000.00 |
| 1,000 | $6.85 | $6,850.00 |
PIC16F874-04/L Overview
A PIC microcontroller is a programmable system-on-chip that combines a RISC CPU core, non-volatile program memory, RAM, EEPROM, and on-chip peripherals (timers, ADC, USART, I2C/SPI, PWM) into a single IC. Within the broader taxonomy, the PIC16F874 belongs to the mid-range PIC16 family, which sits between the baseline PIC10/12/16 family and the high-performance PIC18 and dsPIC families. Mid-range PICs are widely used in industrial control, automotive body electronics, and consumer appliances because of their deterministic architecture, low power consumption, and free MPLAB X IDE toolchain.
Key features of the PIC16F874-04/L include five 8-bit/16-bit timer/counter modules, a 10-bit ADC with up to 8 channels, a USART with support for RS-485/RS-232, an MSSP module supporting SPI and I2C (master/slave), a parallel slave port for external bus interfacing, and a 14-bit instruction word optimized for C and assembly development. The 04 speed grade limits the oscillator to 4 MHz, yielding 1 us instruction cycles, which is well-suited to applications that do not require high-speed sampling.
Architecturally, the PIC16F874 uses a Harvard RISC core with separate code and data buses, a hardware multiplier is absent on this mid-range device, and interrupt handling is vectored with prioritized sources. The FLASH memory supports in-circuit serial programming (ICSP) via RB6/RB7, enabling field firmware updates without removing the device from the board.
Typical applications include industrial automation controllers, HVAC and thermostat systems, motor control front-ends, smart sensor hubs, and legacy embedded products migrating from PIC16C/CR to FLASH. The 44-PLCC package offers socketed replacement-friendly mounting for low-volume and prototyping builds. According to Microchip, the PIC16F874 is recommended for new designs; engineers are pointed to PIC16F884 for new designs that need more memory, ADC channels, and peripherals.
When designing with this MCU, allocate a 100 nF decoupling capacitor within 5 mm of VDD and a 10 uF bulk capacitor near the ICSP header. Use a 4 MHz crystal with 22 pF load capacitors if higher timing accuracy than the internal RC oscillator is required. Note that the 04 speed grade caps oscillator frequency at 4 MHz; if 20 MHz operation is needed, select the PIC16F874-20/L variant.
Drop-in alternatives for PIC16F874-04/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-04/L (same form factor and footprint) β differing in Package, Core Architecture, Timers, Communication Peripherals, Maximum Clock Frequency.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F874-20/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F874-04I/L
β Drop-Inβ In Stock
$5.4 / Unit
View Datasheet βPIC16F874-20I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F884-I/L
β Drop-Inπ Reference alternative (not in catalog)
PIC16F874-04/L Maximum Ratings & Electrical Characteristics
| Core Architecture | 8-bit PIC16 mid-range RISC |
| Program Memory Type | FLASH |
| Program Memory Size | 7 KB (4K x 14 words) |
| SRAM | 192 bytes |
| EEPROM | 128 bytes |
| Maximum CPU Clock | 4 MHz |
| Instruction Cycle Time | 200 ns (at 20 MHz) / 1 us at 4 MHz |
| Supply Voltage (VDD) | 4 V to 5.5 V |
| I/O Pins | 33 |
| Package | 44-pin PLCC (J-lead) |
| Operating Temperature | 0C to +70C (commercial, /L) |
| ADC | 10-bit, up to 8 channels |
| Timers | Three 8/16-bit timers (Timer0, Timer1, Timer2) |
| Communication Peripherals | USART (RS-232/RS-485), MSSP (SPI/I2C) |
| Parallel Slave Port | Yes (8-bit PSP) |
| ICSP | In-Circuit Serial Programming (RB6/RB7) |
| RoHS Status | Compliant |
PIC16F874-04/L Pin Configuration
| Pin 1 | MCLR/VPP β Master clear (reset) input / programming voltage input |
| 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 / VREF+ |
| 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 / parallel slave port read / AN5 |
| Pin 9 | RE1/WR/AN6 β PORTE bit 1 / parallel slave port write / AN6 |
| Pin 10 | RE2/CS/AN7 β PORTE bit 2 / parallel slave port chip select / AN7 |
| Pin 11 | VDD β Positive supply voltage (4V to 5.5V) |
| Pin 12 | VSS β Ground reference |
| 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 |
| Pin 16 | RC1/T1OSI/CCP2 β PORTC bit 1 / Timer1 oscillator input / CCP2 PWM |
| Pin 17 | RC2/CCP1 β PORTC bit 2 / CCP1 PWM output |
| Pin 18 | RC3/SCK/SCL β PORTC bit 3 / SPI clock / I2C clock |
| Pin 19 | RC4/SDI/SDA β PORTC bit 4 / SPI data in / I2C data |
| Pin 20 | RC5/SDO β PORTC bit 5 / SPI data out |
| Pin 21 | RC6/TX/CK β PORTC bit 6 / USART TX / clock |
| Pin 22 | RC7/RX/DT β PORTC bit 7 / USART RX / data |
| Pin 23 | RB0/INT β PORTB bit 0 / external interrupt input |
| Pin 24 | RB1 β PORTB bit 1 |
| Pin 25 | RB2 β PORTB bit 2 |
| Pin 26 | RB3/PGM β PORTB bit 3 / low-voltage programming |
| Pin 27 | RB4 β PORTB bit 4 |
| Pin 28 | RB5 β PORTB bit 5 |
| Pin 29 | RB6/PGC β PORTB bit 6 / ICSP clock |
| Pin 30 | RB7/PGD β PORTB bit 7 / ICSP data |
| Pin 31 | VSS β Ground reference |
| Pin 32 | VDD β Positive supply voltage (4V to 5.5V) |
| Pin 33 | RD0/PSP0 β PORTD bit 0 / parallel slave port bit 0 |
| Pin 34 | RD1/PSP1 β PORTD bit 1 / parallel slave port bit 1 |
| Pin 35 | RD2/PSP2 β PORTD bit 2 / parallel slave port bit 2 |
| Pin 36 | RD3/PSP3 β PORTD bit 3 / parallel slave port bit 3 |
| Pin 37 | RD4/PSP4 β PORTD bit 4 / parallel slave port bit 4 |
| Pin 38 | RD5/PSP5 β PORTD bit 5 / parallel slave port bit 5 |
| Pin 39 | RD6/PSP6 β PORTD bit 6 / parallel slave port bit 6 |
| Pin 40 | RD7/PSP7 β PORTD bit 7 / parallel slave port bit 7 |
Typical Applications
PIC16F874-04/L is suitable for 6 applications: Industrial Automation Controller, HVAC Thermostat and Climate Control, Motor Control Front-End, Smart Sensor Hub and Data Logger, Consumer Appliance Control Board, Legacy Industrial Controller Replacement.
Industrial Automation Controller
The PIC16F874-04/L fits industrial control because its 33 I/O pins drive relays, contactors, and indicator panels without external mux logic. Its 7 KB FLASH holds ladder-logic-style state machines, while the 128-byte EEPROM stores non-volatile calibration constants and trip thresholds across power cycles. The 10-bit ADC with 8 channels digitizes 4-20 mA loop signals and 0-10 V process variables, and the USART links to an HMI or PLC over RS-485 at up to 4 MHz. Designers benefit from PIC16F874-04/L's proven mid-range RISC core, deterministic 1 us instruction cycle, and the free MPLAB X IDE toolchain, all of which reduce firmware risk in long-life factory automation projects.
Recommended
HVAC Thermostat and Climate Control
The PIC16F874-04/L is well-suited to HVAC thermostats because it integrates a 10-bit ADC for NTC thermistor temperature sensing, PWM outputs for damper and valve actuation, and 192 bytes of SRAM sufficient for scheduling state. Operating from a 5 V supply matches common HVAC control boards, and the 0-70C commercial temperature range covers indoor equipment. The MSSP module connects to wall-mounted display boards via I2C, while the USART links to a Wi-Fi or Zigbee module for smart-thermostat connectivity. With 7 KB of FLASH, the device accommodates full scheduling logic, PID control loops, and a user interface driver without external memory.
Recommended
Motor Control Front-End
The PIC16F874-04/L drives small BLDC or stepper motor control front-ends by generating PWM on CCP modules, sampling current via the 10-bit ADC, and sequencing commutation through GPIO. Its 4 MHz clock yields 1 us PWM resolution at 20 kHz switching frequency, sufficient for fractional-horsepower fans and pumps. The USART provides a debug and command channel to a host controller or inverter display. With 33 I/O, designers can connect Hall sensors, encoder feedback, and fault indicators directly to the MCU, eliminating the need for an I/O expander. The 44-pin PLCC package is socketed, simplifying bench tuning and field service.
Recommended
Smart Sensor Hub and Data Logger
The PIC16F874-04/L serves as a smart sensor hub by aggregating multiple analog inputs through its 8-channel 10-bit ADC, conditioning data, and forwarding it via USART or SPI to a host processor. Its 128-byte EEPROM stores calibration coefficients and sensor identity for plug-and-play replacement, while the 192-byte SRAM holds 32 latest samples for averaging. The MSSP module reads I2C temperature, humidity, or pressure sensors without an external bus controller. ICSP via RB6/RB7 enables in-the-field firmware updates as sensor algorithms evolve. This makes PIC16F874-04/L an ideal low-power data aggregator for industrial IoT edge nodes.
Recommended
Consumer Appliance Control Board
The PIC16F874-04/L is widely used in consumer appliances like washing machines, microwave ovens, and coffee makers because of its 33 I/O capability, integrated timers, and free development tools. The 10-bit ADC reads water level, temperature, and humidity sensors, while PWM outputs drive solenoid valves, triac-fired heaters, and brushless DC motors. The USART connects to LED or LCD user interfaces, and the parallel slave port allows a graphics controller to share memory. With 7 KB FLASH, designers implement complete wash-cycle programs, user menus, and diagnostic routines without external program memory.
Recommended
Legacy Industrial Controller Replacement
The PIC16F874-04/L is the go-to choice for maintaining and replicating legacy industrial controllers that originally used PIC16C, PIC16CR, or PIC16F parts in 40-pin PDIP or 44-pin PLCC sockets. Engineers can drop it into existing PCB footprints without redesigning the board, and use ICSP to program it without removing it from the circuit. The 7 KB FLASH, 192-byte SRAM, and 128-byte EEPROM match the resource profile of mid-1990s designs, allowing straightforward firmware porting. Industrial customers with installed equipment that must be supported for 10-20 years rely on the PIC16F874-04/L's long-term availability and Microchip's product longevity policy.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F874-04/L β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F874-20/L | PIC16F874-04I/L | PIC16F874-20I/L | PIC16F884-I/L |
|---|---|---|---|---|---|
| Package | 44-pin PLCC | 44-pin PLCC - same | 44-pin PLCC - same | 44-pin PLCC - same | 44-pin PLCC - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Max Clock Speed | 4 MHz | 20 MHz | 4 MHz | 20 MHz | 20 MHz |
| FLASH Memory | 7 KB | 7 KB | 7 KB | 7 KB | 14 KB |
| SRAM | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 368 bytes |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 256 bytes |
| I/O Pins | 33 | 33 | 33 | 33 | 36 |
| Operating Temperature | 0C to +70C (commercial) | 0C to +70C (commercial) | -40C to +85C (industrial) | -40C to +85C (industrial) | -40C to +85C (industrial) |
Key Differentiators
- 44-pin PLCC with socketed mounting (vs PIC16F874-04/PQ (44-pin PQFP))
- Industry-standard mid-range PIC16 core with proven toolchain (vs PIC16F84A (18-pin baseline PIC))
- Long-term availability with Microchip product longevity program (vs PIC16F74 (smaller FLASH variant))
Design Notes
Estimated: at 4 MHz clock and 5 V supply, PIC16F874-04/L typical operating current is 2-5 mA, with idle current below 1 mA and sleep current around 1 uA. Place a 100 nF decoupling capacitor within 5 mm of each VDD pin and a 10 uF bulk capacitor near the ICSP header to suppress switching noise. Brown-out reset (BOR) should be enabled in CONFIG to avoid undefined behavior during slow power-down ramps below 4V.
The PIC16F874-04/L operates over 0C to +70C (commercial /L grade). For industrial environments, choose PIC16F874-04I/L rated -40C to +85C. The 44-pin PLCC package has a typical theta_JA around 60 C/W in still air, well within the device's thermal envelope since total power dissipation is below 50 mW. No heatsink is required.
Route the 4 MHz crystal traces symmetrically and keep them short (under 10 mm) with grounded guard traces to reduce EMI pickup. Use 22 pF load capacitors matched to the crystal's load specification. Place MCLR/VPP reset pull-up resistor (typically 10 kOhm) close to the pin and add a 100 nF cap if long reset traces are unavoidable. Keep ICSP lines RB6/PGC and RB7/PGD away from high-current switching traces to prevent programming glitches.
Do not exceed 5.5V on any VDD pin or apply voltage to MCLR before VDD is stable - this can trigger latch-up. The 04 speed grade caps the oscillator at 4 MHz; using a 20 MHz crystal on the 04 grade may cause intermittent operation or device damage over time. When porting code from PIC16F877, verify ADC channel count (8 vs 14) and parallel slave port pin mapping. Always set the CONFIG register for proper oscillator selection, BOR, and code protection before final firmware lock.
Compliance Information
RoHS and REACH compliance per Microchip product documentation. Not AEC-Q100 qualified; for automotive applications consider PIC16F1939 or PIC16F1829. Lead-free finish compatible with 260C peak reflow. Operating temperature 0C to +70C (commercial /L grade).