PIC16F874-04I/PQ - 4MHz 8-bit Flash MCU 7KB | Microchip
MPN: PIC16F874-04I/PQ ✓ 啟用中PIC16F874-04I/PQ 概覽
A microcontroller (MCU) is a single-chip computer containing a processor core, non-volatile program memory, working RAM, and integrated peripherals such as timers, communication interfaces and analog converters. The PIC16F family sits in the hierarchy: microcontroller -> 8-bit MCU -> PIC16 enhanced family -> flash-based MCU. Within the broader taxonomy it belongs to: semiconductor -> integrated circuit -> microcontroller -> embedded controller. This category targets low-power deterministic control applications where simple instruction sets and predictable interrupt latency matter more than raw compute throughput.
Key features include an 8-channel, 10-bit analog-to-digital converter (ADC), two 8-bit timers plus one 16-bit timer, a Capture/Compare/PWM (CCP) module, a USART with addressable Receive Pin Select, an MSSP module supporting both SPI and I2C (master/slave), and a parallel slave port for external memory expansion. Brown-out Reset (BOR), Watchdog Timer (WDT) with dedicated oscillator, and In-Circuit Serial Programming (ICSP) round out the safety and production feature set.
The device operates from 4.0 V to 5.5 V with on-chip power-on reset and a programmable code-protection scheme. Its 35 single-word instruction RISC architecture executes every instruction in a single 200 ns cycle at 20 MHz; the -04 speed grade specifically limits the maximum clock to 4 MHz, trading throughput for lower EMI and power consumption. The 44-pin MQFP (PQ) outline gives a compact surface-mount footprint with all peripheral pins brought out, including 8 analog channels on PORTA/PORTB and 8-bit PORTD/PORTE for parallel-bus applications.
Typical applications include industrial control panels, sensor signal conditioning with on-chip ADC, low-speed communication bridges (RS-232/USART or I2C peripherals), HVAC thermostat controllers, appliance user-interface boards, and battery-backed instrumentation. The wide I/O count makes it well suited to driving multiplexed keypads, character LCDs, and small graphic displays.
When designing with the PIC16F874-04I/PQ, ensure the application firmware does not exceed 4 MHz instruction-clock operation; the -20 variant is required if the design needs 20 MHz. Decoupling the analog AVdd/AVss pair with 0.1 uF + 10 uF and following Microchip AN546 and PICmicro Mid-Range Reference Manual guidance preserves ADC accuracy and minimizes POR/BOR reset noise.
This page synthesizes real-time distributor pricing, drop-in same-package alternatives (PIC16F874A, PIC16F877A, PIC16F874-04, PIC16F877-04) and practical design notes that go beyond the bare datasheet.
直接替換替代品,適用於 PIC16F874-04I/PQ — 相同封裝,腳位對腳位相容。需重新設計 PCB 的不同封裝零件不列入。
此系列的變體
與下列產品可直接替換的同系列型號: PIC16F874-04I/PQ (相同外形與佔位) — 差異在於 Package, Core Architecture, ADC, Timers, Mounting Type.
PIC16F874-04/PQ
✅ 直接替換聯絡詢價
查看資料表 →PIC16F874-04E/PQ
✅ 直接替換聯絡詢價
查看資料表 →PIC16F874-04I/P
✅ 直接替換聯絡詢價
查看資料表 →PIC16F874A-I/PQ
✅ 直接替換📋 參考替代品(不在目錄中)
PIC16F877-04I/PQ
✅ 直接替換聯絡詢價
查看資料表 →PIC16F877A-I/PQ
✅ 直接替換📋 參考替代品(不在目錄中)
PIC16F874-04I/PQ 最大額定值與電氣特性
| Family | PIC16F |
| Core Architecture | 8-bit PIC16 enhanced RISC |
| Program Memory Type | Flash |
| Program Memory Size | 7 KB (4K x 14) |
| RAM Size | 192 bytes |
| EEPROM Size | 128 bytes |
| Maximum CPU Frequency | 4 MHz |
| Instruction Cycle Time | 200 ns @ 4 MHz |
| Number of I/O Pins | 33 |
| ADC | 8-channel x 10-bit |
| Supply Voltage (Vdd) | 4.0 V to 5.5 V |
| Timers | 2 x 8-bit + 1 x 16-bit |
| Communication Interfaces | USART, MSSP (SPI / I2C), Parallel Slave Port |
| 封裝 | 44-pin MQFP (PQ), 10x10 mm |
| 工作溫度 | -40C to +85C (Industrial) |
| 安裝類型 | Surface Mount |
| Lead-Free / RoHS | Compliant |
| Programming | ICSP (In-Circuit Serial Programming) |
PIC16F874-04I/PQ 腳位配置
| 腳位 1 | MCLR/VPP — Master Clear (Reset) input / Programming voltage |
| 腳位 2 | RA0/AN0 — PORTA bit 0 / Analog input 0 |
| 腳位 3 | RA1/AN1 — PORTA bit 1 / Analog input 1 |
| 腳位 4 | RA2/AN2 — PORTA bit 2 / Analog input 2 |
| 腳位 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 | VSS — Ground |
| 腳位 9 | OSC1/CLKIN — Oscillator input / External clock |
| 腳位 10 | OSC2/CLKOUT — Oscillator output / Clock out |
| 腳位 11 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator out / Timer1 clock in |
| 腳位 12 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator in / Capture-Compare-PWM 2 |
| 腳位 13 | RC2/CCP1 — PORTC bit 2 / Capture-Compare-PWM 1 |
| 腳位 14 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| 腳位 15 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| 腳位 16 | RC5/SDO — PORTC bit 5 / SPI data out |
| 腳位 17 | RC6/TX/CK — PORTC bit 6 / USART TX / USART clock |
| 腳位 18 | RC7/RX/DT — PORTC bit 7 / USART RX / USART data |
| 腳位 19 | VSS — Ground |
| 腳位 20 | VDD — Positive supply (4.0-5.5 V) |
| 腳位 21 | RB0/INT — PORTB bit 0 / External interrupt |
| 腳位 22 | RB1 — PORTB bit 1 |
| 腳位 23 | RB2 — PORTB bit 2 |
| 腳位 24 | RB3/PGM — PORTB bit 3 / Low-voltage programming |
| 腳位 25 | RB4 — PORTB bit 4 |
| 腳位 26 | RB5 — PORTB bit 5 |
| 腳位 27 | RB6/PGC — PORTB bit 6 / ICSP clock |
| 腳位 28 | RB7/PGD — PORTB bit 7 / ICSP data |
| 腳位 29 | VSS — Ground |
| 腳位 30 | VDD — Positive supply (4.0-5.5 V) |
| 腳位 31 | AVSS — Analog ground |
| 腳位 32 | AVDD — Analog positive supply |
| 腳位 33 | VREF-/AN5 — ADC VREF- / Analog input 5 |
| 腳位 34 | VREF+/AN6 — ADC VREF+ / Analog input 6 |
| 腳位 35 | AN7 — Analog input 7 |
| 腳位 36 | RE0/RD/AN5 — PORTE bit 0 / Parallel Slave Port read / Analog input 5 |
| 腳位 37 | RE1/WR/AN6 — PORTE bit 1 / Parallel Slave Port write / Analog input 6 |
| 腳位 38 | RE2/CS/AN7 — PORTE bit 2 / Parallel Slave Port chip select / Analog input 7 |
| 腳位 39 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port data 0 |
| 腳位 40 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port data 1 |
| 腳位 41 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port data 2 |
| 腳位 42 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port data 3 |
| 腳位 43 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port data 4 |
| 腳位 44 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port data 5 |
典型應用
PIC16F874-04I/PQ 適用於 6 應用s: Industrial Sensor Hub with ADC, HVAC Thermostat Controller, Appliance User-Interface Board, Battery-Backed Instrumentation, Low-Speed Communication Bridge, Security Keypad & Access Panel.
Industrial Sensor Hub with ADC
The PIC16F874-04I/PQ suits industrial sensor hubs where 8 analog channels and 33 I/O pins concentrate mixed signals onto one bus. Its 8-channel 10-bit ADC provides 4.9 mV resolution at 5 V - enough for thermocouple-conditioned, strain-gauge and 4-20 mA-loop inputs typical in panel instrumentation. The 4 MHz speed grade keeps switching noise out of low-level analog front ends, while 192 B of RAM and 7 KB of Flash host state-machine firmware and lookup-table linearization routines. Use it paired with an external RS-485 transceiver such as MAX485 to bridge to a Modbus master. Designers should place 0.1 uF + 10 uF decoupling on AVdd/AVss to preserve ADC linearity and follow Microchip AN546 for ground layout.
推薦
HVAC Thermostat Controller
In HVAC thermostat designs, the PIC16F874-04I/PQ integrates temperature sensing, relay/valve actuation and a character-LCD user interface in a single 44-MQFP package. Its 7 KB Flash holds PID control loops, scheduling state and menu logic; 128 B of EEPROM non-volatilely stores setpoints across power cycles. The 16-bit Timer1 with external crystal input supports a real-time clock, while the Capture/Compare/PWM module drives triac phase control for line-voltage loads up to a few hundred watts via an opto-isolated MOC3021. The industrial -40 to +85C rating lets the board live inside air-handling units without thermal conditioning.
推薦
Appliance User-Interface Board
Washing machines, dishwashers and microwave ovens benefit from the PIC16F874-04I/PQ's 33 GPIO pins, which easily matrix-scan a 4x5 keypad, drive a 16x2 character LCD and read a rotary encoder. The MSSP module's I2C master talks to an EEPROM, an LED driver and a small audio DAC for end-of-cycle beeps. At 4 MHz the MCU adds negligible RF interference to nearby motor-control circuitry, important for CE/FCC appliance EMC compliance. The 7 KB Flash holds the wash-cycle state machine plus diagnostic firmware, while 192 B RAM accommodates display buffers and button-debounce state without external memory.
推薦
Battery-Backed Instrumentation
Portable data loggers and bench-top instruments use the PIC16F874-04I/PQ to digitize sensors and stream results over USART. Brown-out Reset at 4.0 V protects Flash/EEPROM during low-battery events, and the 192-byte RAM plus 128-byte EEPROM suffice for circular buffering of calibration records. Running at 4 MHz keeps active current around 2 mA at 5 V; combined with Microchip's SLEEP/idle modes, average draw drops below 100 uA for battery-friendly operation. Pair the MCU with a MAX232-level translator for RS-232 or an FTDI FT232R for USB bridges. The 44-MQFP package is well suited to hand-solderable prototype boards.
推薦
Low-Speed Communication Bridge
The PIC16F874-04I/PQ's MSSP module supports both SPI master/slave and I2C master/slave, making it a flexible protocol bridge between sensor ICs, EEPROMs and a host controller. Its USART with addressable Receive Pin Select can simultaneously listen on RS-485 buses and forward payloads to SPI peripherals. Typical use is bridging a legacy UART keypad to a modern I2C-display panel, or aggregating multiple SPI sensors into one Modbus RTU node. The 4 MHz instruction rate delivers 1 MHz SPI clock and 400 kHz I2C - more than adequate for low-speed sensor fabrics. Industrial temperature grade suits outdoor cabinet installations.
推薦
Security Keypad & Access Panel
Access-control panels use the PIC16F874-04I/PQ to scan a 4x4 keypad, drive a character LCD and switch a relay through an opto-isolated driver. Its 33 GPIO pins comfortably handle the keypad matrix plus an additional Wiegand-format card-reader input. 128 bytes of EEPROM store access codes and audit trails across power cycles, while 7 KB of Flash hosts the authentication state machine, anti-tamper logic and Modbus output for the central controller. Brown-out reset and watchdog timer provide resilience against supply glitches and firmware lock-ups. The industrial temperature rating allows outdoor mounting in unheated enclosures.
推薦
推薦產品摘要
工程參考資料,適用於 PIC16F874-04I/PQ — 比較、設計指引及合規資訊。
選型指南
與替代品比較
| 參數 | 本產品 | PIC16F874-04/PQ | PIC16F874-04E/PQ | PIC16F874A-I/PQ | PIC16F877-04I/PQ | PIC16F877A-I/PQ |
|---|---|---|---|---|---|---|
| Package | 44-MQFP (PQ) 10x10 mm | 44-MQFP (PQ) - same | 44-MQFP (PQ) - same | 44-MQFP (PQ) - same | 44-MQFP (PQ) - same | 44-MQFP (PQ) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Memory | 7 KB Flash | 7 KB Flash | 7 KB Flash | 7 KB Flash | 14 KB Flash (2x) | 14 KB Flash (2x) |
| EEPROM | 128 B | 128 B | 128 B | 128 B | 256 B | 256 B |
| Max CPU Frequency | 4 MHz (-04 grade) | 4 MHz | 4 MHz | 20 MHz | 4 MHz | 20 MHz |
| Operating Temperature | -40C to +85C (I grade) | 0C to +70C | -40C to +125C | -40C to +85C | -40C to +85C | -40C to +85C |
| ADC | 8 x 10-bit | 8 x 10-bit | 8 x 10-bit | 8 x 10-bit | 8 x 10-bit | 8 x 10-bit |
| CCP Modules | 1 (CCP1) | 1 | 1 | 1 | 2 | 2 |
| I/O Pins | 33 | 33 | 33 | 33 | 33 | 33 |
主要差異化特點
- Industrial temperature range without 'E' or 'A' cost premium (對比PIC16F874-04/PQ (commercial 0-70C))
- Low-EMI 4 MHz ceiling for noise-sensitive analog designs (對比PIC16F874A-I/PQ (20 MHz grade))
- Industrial -40 to +85C vs extended -40 to +125C (對比PIC16F874-04E/PQ (E grade))
設計說明
Place a 0.1 uF ceramic decoupling capacitor within 5 mm of every VDD/VSS pin pair (the PIC16F874-04I/PQ has three pairs at pins 8/20, 19/30 and analog pins 31/32). Add a bulk 10 uF tantalum or aluminum electrolytic on the main +5 V rail near the MCU. For ADC accuracy, keep analog traces short and surround AVdd/AVss with a ground pour. Reference: Microchip PIC16F87X datasheet DS30262 section 14.0 and Microchip application note AN546.
When using the MSSP SPI master mode at the maximum 4 MHz instruction clock, expect a 1 MHz SPI clock. Add a 33 ohm series resistor on SCK, SDO and SDI lines if the bus exceeds 50 mm to dampen reflections, and verify signal integrity with an oscilloscope at the receiver end. For I2C, ensure pull-up resistors are sized between 1 kohm (fast-mode 400 kHz with 5 V) and 10 kohm (standard-mode 100 kHz) according to bus capacitance.
Do not enable the -20 grade's 20 MHz oscillator when using the PIC16F874-04I/PQ: the silicon is graded for 4 MHz maximum and will mis-execute instructions at higher clocks. Verify the CONFIG1 register oscillator selection bits match a 4 MHz crystal or resonator. Also ensure the LVP (low-voltage programming) bit is correctly set - enabling it by default can interfere with RB3/4/5 digital I/O at start-up.
Estimated: at 4 MHz with all peripherals active, the PIC16F874-04I/PQ draws roughly 2 mA at 5 V (10 mW), well within the 44-MQFP package's thermal envelope and below the junction-temperature limit of 150C. Industrial temperature parts are specified to -40C to +85C ambient. For sealed enclosures with no airflow, derate ambient by 10C to account for self-heating from surrounding analog and power components.
合規資訊
RoHS compliant per Microchip product page and DigiKey listing. Not AEC-Q100 qualified; for automotive, select the PIC16F874-04I/PQ is industrial-grade only. Microchip QS-9000 certification referenced in original datasheet preamble covers process quality.