PIC16F874-04/PQ - 8-bit MCU, 7KB Flash, 33 I/O, 4MHz | Microchip
MPN: PIC16F874-04/PQ ✓ Hoạt độngPIC16F874-04/PQ Tóm tắt
A Microcontroller Unit (MCU) is a single-chip computer containing a CPU core, program memory (Flash/ROM), data memory (RAM), timers, communication peripherals, and I/O pins on one IC. PIC microcontrollers are RISC-based Harvard-architecture devices optimized for deterministic instruction execution. Within the broader semiconductor hierarchy, MCUs sit below microprocessors (MPUs) and above discrete logic ICs, serving as the embedded "brain" in everything from white goods to industrial controllers.
Key features of the PIC16F874-04/PQ include 4 MHz maximum clock speed, 200 ns instruction cycle time, an operating voltage range of 4.0 V to 5.5 V, in-circuit serial programming (ICSP), and a 14-bit instruction word with only 35 single-word instructions. The 10-bit A/D converter with 8 input channels is multiplexed across port pins, enabling direct sensor interfacing without external ADC ICs.
The PIC16F874 architecture uses a 14-bit instruction word with separate code and data buses (Harvard), allowing simultaneous fetch and access. The 4 MHz oscillator yields a 1 MIPS throughput, and the integrated brown-out reset, watchdog timer, and power-on reset provide robust field reliability. The 33 I/O pins can source/sink up to 25 mA each, sufficient for direct LED drive.
Typical applications include industrial control panels, instrumentation, sensor signal conditioning nodes, motor-control front-ends, and embedded data acquisition systems. The wide 4-5.5V supply range suits both 5V industrial buses and battery-backed designs. Common companion chips are the MCP2551 CAN transceiver and the MCP1700 LDO regulator.
When designing with this part, ensure decoupling on VDD/VSS pins with 100 nF ceramic caps placed within 5 mm of each pin. Note that the "-04" speed grade limits operation to 4 MHz; for 20 MHz use the PIC16F874-20/PQ variant. The 44-MQFP footprint matches the PIC16F877-04/PQ, allowing PCB reuse with larger-memory variants.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet alone. Source data is from Microchip's official PIC16F87x datasheet (DS30292D) and 2026 distributor listings.
Bộ thay thế dễ dàng lắp đặt cho PIC16F874-04/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-04/PQ (cùng hình factor và footprint) — khác nhau ở Package, Timers, Core Architecture, ADC, Operating Temperature.
PIC16F874T-04/PQ
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F874-04I/PQ
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-04/P
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F877-04/PQ
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F877-04/PT
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F887-I/P
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-04/PQ Tỷ lệ tối đa & tính chất điện
| Core Architecture | PIC 16F (8-bit, Harvard, RISC) |
| Program Memory (Flash) | 7 KB (4K x 14 words) |
| RAM | 192 bytes |
| EEPROM | 128 bytes |
| Maximum Clock Speed | 4 MHz |
| Instruction Cycle Time | 200 ns |
| Supply Voltage (VDD) | 4.0 V to 5.5 V |
| I/O Pins | 33 |
| ADC | 10-bit, 8 channels |
| Timers | Two 8-bit + one 16-bit |
| Communication Peripherals | USART + MSSP (SPI / I2C) |
| Hộp | 44-pin MQFP (PQ), 10x10 mm |
| Kiểu lắp đặt | Surface Mount |
| Nhiệt độ hoạt động | 0C to +70C (commercial) |
| Instruction Set | 35 single-word instructions, 14-bit wide |
| Brown-out Reset / Watchdog | Yes (integrated) |
| In-Circuit Programming | ICSP supported |
| Lead-Free / RoHS | Compliant (per distributor data) |
Cấu hình chân PIC16F874-04/PQ
| Chân 1 | MCLR/VPP/THV — Master Clear (active-low reset) / Programming voltage / Test high voltage |
| Chân 2 | RA0/AN0 — PORTA bit 0 / Analog input channel 0 |
| Chân 3 | RA1/AN1 — PORTA bit 1 / Analog input channel 1 |
| Chân 4 | RA2/AN2/VREF- — PORTA bit 2 / Analog input channel 2 / ADC negative reference |
| Chân 5 | RA3/AN3/VREF+ — PORTA bit 3 / Analog input channel 3 / ADC positive reference |
| Chân 6 | RA4/T0CKI — PORTA bit 4 (open-drain) / Timer 0 clock input |
| Chân 7 | RA5/AN4/SS — PORTA bit 5 / Analog input channel 4 / SPI slave select |
| Chân 8 | RE0/RD/AN5 — PORTE bit 0 / Read control for parallel slave port / Analog input channel 5 |
| Chân 9 | RE1/WR/AN6 — PORTE bit 1 / Write control for parallel slave port / Analog input channel 6 |
| Chân 10 | RE2/CS/AN7 — PORTE bit 2 / Chip select for parallel slave port / Analog input channel 7 |
| Chân 11 | VDD — Positive supply voltage (4.0V to 5.5V) |
| Chân 12 | VSS — Ground reference |
| Chân 13 | OSC1/CLKIN — Oscillator crystal input / External clock input |
| Chân 14 | OSC2/CLKOUT — Oscillator crystal output / Clock output (Fosc/4) |
| Chân 15 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer 1 oscillator output / Timer 1 clock input |
| Chân 16 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer 1 oscillator input / Capture/Compare/PWM 2 |
| Chân 17 | RC2/CCP1 — PORTC bit 2 / Capture/Compare/PWM 1 |
| Chân 18 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Chân 19 | RD0/PSP0 — PORTD bit 0 / Parallel slave port bit 0 |
| Chân 20 | RD1/PSP1 — PORTD bit 1 / Parallel slave port bit 1 |
| Chân 21 | RD2/PSP2 — PORTD bit 2 / Parallel slave port bit 2 |
| Chân 22 | RD3/PSP3 — PORTD bit 3 / Parallel slave port bit 3 |
| Chân 23 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| Chân 24 | RC5/SDO — PORTC bit 5 / SPI data out |
| Chân 25 | RC6/TX/CK — PORTC bit 6 / USART asynchronous transmit / synchronous clock |
| Chân 26 | RC7/RX/DT — PORTC bit 7 / USART asynchronous receive / synchronous data |
| Chân 27 | RD4/PSP4 — PORTD bit 4 / Parallel slave port bit 4 |
| Chân 28 | RD5/PSP5 — PORTD bit 5 / Parallel slave port bit 5 |
| Chân 29 | RD6/PSP6 — PORTD bit 6 / Parallel slave port bit 6 |
| Chân 30 | RD7/PSP7 — PORTD bit 7 / Parallel slave port bit 7 |
| Chân 31 | VSS — Ground reference |
| Chân 32 | VDD — Positive supply voltage (4.0V to 5.5V) |
| Chân 33 | RB0/INT — PORTB bit 0 / External interrupt input |
| Chân 34 | RB1 — PORTB bit 1 |
| Chân 35 | RB2 — PORTB bit 2 |
| Chân 36 | RB3/PGM — PORTB bit 3 / Low-voltage ICSP programming input |
| Chân 37 | RB4 — PORTB bit 4 (interrupt-on-change) |
| Chân 38 | RB5 — PORTB bit 5 (interrupt-on-change) |
| Chân 39 | RB6/PGC — PORTB bit 6 (interrupt-on-change) / In-circuit debugger clock |
| Chân 40 | RB7/PGD — PORTB bit 7 (interrupt-on-change) / In-circuit debugger data |
| Chân 41 | VSS — Ground reference |
| Chân 42 | VDD — Positive supply voltage (4.0V to 5.5V) |
| Chân 43 | NC — Not connected (per datasheet) |
| Chân 44 | NC — Not connected (per datasheet) |
Ứng dụng tiêu biểu
PIC16F874-04/PQ phù hợp cho 7 Áp dụngs: Industrial Sensor Data Acquisition, Home Appliance Control Boards, Automotive Aftermarket Displays, Medical Instrumentation Front-Ends, Building Automation HVAC Controllers, Point-of-Sale Terminal Peripherals, Educational Microcontroller Training Kits.
Industrial Sensor Data Acquisition
The PIC16F874-04/PQ's integrated 10-bit 8-channel ADC and 33 I/O pins make it well-suited for industrial multi-sensor data acquisition modules reading 4-20 mA loops, RTDs, and bridge pressure sensors. Its 4.0-5.5V supply tolerates regulated 24V industrial bus rails stepped down by an MCP1700 LDO, while 192 bytes of RAM buffer scan samples before UART transmission to a host PLC. Engineers value the brown-out reset and watchdog timer for EN 61000 EMC compliance in factory-floor deployments.
Được đề xuất
Home Appliance Control Boards
Washing machines, dishwashers, and microwave oven controllers benefit from the PIC16F874-04/PQ's 33 I/O lines driving seven-segment displays, keypads, relay coils, and triac gates. Its 7 KB Flash holds motor-state machine firmware plus UI handlers, while 128 bytes EEPROM retains user settings across power cycles. Compared with discrete logic, the integrated ADC reads water level and temperature sensors directly, reducing BOM by 4-5 ICs.
Được đề xuất
Automotive Aftermarket Displays
Aftermarket automotive gauge clusters and digital dashboards use the PIC16F874-04/PQ to drive character LCDs and read OBD-II data via the USART. The IC's 4 MHz instruction rate is sufficient for updating 16-segment speedometer and tachometer displays at 10 Hz refresh. Industrial temperature grades (-40C to +85C suffix "-I") survive under-dash thermal environments, and the 44-MQFP package is small enough for behind-cluster PCBs.
Được đề xuất
Medical Instrumentation Front-Ends
Portable medical devices such as blood pressure monitors, pulse oximeters, and glucometer bases use the PIC16F874-04/PQ for ADC sampling, LCD control, and button de-bounce. The 10-bit resolution provides sufficient accuracy for SpO2 and NIBP calculations, while the integrated USART streams data to a host PC or Bluetooth module. Its low power consumption extends battery life in handheld devices used in clinical settings.
Được đề xuất
Building Automation HVAC Controllers
HVAC zone controllers and thermostat hubs use the PIC16F874-04/PQ to read multiple temperature sensors via the 8-channel ADC and drive 24 VAC damper motors through zero-cross triac circuits. Its 33 I/O handle multiple zone outputs, while the USART/MSSP peripherals link to a central building automation controller over RS-485 or I2C. The 5V-tolerant design directly interfaces with legacy 24V HVAC infrastructure via optocouplers.
Được đề xuất
Point-of-Sale Terminal Peripherals
POS terminal accessories - barcode scanner decoders, receipt printer controllers, and customer-facing displays - leverage the PIC16F874-04/PQ's MSSP peripheral for SPI barcode wand interfacing and USART for printer comms. The 7 KB Flash holds font tables and protocol stacks, and the 33 I/O drive 4x20 character LCDs and piezo buzzers. Compared with 8051 designs, the PIC16F874 offers faster interrupt response for real-time barcode decoding.
Được đề xuất
Educational Microcontroller Training Kits
Universities and embedded-systems training programs use the PIC16F874-04/PQ in lab boards teaching assembly language, ADC fundamentals, and timer/counter operation. Its 35-instruction RISC architecture is approachable for beginners, and the 44-MQFP package exercises real-world surface-mount soldering skills. The IC's ICSP support enables in-circuit programming without removing the chip, ideal for iterative lab experimentation and student projects.
Đượ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-04/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 | PIC16F874T-04/PQ | PIC16F874-04I/PQ | PIC16F877-04/PQ | PIC16F877-04/PT | PIC16F887-I/P |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | MQFP-44 (PQ), 10x10 mm | MQFP-44 (PQ) - same | MQFP-44 (PQ) - same | MQFP-44 (PQ) - same | MQFP-44 (PQ) - same | MQFP-44 (PQ) - same |
| Flash Memory | 7 KB | 7 KB | 7 KB | 14 KB (+100%) | 14 KB (+100%) | 14 KB (+100%) |
| RAM | 192 bytes | 192 bytes | 192 bytes | 368 bytes (+92%) | 368 bytes (+92%) | 368 bytes (+92%) |
| Maximum Clock Speed | 4 MHz | 4 MHz | 4 MHz | 4 MHz | 4 MHz | 20 MHz (+400%) |
| Operating Temperature | 0C to +70C (commercial) | 0C to +70C | -40C to +85C (industrial) | 0C to +70C | 0C to +70C | -40C to +85C (industrial) |
| ADC | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 14 channels |
| I/O Pins | 33 | 33 | 33 | 33 | 33 | 36 |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 256 bytes (+100%) | 256 bytes (+100%) | 256 bytes (+100%) |
| Approx. Unit Price (1pc) | $8.62 | ~$8.62 (same silicon, T&R variant) | ~$9.50 (industrial grade premium) | ~$9.20 (more memory) | ~$9.20 | ~$3.50 (modern, lower-cost successor) |
Bảo phân biệt quan trọng
- Higher memory density in same footprint (vsPIC16F877-04/PQ)
- Modern architectural improvements (vsPIC16F887-I/P)
- Industrial temperature range option (vsPIC16F874-04I/PQ)
- Established mid-range PIC architecture (vsPIC16F874-04/P (PDIP variant))
Ghi chú thiết kế
Place 100 nF ceramic decoupling capacitors on every VDD/VSS pair (pins 11/12, 31/32, 41/42) within 5 mm of the IC pins. For battery-backed designs, add a 10 uF bulk capacitor on the main VDD rail to handle ADC reference inrush. The PIC16F874-04/PQ draws approximately 2-15 mA active and 1-5 uA standby; use sleep mode aggressively for power-sensitive designs. Per Microchip AN234, an MCP1700-3302E LDO is the recommended supply when input exceeds 6V.
The 44-pin MQFP (10x10 mm) package has 0.8 mm pin pitch. Use a 4-layer PCB with dedicated VDD and GND planes for best EMI/EMC performance. Keep the quartz crystal or resonator within 10 mm of OSC1/OSC2 (pins 13/14), with the crystal load capacitors (typically 15-33 pF) grounded directly to the VSS plane. Per Microchip AN577, route MCLR (pin 1) with a 10 kohm pull-up to VDD and avoid long traces that could pick up ESD.
Common pitfalls when using the PIC16F874-04/PQ: (1) Mistakenly configuring CONFIG bits for the wrong oscillator mode - HS mode requires a crystal, RC mode uses external resistor, LP mode is for low-power 32 kHz; (2) Forgetting that PORTA pins default to analog input and must be configured via ADCON1 for digital I/O; (3) Exceeding the 25 mA per-pin source/sink limit when driving LEDs directly without current-limiting resistors; (4) Choosing the -04 speed grade when the design needs 20 MHz throughput - use PIC16F874-20/PQ instead. Estimated power dissipation at 4 MHz, 5V, full I/O load: approximately 75 mW.
When using the MSSP peripheral for SPI or I2C communication, keep clock traces under 50 mm and add 22-33 ohm series termination if the bus exceeds 10 MHz. For I2C, install 4.7 kohm pull-ups on SCL/SDA lines regardless of master/slave role. The USART pins (RC6/RC7) tolerate direct RS-232 connection only through a MAX232 or similar level translator - never connect RS-232 voltages (>±12V) directly to the PIC pins. Per Microchip AN774, enable the USART's BRGH bit for higher baud rate accuracy.
Thông tin tuân thủ
Per distributor data, RoHS and lead-free compliant. Not AEC-Q100 qualified - automotive applications should use PIC16F874-04I/PQ (industrial temperature grade) or AEC-Q100-qualified PIC16F series parts. Conflict minerals statement available from Microchip's corporate compliance page.