PIC16F874-04E/PQ - 4MHz 8-bit PIC MCU 7KB Flash 44-MQFP | Microchip
料号: PIC16F874-04E/PQ ✓ 量产中| 数量 | 单价 | 小计 |
|---|---|---|
| 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 概述
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.
直接替换替代料: PIC16F874-04E/PQ ——相同封装,引脚兼容。需要 PCB 改动的不同封装料号已排除。
本系列中的变体
可与以下型号直接替换的同系列型号: PIC16F874-04E/PQ (相同外形与封装尺寸) ——差异在于 Package, Core Architecture, Timers, Operating Temperature, Mounting Type.
快速对比工具——选择替代料号进行并排对比:
PIC16F874-04/PQ
✅ 直接替换✓ 有现货
$5.9 / 个
查看数据手册 →PIC16F874-04/L
✅ 直接替换✓ 有现货
$6.85 / 个
查看数据手册 →PIC16F877-04/PQ
✅ 直接替换✓ 有现货
$5.7 / 个
查看数据手册 →PIC16F874-04I/PQ
✅ 直接替换 ⚠️ 规格未核验✓ 有现货
$5.78 / 个
查看数据手册 →PIC16F871-I/PT
✅ 直接替换✓ 有现货
$2.82 / 个
查看数据手册 →PIC16F874-04E/PQ 最大额定值与电气特性
| 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 |
| 最大时钟频率 | 20 MHz (4 MHz external oscillator for -04 speed grade) |
| Instruction Cycle Time | 200 ns at 20 MHz |
| 电源电压 | 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 |
| 封装 | 44-pin MQFP (10x10 mm), Gull-Wing leads |
| Temperature Grade | AUTOMOTIVE (-E suffix, -40C to +125C) |
| 安装类型 | Surface Mount |
| RoHS 状态 | Compliant |
PIC16F874-04E/PQ 引脚配置
| 引脚 1 | MCLR/VPP — Master Clear (reset, active low) / Programming voltage input |
| 引脚 2 | RA0/AN0 — PORTA bit 0 / Analog input 0 |
| 引脚 3 | RA1/AN1 — PORTA bit 1 / Analog input 1 |
| 引脚 4 | RA2/AN2/VREF- — PORTA bit 2 / Analog input 2 / ADC Vref- |
| 引脚 5 | RA3/AN3/VREF+ — PORTA bit 3 / Analog input 3 / ADC Vref+ |
| 引脚 6 | RA4/T0CKI — PORTA bit 4 / Timer0 clock input |
| 引脚 7 | RA5/AN4/SS — PORTA bit 5 / Analog input 4 / SPI slave select |
| 引脚 8 | RE0/RD/AN5 — PORTE bit 0 / Parallel-port read / Analog input 5 |
| 引脚 9 | RE1/WR/AN6 — PORTE bit 1 / Parallel-port write / Analog input 6 |
| 引脚 10 | RE2/CS/AN7 — PORTE bit 2 / Parallel-port chip-select / Analog input 7 |
| 引脚 11 | VDD — Positive supply voltage |
| 引脚 12 | VSS — Ground reference |
| 引脚 13 | OSC1/CLKIN — Oscillator crystal input / external clock input |
| 引脚 14 | OSC2/CLKOUT — Oscillator crystal output / clock output |
| 引脚 15 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| 引脚 16 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2 output |
| 引脚 17 | RC2/CCP1 — PORTC bit 2 / CCP1 output (PWM) |
| 引脚 18 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| 引脚 19 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port bit 0 |
| 引脚 20 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port bit 1 |
| 引脚 21 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port bit 2 |
| 引脚 22 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port bit 3 |
| 引脚 23 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| 引脚 24 | RC5/SDO — PORTC bit 5 / SPI data out |
| 引脚 25 | RC6/TX/CK — PORTC bit 6 / USART TX / USART clock |
| 引脚 26 | RC7/RX/DT — PORTC bit 7 / USART RX / USART data |
| 引脚 27 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port bit 4 |
| 引脚 28 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port bit 5 |
| 引脚 29 | RD6/PSP6 — PORTD bit 6 / Parallel Slave Port bit 6 |
| 引脚 30 | RD7/PSP7 — PORTD bit 7 / Parallel Slave Port bit 7 |
| 引脚 31 | VSS — Ground reference |
| 引脚 32 | VDD — Positive supply voltage |
| 引脚 33 | RB0/INT — PORTB bit 0 / External interrupt input |
| 引脚 34 | RB1 — PORTB bit 1 |
| 引脚 35 | RB2 — PORTB bit 2 |
| 引脚 36 | RB3/PGM — PORTB bit 3 / LVP programming |
| 引脚 37 | RB4 — PORTB bit 4 |
| 引脚 38 | RB5 — PORTB bit 5 |
| 引脚 39 | RB6/PGC — PORTB bit 6 / ICSP clock |
| 引脚 40 | RB7/PGD — PORTB bit 7 / ICSP data |
| 引脚 41 | NC — Not connected (per datasheet) |
| 引脚 42 | NC — Not connected (per datasheet) |
| 引脚 43 | NC — Not connected (per datasheet) |
| 引脚 44 | NC — Not connected (per datasheet) |
典型应用
PIC16F874-04E/PQ 适用于 6 应用s: 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.
推荐
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.
推荐
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.
推荐
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.
推荐
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.
推荐
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.
推荐
推荐产品汇总
工程参考数据: PIC16F874-04E/PQ ——对比、设计指导和合规信息。
选型指南
与替代料对比
| 参数 | 本产品 | 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 |
关键差异点
- Automotive temperature grade (-E) in the same 44-MQFP footprint (对比 PIC16F874-04/PQ)
- More program memory than the PIC16F871 family (对比 PIC16F871-I/PT)
- Upgrade path with same footprint (对比 PIC16F877-04/PQ)
设计说明
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.
合规信息
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.