PIC16F874-04I/PQ - 4MHz 8-bit Flash MCU 7KB | Microchip
MPN: PIC16F874-04I/PQ ✓ Hoạt độngPIC16F874-04I/PQ Tóm tắt
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.
Bộ thay thế dễ dàng lắp đặt cho PIC16F874-04I/PQ — cùng gói, chân-to-chân tương thích. Các bộ phận yêu cầu hàn PCB bị loại trừ.
Các biến thể trong loạt này
Các mẫu cùng loạt có thể lắp đặt dễ dàng tương thích với PIC16F874-04I/PQ (cùng hình factor và footprint) — khác nhau ở Package, Core Architecture, ADC, Timers, Mounting Type.
PIC16F874-04/PQ
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-04E/PQ
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-04I/P
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874A-I/PQ
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F877-04I/PQ
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F877A-I/PQ
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F874-04I/PQ Tỷ lệ tối đa & tính chất điện
| 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 |
| Hộp | 44-pin MQFP (PQ), 10x10 mm |
| Nhiệt độ hoạt động | -40C to +85C (Industrial) |
| Kiểu lắp đặt | Surface Mount |
| Lead-Free / RoHS | Compliant |
| Programming | ICSP (In-Circuit Serial Programming) |
Cấu hình chân PIC16F874-04I/PQ
| Chân 1 | MCLR/VPP — Master Clear (Reset) input / Programming voltage |
| Chân 2 | RA0/AN0 — PORTA bit 0 / Analog input 0 |
| Chân 3 | RA1/AN1 — PORTA bit 1 / Analog input 1 |
| Chân 4 | RA2/AN2 — PORTA bit 2 / Analog input 2 |
| Chân 5 | RA3/AN3/VREF+ — PORTA bit 3 / Analog input 3 / ADC VREF+ |
| Chân 6 | RA4/T0CKI — PORTA bit 4 / Timer0 clock input |
| Chân 7 | RA5/AN4/SS — PORTA bit 5 / Analog input 4 / SPI Slave Select |
| Chân 8 | VSS — Ground |
| Chân 9 | OSC1/CLKIN — Oscillator input / External clock |
| Chân 10 | OSC2/CLKOUT — Oscillator output / Clock out |
| Chân 11 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator out / Timer1 clock in |
| Chân 12 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator in / Capture-Compare-PWM 2 |
| Chân 13 | RC2/CCP1 — PORTC bit 2 / Capture-Compare-PWM 1 |
| Chân 14 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Chân 15 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| Chân 16 | RC5/SDO — PORTC bit 5 / SPI data out |
| Chân 17 | RC6/TX/CK — PORTC bit 6 / USART TX / USART clock |
| Chân 18 | RC7/RX/DT — PORTC bit 7 / USART RX / USART data |
| Chân 19 | VSS — Ground |
| Chân 20 | VDD — Positive supply (4.0-5.5 V) |
| Chân 21 | RB0/INT — PORTB bit 0 / External interrupt |
| Chân 22 | RB1 — PORTB bit 1 |
| Chân 23 | RB2 — PORTB bit 2 |
| Chân 24 | RB3/PGM — PORTB bit 3 / Low-voltage programming |
| Chân 25 | RB4 — PORTB bit 4 |
| Chân 26 | RB5 — PORTB bit 5 |
| Chân 27 | RB6/PGC — PORTB bit 6 / ICSP clock |
| Chân 28 | RB7/PGD — PORTB bit 7 / ICSP data |
| Chân 29 | VSS — Ground |
| Chân 30 | VDD — Positive supply (4.0-5.5 V) |
| Chân 31 | AVSS — Analog ground |
| Chân 32 | AVDD — Analog positive supply |
| Chân 33 | VREF-/AN5 — ADC VREF- / Analog input 5 |
| Chân 34 | VREF+/AN6 — ADC VREF+ / Analog input 6 |
| Chân 35 | AN7 — Analog input 7 |
| Chân 36 | RE0/RD/AN5 — PORTE bit 0 / Parallel Slave Port read / Analog input 5 |
| Chân 37 | RE1/WR/AN6 — PORTE bit 1 / Parallel Slave Port write / Analog input 6 |
| Chân 38 | RE2/CS/AN7 — PORTE bit 2 / Parallel Slave Port chip select / Analog input 7 |
| Chân 39 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port data 0 |
| Chân 40 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port data 1 |
| Chân 41 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port data 2 |
| Chân 42 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port data 3 |
| Chân 43 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port data 4 |
| Chân 44 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port data 5 |
Ứng dụng tiêu biểu
PIC16F874-04I/PQ phù hợp cho 6 Áp dụngs: 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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
Tóm tắt các sản phẩm được đề xuất
Dữ liệu tham khảo kỹ thuật cho PIC16F874-04I/PQ — so sánh, hướng dẫn thiết kế và thông tin tuân thủ.
Hướng dẫn chọn lựa
So sánh với các sản phẩm thay thế
| Tham số | Sản phẩm này | 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 |
Bảo phân biệt quan trọng
- Industrial temperature range without 'E' or 'A' cost premium (vsPIC16F874-04/PQ (commercial 0-70C))
- Low-EMI 4 MHz ceiling for noise-sensitive analog designs (vsPIC16F874A-I/PQ (20 MHz grade))
- Industrial -40 to +85C vs extended -40 to +125C (vsPIC16F874-04E/PQ (E grade))
Ghi chú thiết kế
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.
Thông tin tuân thủ
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.