PIC16LF874-04/P - 8-bit 4MHz PIC MCU, 7KB Flash, 40-PDIP | Microchip
MPN: PIC16LF874-04/P ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $9.85 | $9.85 |
| 10 | $8.92 | $89.20 |
| 100 | $7.65 | $765.00 |
| 500 | $6.9 | $3,450.00 |
| 1,000 | $6.2 | $6,200.00 |
PIC16LF874-04/P Overview
A PIC microcontroller (Programmable Interface Controller) is an 8-bit RISC-based microcontroller built on Harvard architecture, widely used in embedded control. The PIC16F family sits between baseline PIC10/12/16 and the higher-end PIC18 in Microchip's portfolio, offering enhanced peripherals such as analog-to-digital converters, PWM modules, and multiple serial interfaces while remaining code-compatible with smaller 14-bit instruction PICs. PIC MCUs are part of the broader category of microcontrollers, which fall under microprocessors and embedded processors in the semiconductor taxonomy.
Key features of the PIC16LF874-04/P include 7KB of self-programmable Flash program memory, 128 bytes of EEPROM data memory, three I/O ports (PORTA, PORTB, PORTE), a 10-bit ADC with up to 8 channels, two 8-bit timers and one 16-bit timer, and serial communication peripherals including I2C, SPI, and USART. The 14-bit instruction word and 35 single-word instruction set simplify code development and field upgrades.
Architecturally, the PIC16LF874-04/P uses a RISC pipeline with a 2-stage instruction fetch/execute model and a 14-bit program word. Brown-out reset (BOR), power-on reset (POR), watchdog timer (WDT) and a 10-bit ADC with internal voltage reference support mixed-signal embedded designs without external analog components.
Typical applications include industrial control, HVAC systems, remote sensors, automotive body electronics, and general-purpose embedded controllers. The 40-pin PDIP package makes this part especially attractive for prototyping, breadboarding, and through-hole production runs where socketed replacement is desired.
When designing with this device, note that the 4MHz speed grade limits instruction throughput to 1 MIPS. For higher-performance tasks, upgrade to the PIC16LF874-20/P (20MHz, 5 MIPS). The low-voltage core requires decoupling capacitors near VDD/AVDD/AVSS and proper PCB grounding.
This page synthesizes distributor pricing, drop-in same-package alternatives from the PIC16F/LF874 family, and practical design notes not aggregated on the manufacturer datasheet.
Drop-in alternatives for PIC16LF874-04/P — 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 PIC16LF874-04/P (same form factor and footprint) — differing in Program Memory (Flash), Timers, Core, Core Architecture, Data EEPROM.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16LF874-04I/P
✅ Drop-In✓ In Stock
$5.45 / Unit
View Datasheet →PIC16LF874A-04/P
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874-04/PQ
✅ Drop-In✓ In Stock
$5.9 / Unit
View Datasheet →PIC16LF874-10/P
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16LF874-20/P
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16LF877-04/P
✅ Drop-In✓ In Stock
$5.45 / Unit
View Datasheet →PIC16LF874-04/P Maximum Ratings & Electrical Characteristics
| Product Family | PIC PIC® 16F |
| Core | 8-bit RISC PIC16 |
| Core Architecture | Harvard |
| Instruction Set Width | 14-bit |
| Number of Instructions | 35 single-word |
| Maximum CPU Frequency | 4 MHz |
| Program Memory (Flash) | 7 KB (4K x 14) |
| Data RAM | 192 bytes |
| Data EEPROM | 128 bytes |
| I/O Pins | 33 |
| ADC | 10-bit, 8 channels |
| Timers | Two 8-bit + one 16-bit |
| Communication Interfaces | I2C, SPI, USART (UART) |
| Operating Voltage Range | 2.0 V to 5.5 V |
| Package | 40-pin PDIP |
| Mounting Type | Through-Hole (THT) |
| Temperature Grade | Commercial |
| Brown-Out Reset | Yes |
| Watchdog Timer | Yes |
| RoHS Status | Compliant |
PIC16LF874-04/P Pin Configuration
| Pin 1 | MCLR/VPP — Master Clear (reset) input / programming voltage |
| 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 digital supply voltage |
| Pin 12 | VSS — Digital ground |
| Pin 13 | OSC1/CLKIN — Oscillator input / external clock input |
| Pin 14 | OSC2/CLKOUT — Oscillator output / clock output |
| Pin 15 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / clock input |
| Pin 16 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / Capture/Compare/PWM 2 |
| Pin 17 | RC2/CCP1 — PORTC bit 2 / Capture/Compare/PWM 1 |
| 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 / clock |
| Pin 26 | RC7/RX/DT — PORTC bit 7 / USART RX / 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 — Digital ground |
| Pin 32 | VDD — Positive digital supply voltage |
| 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 |
Typical Applications
PIC16LF874-04/P is suitable for 7 applications: Industrial Control and Automation, HVAC and Building Automation, Remote Sensors and Battery-Powered Nodes, Automotive Body Electronics (Non-Safety), General-Purpose Embedded Controllers, Educational and Training Platforms, Appliance Control and White Goods.
Industrial Control and Automation
The PIC16LF874-04/P's 7KB Flash, 192 bytes RAM, 33 I/O pins, and 10-bit ADC make it well suited to industrial control loops and machine automation. Its 2.0V-5.5V operating range, brown-out reset, and watchdog timer support reliable operation in factory environments where supply transients and EMI are common. The I2C/SPI/USART peripherals connect directly to sensors, motor drivers, and HMI displays, while the 40-PDIP package simplifies through-hole assembly in legacy industrial designs and field-serviceable controllers.
Recommended
HVAC and Building Automation
The PIC16LF874-04/P fits HVAC and building-automation applications where its 8-bit PIC16 RISC core and 10-bit ADC drive temperature, humidity, and pressure sensors. The 35-instruction 14-bit instruction set simplifies firmware development for thermostat logic, damper control, and valve actuation. USART and I2C interfaces connect to wireless modules, BACnet bridges, or Modbus slaves, and the 40-PDIP through-hole package is convenient for thermostat and controller housings that may require socketed MCU replacement.
Recommended
Remote Sensors and Battery-Powered Nodes
The PIC16LF874-04/P's LF low-voltage core (2.0V-5.5V) and 192-byte RAM make it a strong fit for remote wireless sensor nodes operating from two AA cells or a single Li-ion cell. The 4MHz speed grade limits active current draw while preserving compute capability for sensor sampling and basic radio stack control. Brown-out reset and the integrated watchdog prevent firmware lockups in unattended field installations, and the 40-PDIP package is friendly to lab prototypes before moving to QFN surface-mount.
Recommended
Automotive Body Electronics (Non-Safety)
Non-safety automotive body modules such as lighting controllers, mirror adjusters, and accessory multiplexers historically use the PIC16LF874-04/P due to its 8-bit predictability, integrated ADC for current sensing, and USART for LIN-bus bit-banged slave nodes. The 'LF' voltage range tolerates load-dump transients when paired with external regulation. Note that this part is not AEC-Q100 qualified; for safety applications choose the PIC16F874A-I/P industrial-grade variant and add automotive-grade external components.
Recommended
General-Purpose Embedded Controllers
The PIC16LF874-04/P serves as a versatile general-purpose 8-bit controller for educational kits, hobby projects, retro-computing builds, and small-batch industrial products. Its 35-instruction RISC architecture and generous 33 I/O pins support everything from LED chasers to stepper-motor drivers. The 40-PDIP package is breadboard-friendly and supports ICSP (In-Circuit Serial Programming) for iterative development. 7KB of Flash accommodates moderate firmware with USB stack, sensor fusion, or basic TCP/IP over external modules.
Recommended
Educational and Training Platforms
The PIC16LF874-04/P is widely used in university microcontroller courses, training labs, and certification programs because the PIC16 instruction set is well documented in textbooks and the 40-PDIP package fits standard development boards. Its 7KB Flash holds moderate example projects (LED matrix, UART communication, ADC sampling) while the integrated peripherals teach bus-protocol fundamentals. MPLAB X IDE and XC8 compiler support is mature, with abundant example code from Microchip's application library.
Recommended
Appliance Control and White Goods
The PIC16LF874-04/P drives white-goods controllers in washing machines, dishwashers, microwave ovens, and small kitchen appliances where a proven 8-bit core and 40-PDIP serviceability are required. The 10-bit ADC reads temperature sensors, water-level probes, and motor-current feedback; PWM modules control triac-fired heaters and small universal motors; and USART interfaces to LED display or inverter boards. The LF voltage range tolerates rectified mains rails after step-down regulation.
Recommended
Recommended Products Summary
Engineering reference data for PIC16LF874-04/P — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16LF874-04I/P | PIC16LF874A-04/P | PIC16F874-04/P | PIC16LF874-10/P | PIC16LF874-20/P |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 40-PDIP | 40-PDIP - same | 40-PDIP - same | 40-PDIP - same | 40-PDIP - same | 40-PDIP - same |
| Maximum CPU Frequency | 4 MHz (1 MIPS) | 4 MHz (1 MIPS) | 4 MHz (1 MIPS) | 4 MHz (1 MIPS) | 10 MHz (2.5 MIPS) | 20 MHz (5 MIPS) |
| Operating Voltage Range | 2.0 V to 5.5 V | 2.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 | 2.0 V to 5.5 V |
| Program Memory (Flash) | 7 KB | 7 KB | 7 KB | 7 KB | 7 KB | 7 KB |
| Data RAM | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 192 bytes |
| I/O Pins | 33 | 33 | 33 | 33 | 33 | 33 |
| Temperature Grade | Commercial (0C to +70C) | Industrial (-40C to +85C) | Commercial | Commercial | Commercial | Commercial |
| Silicon Revision | Original (non-A) | Original (non-A) | Revision A | Original (non-A) | Original (non-A) | Original (non-A) |
Key Differentiators
- Low-voltage LF core supports 2.0V-5.5V operation (vs PIC16F874-04/P)
- Higher performance option exists in same package (vs PIC16LF874-04/P)
- Industrial temperature variant for harsh environments (vs PIC16LF874A-04/P)
- Silicon A revision with improved ADC and oscillator options (vs PIC16LF874-04/P)
Design Notes
Decouple VDD/VSS (pins 11/12 and 31/32) and AVDD/AVSS (separate analog supply on the die, brought to VDD/VSS in this PDIP package per datasheet) with 100nF ceramic capacitors placed within 5mm of the MCU pins, plus a 10uF tantalum or aluminum bulk capacitor on the supply rail. Brown-out reset (BOR) is enabled by configuration fuse and prevents code execution when VDD falls below the BOR threshold (~4V for F variant, ~2.5V for LF variant), protecting EEPROM and ensuring defined startup.
Never leave the MCLR/VPP pin floating; tie it to VDD through a 10kohm resistor or drive it from a supervisor/reset IC. The PIC16F874 cannot tolerate MCLR floating because the internal weak pull-up is disabled by configuration fuse. Also, do not exceed the 4MHz oscillator specification on the '-04' speed grade - PIC16F874 maximum is 20MHz. Mismatched clock configuration register values are the most common firmware hang on this part.
For the 40-PDIP package, route the high-current switching outputs (CCP1, CCP2 PWM) and the USART lines (RC6/RC7) away from the oscillator pins (OSC1/OSC2) and the analog inputs (RA0-RA5/RE0-RE2) to minimize coupling. Place the crystal or resonator within 10mm of OSC1/OSC2 with grounded guard traces. The Parallel Slave Port (PORTD + PORTE) should remain traces short if used, or left unconnected if PSP is unused in firmware.
ICSP programming requires access to MCLR/VPP, RB6/PGC, RB7/PGD, VDD, and VSS on the production PCB. According to Microchip's ICSP layout guidelines, place a 2x5 header or test points on these signals so that the PICkit programmer can attach without removing the MCU from the board. The PGC/PGD traces should be short (<50mm) and not share vias with switching signals to ensure reliable programming at production temperatures.
At the maximum 4MHz clock with all peripherals active, the PIC16LF874-04/P draws approximately 2-5 mA from VDD. Power dissipation is therefore <30 mW - the 40-PDIP package easily handles this with theta_JA of ~50 C/W and no heatsinking required. However, in designs with high I/O sink current (e.g., direct LED drive), verify that total port-pin current does not exceed the 200 mA absolute maximum per port and 500 mA for the device.
Compliance Information
RoHS and lead-free per Microchip product page. Not AEC-Q100 qualified; the PIC16F874A-I/P industrial-grade variant is the typical upgrade for harsh-temperature designs. Halogen-free status not explicitly stated in the verified data.