PIC16F874-04I/PT - 8-bit 7KB Flash MCU, 20MHz, TQFP-44 | Microchip
MPN: PIC16F874-04I/PT ⚠ Last Time Buy| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $8.3 | $8.30 |
| 10 | $7.47 | $74.70 |
| 100 | $6.64 | $664.00 |
| 500 | $5.97 | $2,985.00 |
| 1,000 | $5.4 | $5,400.00 |
PIC16F874-04I/PT Overview
What is a PIC16F 8-bit microcontroller? The PIC16F family sits within the broader 8-bit microcontroller category, which in turn belongs to the microcontroller unit (MCU) sub-segment of embedded processors. Within Microchip's portfolio, PIC16F parts are mid-range MCUs that balance low power consumption, deterministic RISC execution, and rich on-chip peripherals; they share the PIC16 instruction set so firmware is portable across the 18-, 28-, and 40-/44-pin variants. Compared with 32-bit Cortex-M parts, PIC16F devices trade raw compute for lower BOM cost, simpler toolchains, and decades of legacy code.
Key features of the PIC16F874-04I/PT include 14 interrupt sources, a hardware 8x8 multiplier, nanoWatt power management with multiple idle/sleep modes, an internal oscillator option on some family members, and in-circuit serial programming (ICSP) via two pins. The integrated brown-out reset and power-on reset circuitry improve system robustness in industrial environments.
Architecturally, the part uses a Harvard RISC core with a single-cycle ALU and a 14-bit-wide instruction word. This yields deterministic 200 ns instruction execution at 20 MHz and predictable interrupt latency, which is critical in motor-control and real-time sensing loops.
Typical applications include industrial sensor nodes, motor-control (BLDC, stepper, brushed DC) front-ends, HVAC controllers, security and alarm panels, automotive body and chassis subsystems, smart metering, and consumer white-goods user-interface controllers. The wide 4.0-5.5 V input range and industrial-grade temperature profile also suit 24 V industrial bus systems when paired with an upstream switching pre-regulator.
When designing with this part, allocate a 10 kohm pull-up on the MCLR pin per the Microchip reference design and ensure decoupling is placed within 5 mm of the VDD/AVDD and VSS/AVSS pins. For new designs, evaluate the recommended migration path (PIC16F884) since Microchip flags this family as legacy.
Drop-in alternatives for PIC16F874-04I/PT — 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/PT (same form factor and footprint) — differing in Package, Timers, Operating Temperature, CCP Modules, Serial Interfaces.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F874-04E/PT
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$8.95 / Unit
View Datasheet →PIC16F874T-04I/PT
✅ Drop-In✓ In Stock
$6.62 / Unit
View Datasheet →PIC16F874-20I/PT
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F877-04I/PT
✅ Drop-In✓ In Stock
$4.95 / Unit
View Datasheet →PIC16F877-20I/PT
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$5.1 / Unit
View Datasheet →PIC16F884-I/PT
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874-04I/PT Maximum Ratings & Electrical Characteristics
| Family | PIC16F 8-bit mid-range MCU |
| Program Memory (Flash) | 7 KB |
| Data RAM | 192 bytes |
| Data EEPROM | 128 bytes |
| Maximum Clock Speed | 20 MHz (4 MHz marked in part number, family rating 20 MHz) |
| Instruction Cycle | 200 ns at 20 MHz |
| Supply Voltage (VDD) | 4.0 V to 5.5 V |
| I/O Pins | 33 |
| ADC | 10-bit, 8-channel |
| Timers | 2 x 8-bit, 1 x 16-bit |
| Communication | USART/SCI, MSSP (SPI / I2C master-slave) |
| CCP Modules | 1 x Capture/Compare/PWM |
| Operating Temperature | -40 C to +85 C (industrial, "I" suffix) |
| Package | 44-pin TQFP (PT) 10x10 mm |
| Brown-out Reset | Yes |
| ICSP | Yes (In-Circuit Serial Programming) |
| RoHS Status | Compliant |
PIC16F874-04I/PT 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 / read control for parallel port / analog input 5 |
| Pin 9 | RE1/WR/AN6 — PORTE bit 1 / write control for parallel port / analog input 6 |
| Pin 10 | RE2/CS/AN7 — PORTE bit 2 / chip select for parallel port / analog input 7 |
| Pin 11 | VDD — Positive supply (4.0-5.5 V) |
| Pin 12 | VSS — Ground |
| Pin 13 | OSC1/CLKI — Oscillator input / external clock input |
| Pin 14 | OSC2/CLKO — 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 output |
| 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 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 transmit / USART clock |
| Pin 26 | RC7/RX/DT — PORTC bit 7 / USART receive / 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 |
| Pin 32 | VDD — Positive supply (4.0-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 | AVSS — Analog ground |
| Pin 42 | AVDD — Analog positive supply |
| Pin 43 | NC — Not connected |
| Pin 44 | NC — Not connected |
Typical Applications
PIC16F874-04I/PT is suitable for 7 applications: Industrial Sensor Node / Data Acquisition, Motor Control (BLDC / Stepper / Brushed DC), HVAC Controller (Thermostat / Damper Actuator), Security & Alarm Panel (PIR / Door / Siren Controller), Smart Metering (Electricity / Water / Gas Endpoint), Automotive Body & Chassis Subsystem, Consumer White-Goods User Interface (Washer / Oven / Fridge).
Industrial Sensor Node / Data Acquisition
The PIC16F874-04I/PT fits industrial sensor nodes because its 10-bit, 8-channel ADC, 4.0-5.5 V supply, and industrial -40 C to +85 C temperature range cover most factory-floor sensor requirements. The 192-byte RAM and 7 KB Flash are sufficient for periodic sensor reads, linearization, and Modbus or simple proprietary protocols over the USART. Placed between the analog front-end (op-amp + RC filter) and the RS-485 transceiver, the MCU runs at 20 MHz to deliver deterministic 200 ns instruction cycles, ensuring fixed sampling intervals for process control. The integrated MSSP supports SPI-based digital sensors (e.g., thermocouple-to-digital converters) while the USART drives the fieldbus. No external memory is required for typical 16-channel analog scanner firmware, simplifying the BOM.
Recommended
Motor Control (BLDC / Stepper / Brushed DC)
The PIC16F874-04I/PT is well-suited to low-cost brushed-DC, stepper, and small BLDC motor controllers. The 16-bit timer with Capture/Compare/PWM (CCP) generates center-aligned PWM for H-bridge drivers, and the 200 ns instruction cycle at 20 MHz supports typical 20 kHz PWM frequencies with comfortable timing margins. The 33 I/O pins accommodate direction inputs, Hall sensor feedback, fault inputs, and an encoder interface; the 8-channel 10-bit ADC reads back EMF, current shunt, and potentiometer inputs. With 7 KB of Flash, the MCU fits a complete state-machine + PI loop firmware image. For brushed-DC and small steppers, no external gate driver is needed beyond discrete transistors.
Recommended
HVAC Controller (Thermostat / Damper Actuator)
The PIC16F874-04I/PT powers HVAC thermostats, zone damper actuators, and fan-coil controllers due to its industrial temperature rating, 8-channel 10-bit ADC for NTC thermistor inputs, and PWM for triac-driven fan or damper control. The 7 KB Flash comfortably holds the user-interface state machine plus a PID loop, while the 192-byte RAM supports a small display buffer for 7-segment or 128x64 LCD driving via SPI. The MSSP (SPI/I2C) port connects to a temperature/humidity sensor such as an SHT20, and the USART links to a wired thermostat network or BACnet MS/TP bridge. At industrial-grade temperature and a 5 V supply, the MCU pairs naturally with 24 VAC-derived DC rails through a small buck regulator.
Recommended
Security & Alarm Panel (PIR / Door / Siren Controller)
The PIC16F874-04I/PT serves as the central controller in PIR motion detector panels, door/window contact aggregators, and siren/keypad controllers. Its 33 I/O lines accept many discrete alarm loops and keypad matrix rows/columns, while the ADC monitors backup battery voltage and PIR analog outputs. The USART or MSSP links to a GSM dialer or IP communicator for remote alarm reporting. With 7 KB of Flash, the MCU stores the zone-arm state machine, debounce, and event log. The brown-out reset and watchdog timer provide the robustness required for unattended 24/7 operation. Power is typically 12 V sealed-lead-acid battery with a 5 V regulator.
Recommended
Smart Metering (Electricity / Water / Gas Endpoint)
The PIC16F874-04I/PT fits electronic meter endpoints for electricity, water, or gas where cost and reliability matter more than MIPS. Its 8-channel 10-bit ADC handles voltage/current sensing or pulse-counter inputs from a flow meter, while the USART or MSSP communicates with the concentrator over PLC, RF, or wired M-Bus. The 7 KB Flash holds the metrology algorithm, calibration constants, and DLMS/COSEM or simple OBIS protocol stack. NanoWatt sleep modes drop quiescent current for battery-powered water/gas meters, where 1-2 uA standby extends coin-cell life to >10 years. The industrial temperature range ensures operation in outdoor meter enclosures from -40 C to +85 C.
Recommended
Automotive Body & Chassis Subsystem
Although not AEC-Q100 qualified, the PIC16F874-04I/PT is widely deployed in non-safety automotive body modules such as door/window lift controllers, seat position memories, mirror adjusters, and accessory lighting controllers. The 33 I/O lines drive relay coils and read limit switches; the 16-bit timer with CCP generates PWM for mirror actuators and dimmed interior lighting. The 10-bit ADC samples potentiometer (for seat position feedback) and supply voltage. With 7 KB of Flash, the MCU implements the body-control state machine with debounced inputs and latched outputs. Power is typically 12 V vehicle battery through a 5 V regulator, and the MCU tolerates load-dump transients with external TVS clamping.
Recommended
Consumer White-Goods User Interface (Washer / Oven / Fridge)
The PIC16F874-04I/PT drives the user interface and main control loop in entry-level and mid-range consumer appliances such as washing machines, microwave ovens, refrigerators, and dishwashers. The 33 I/O lines accept a 4x4 keypad matrix plus LED indicators; the MSSP drives a character LCD; and the 10-bit ADC reads thermistor inputs (NTC) for oven or refrigerator temperature regulation. The 7 KB Flash accommodates the user-interface menu, wash-cycle state machine, and basic fault diagnostics without external memory. The 16-bit CCP provides PWM for buzzer tones and triac-based heater control, while the USART connects to a service-diagnostic port or a Bluetooth module for smart-appliance variants.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F874-04I/PT — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F874-04E/PT | PIC16F874T-04I/PT | PIC16F874-20I/PT | PIC16F877-04I/PT | PIC16F877-20I/PT | PIC16F884-I/PT |
|---|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-pin TQFP (PT) 10x10 mm | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same |
| Program Memory (Flash) | 7 KB | 7 KB | 7 KB | 7 KB | 14 KB | 14 KB | 14 KB |
| Data RAM | 192 B | 192 B | 192 B | 192 B | 368 B | 368 B | 368 B |
| Maximum Clock Speed | 20 MHz (4 grade) | 20 MHz (4 grade) | 20 MHz (4 grade) | 20 MHz (20 grade) | 20 MHz (4 grade) | 20 MHz (20 grade) | 20 MHz |
| Operating Temperature | -40C to +85C (industrial) | -40C to +125C (extended) | -40C to +85C (industrial) | -40C to +85C (industrial) | -40C to +85C (industrial) | -40C to +85C (industrial) | -40C to +85C (industrial) |
| ADC | 10-bit, 8-channel | 10-bit, 8-channel | 10-bit, 8-channel | 10-bit, 8-channel | 10-bit, 8-channel | 10-bit, 8-channel | 10-bit, 14-channel (enhanced) |
| Lifecycle Status | Last-time-buy (recommended migration: PIC16F884) | Last-time-buy | Last-time-buy | Last-time-buy | Last-time-buy | Last-time-buy | Active |
Key Differentiators
- Industrial temperature grade with recommended migration path to active part (vs PIC16F884-I/PT)
- Higher Flash and RAM headroom as pin-compatible superset (vs PIC16F877-04I/PT)
- Full 20 MHz timing guarantee across industrial temperature range (vs PIC16F874-20I/PT)
Design Notes
Place a 100 nF ceramic decoupling capacitor within 5 mm of each VDD/AVDD pin (pins 11, 32, 42 on the 44-pin TQFP) and a single 10 uF bulk capacitor at the regulator output. Per the Microchip PIC16F874 datasheet, AVDD must be tied to VDD and AVSS to VSS for correct ADC operation. Estimated: at 20 MHz the core draws roughly 10-15 mA plus I/O drive, so size the regulator for at least 50 mA peak to accommodate port-toggle transients.
The MCLR pin (pin 1) requires a 10 kohm pull-up to VDD for normal operation; do not leave it floating or the device will randomly reset. For ICSP programming, route the PGC (RB6) and PGD (RB7) pins (pins 39, 40) directly to a programming header - avoid series resistors > 100 ohm that block in-circuit programming. The "-04" speed grade is rated for 4 MHz guaranteed operation; for 20 MHz designs use the "-20" grade variant or accept out-of-spec behavior.
Keep analog (PORTA/AVDD/AVSS) traces away from switching nodes such as the PWM CCP1 output (RC2, pin 17) and the oscillator pins (OSC1/OSC2, pins 13/14) to minimize ADC coupling noise. Use a ground pour under the MCU with stitching vias between VSS and AVSS to provide a Kelvin return for ADC conversions. For crystal operation, route the crystal within 10 mm of OSC1/OSC2 and surround the traces with a ground guard ring; do not route signal traces under the crystal.
Compliance Information
RoHS compliant per Microchip product page. Not AEC-Q100 qualified - the part is targeted at industrial and consumer applications, not automotive safety-critical systems. Microchip's QS-9000 quality system certification covers the manufacturing facility.