PIC16F874-04I/P - 8-bit 4MHz 7KB Flash MCU 40-PDIP | Microchip
MPN: PIC16F874-04I/P ✓ Hoạt độngPIC16F874-04I/P Tóm tắt
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, program memory, data RAM, peripherals, and I/O on one die. Within the broader semiconductor hierarchy, an MCU sits under microcontrollers, which in turn are a subset of digital logic integrated circuits (ICs) used for embedded control. The PIC16F family from Microchip is one of the longest-running 8-bit RISC architectures, prized for deterministic timing, low power, and a small instruction set that shortens firmware development cycles.
Key features of the PIC16F874-04I/P include the 4 MHz maximum oscillator, 4K x 14 Flash word program memory (7KB), 192 bytes of data SRAM, and 128 bytes of EEPROM. It provides 33 I/O pins, an integrated 10-bit A/D converter, two 8-bit timers plus one 16-bit timer, a USART with addressing, a Master Synchronous Serial Port (MSSP) for SPI/I2C, and two Capture/Compare/PWM modules. These peripherals address motor control, sensor readout, and human-machine interface (HMI) functions without external support chips.
The 40-pin PDIP form factor and pinout are compatible with PIC16C73B/74B/76/77 devices, simplifying board-level migration. According to Microchip's product page, Microchip recommends the newer PIC16F884 as a modern replacement offering more memory and peripherals in the same 40-pin footprint for new designs. The 4 MHz speed grade is appropriate for control loops, slow communication, and battery-powered sensor nodes rather than high-throughput DSP workloads.
Typical applications include industrial automation controllers, building HVAC systems, appliance control boards, instrumentation front panels, and legacy embedded retrofits. The wide operating voltage range (2.0 V to 5.5 V) allows direct connection to 3.3 V or 5 V rails. Engineers should observe proper decoupling (0.1 uF ceramic near VDD) and consider the in-circuit serial programming (ICSP) interface for firmware updates in fielded units.
Bộ thay thế dễ dàng lắp đặt cho PIC16F874-04I/P — 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/P (cùng hình factor và footprint) — khác nhau ở Package, Core Architecture, Timers, Mounting Type, Operating Temperature.
PIC16F874-04/PQ
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-04I/L
✅ 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-04/L
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F884-I/P
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F877A-I/P
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F871-I/P
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-04I/P Tỷ lệ tối đa & tính chất điện
| Core Architecture | PIC16 8-bit RISC |
| Tần số xung maksimum | 4 MHz |
| Instruction Cycle Time | 200 ns |
| Program Memory (Flash) | 7 KB (4K x 14 words) |
| Data SRAM | 192 bytes |
| Data EEPROM | 128 bytes |
| Number of I/O Pins | 33 |
| ADC Resolution | 10-bit |
| Supply Voltage Range | 2.0 V to 5.5 V |
| Khoảng nhiệt độ hoạt động | -40C to +85C (Industrial) |
| Hộp | 40-pin PDIP (P) |
| Kiểu lắp đặt | Through Hole |
| Timers | Two 8-bit + One 16-bit |
| Communication Peripherals | USART, MSSP (SPI/I2C) |
| PWM Modules | 2 (CCP) |
| Trạng thái RoHS | Compliant |
| Pinout Compatibility | PIC16C73B/74B/76/77 |
Cấu hình chân PIC16F874-04I/P
| Chân 1 | MCLR — Master Clear (Reset) input, active low |
| Chân 2 | RA0/AN0 — PORTA bit 0 / ADC input 0 |
| Chân 3 | RA1/AN1 — PORTA bit 1 / ADC input 1 |
| Chân 4 | RA2/AN2 — PORTA bit 2 / ADC input 2 |
| Chân 5 | RA3/AN3/VREF+ — PORTA bit 3 / ADC input 3 / VREF+ |
| Chân 6 | RA4/AN4 — PORTA bit 4 / ADC input 4 (open-drain) |
| Chân 7 | RA5/AN5/SS — PORTA bit 5 / ADC input 5 / SPI slave select |
| Chân 8 | OSC1/CLKIN — Oscillator crystal input / external clock |
| Chân 9 | OSC2/CLKOUT — Oscillator crystal output / clock out |
| Chân 10 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator out / clock in |
| Chân 11 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator in / CCP2 PWM |
| Chân 12 | RC2/CCP1 — PORTC bit 2 / CCP1 PWM output |
| Chân 13 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Chân 14 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| Chân 15 | RC5/SDO — PORTC bit 5 / SPI data out |
| Chân 16 | RC6/TX/CK — PORTC bit 6 / USART TX / clock |
| Chân 17 | RC7/RX/DT — PORTC bit 7 / USART RX / data |
| Chân 18 | VSS — Ground reference |
| Chân 19 | VDD — Positive supply voltage (2.0 V to 5.5 V) |
| Chân 20 | RB0/INT — PORTB bit 0 / external interrupt |
| Chân 21 | RB1 — PORTB bit 1 |
| Chân 22 | RB2 — PORTB bit 2 |
| Chân 23 | RB3/PGM — PORTB bit 3 / LVP programming |
| Chân 24 | RB4 — PORTB bit 4 |
| Chân 25 | RB5 — PORTB bit 5 |
| Chân 26 | RB6/PGC — PORTB bit 6 / ICSP clock |
| Chân 27 | RB7/PGD — PORTB bit 7 / ICSP data |
| Chân 28 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port bit 0 |
| Chân 29 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port bit 1 |
| Chân 30 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port bit 2 |
| Chân 31 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port bit 3 |
| Chân 32 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port bit 4 |
| Chân 33 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port bit 5 |
| Chân 34 | RD6/PSP6 — PORTD bit 6 / Parallel Slave Port bit 6 |
| Chân 35 | RD7/PSP7 — PORTD bit 7 / Parallel Slave Port bit 7 |
| Chân 36 | RE0/RD — PORTE bit 0 / PSP read control |
| Chân 37 | RE1/WR — PORTE bit 1 / PSP write control |
| Chân 38 | RE2/CS — PORTE bit 2 / PSP chip select |
| Chân 39 | VSS — Ground reference (second VSS pin) |
| Chân 40 | VDD — Positive supply voltage (second VDD pin) |
Ứng dụng tiêu biểu
PIC16F874-04I/P phù hợp cho 7 Áp dụngs: Industrial Automation Controllers, HVAC and Building Control Boards, Appliance Control Boards, Instrumentation Front Panels, Legacy Embedded Retrofits, Sensor Node Edge Devices, Educational and Development Platforms.
Industrial Automation Controllers
The PIC16F874-04I/P is well matched to industrial PLC node and machine controller designs where its industrial temperature grade (-40C to +85C), 33 I/O pins, and 10-bit ADC support direct sensor interfacing and relay driving. The 4 MHz clock provides deterministic instruction timing suitable for polling loops in the 1-10 ms range typical of SCADA nodes, while the 7KB Flash accommodates Modbus or CANopen state-machine firmware. Designers place 0.1 uF ceramic decoupling at each VDD pin and add a TVS on the MCLR line to survive factory-floor ESD events.
Được đề xuất
HVAC and Building Control Boards
HVAC damper and thermostat controllers benefit from the PIC16F874-04I/P's wide 2.0-5.5 V supply range, allowing direct operation from 24 VAC rectified rails with regulation, and from its integrated USART plus MSSP peripherals for talking to remote temperature/humidity sensors over I2C. The 10-bit ADC handles thermistor and pressure transducer inputs with sufficient resolution for setpoint control, while the 33 I/O lines drive triac outputs for compressor and fan switching. The -40C to +85C industrial range supports unconditioned mechanical rooms.
Được đề xuất
Appliance Control Boards
White-goods control boards for washers, dishwashers, and ovens use the PIC16F874-04I/P because its 33 I/O lines handle keypad scanning, LED/LCD multiplexing, and motor-driver logic without external glue chips. The 192-byte SRAM and 7KB Flash run simple state machines for cycle timing, and the integrated USART supports diagnostic or smart-appliance connectivity. EEPROM (128 bytes) preserves user settings across power cycles, a critical feature for appliance UX.
Được đề xuất
Instrumentation Front Panels
Bench-top instruments and panel meters leverage the PIC16F874-04I/P's USART for command-line interfaces, MSSP for SPI displays or ADC chips, and 10-bit ADC for direct transducer readout. The 4 MHz clock is sufficient for refresh rates up to a few hundred Hz on small segment displays. The 40-pin PDIP package is also friendly to hand-soldered prototypes and through-hole assembly favored in low-volume instrumentation. The industrial temp grade handles equipment-room environments.
Được đề xuất
Legacy Embedded Retrofits
The PIC16F874-04I/P is the go-to MCU for maintaining installed equipment originally designed around the PIC16C73B/74B/76/77 family, since its pinout is electrically and mechanically compatible. Existing PCBs accept the part without rework, and legacy firmware ports with minimal changes thanks to the same 35-instruction PIC16 mid-range core. The Flash memory also supports ICSP for in-field firmware patches, an advantage over the older one-time-programmable and ROM variants in legacy fleets.
Được đề xuất
Sensor Node Edge Devices
Battery-powered remote sensor nodes use the PIC16F874-04I/P for its low operating voltage (down to 2.0 V), modest 4 MHz clock enabling sleep-mode duty cycling, and integrated 10-bit ADC for periodic transducer readings. The 192-byte SRAM is sufficient for short data buffers before UART transmission, while the 33 I/O lines interface multiple low-power sensors. EEPROM preserves calibration constants across battery swaps, and ICSP allows field firmware updates.
Được đề xuất
Educational and Development Platforms
The PIC16F874-04I/P's simple 35-instruction RISC core, generous 7KB Flash, and through-hole 40-pin PDIP package make it ideal for university embedded-systems courses and hobbyist development boards. Students can hand-solder the part and probe every pin with standard lab equipment, while the ICSP interface supports frequent firmware reloads. PICkit programmers and the MPLAB X IDE ecosystem provide free tools, and the same package family is supported across PIC16F84 through PIC16F877A.
Đượ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/P — 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/P | PIC16F874-04I/L | PIC16F874-04E/P | PIC16F884-I/P | PIC16F877A-I/P |
|---|---|---|---|---|---|---|
| Package | 40-PDIP | 40-PDIP - same | 44-PLCC - same die | 40-PDIP - same | 40-PDIP - same | 40-PDIP - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Memory (Flash) | 7 KB | 7 KB | 7 KB | 7 KB | 14 KB | 8 KB |
| Data SRAM | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 368 bytes | 368 bytes |
| Maximum Clock Frequency | 4 MHz | 4 MHz | 4 MHz | 4 MHz | 10 MHz | 20 MHz |
| Operating Temperature | -40C to +85C | 0C to +70C | -40C to +85C | -40C to +125C | -40C to +85C | -40C to +85C |
| Number of I/O Pins | 33 | 33 | 33 | 33 | 36 | 33 |
| ADC Resolution | 10-bit | 10-bit | 10-bit | 10-bit | 10-bit | 10-bit |
| Lifecycle Status | Active | Active | Active | Active | Active (recommended) | Active |
Bảo phân biệt quan trọng
- Pin-compatible with PIC16C73B/74B/76/77 legacy parts (vsPIC16C74B-04/P)
- Industrial temperature grade in identical 40-PDIP (vsPIC16F874-04/P)
- Lower power consumption than newer PIC16F884 replacement (vsPIC16F884-I/P)
Ghi chú thiết kế
Place a 0.1 uF ceramic decoupling capacitor as close as physically possible to each VDD pin (pins 19 and 40) and a single 10 uF bulk tantalum or aluminum polymer capacitor on the board supply rail. The PIC16F874-04I/P operates across 2.0 V to 5.5 V but is most commonly run at 5.0 V for industrial retrofits. Use a low-dropout regulator such as MCP1700 for 3.3 V battery-powered nodes. Add a 10 kohm pull-up on MCLR (pin 1) and a 100 nF cap to ground for clean power-on reset behavior.
The "-04" speed grade suffix limits the oscillator to 4 MHz maximum; substituting a 20 MHz crystal without changing to the PIC16F874-20 variant will cause the chip to malfunction because the internal clock-divider configuration bits default differently across speed grades. Always verify the speed grade in your BOM matches the crystal or resonator installed. Also, ensure ICSP pins (RB6/RB7) are not permanently pulled low or high by external circuitry during programming - this is a frequent cause of in-circuit programming failures.
Route the oscillator traces (OSC1/OSC2, pins 8 and 9) as short as possible with a ground guard ring on both sides; place the crystal or resonator within 5 mm of the MCU. Keep ADC analog inputs (RA0-RA5) away from digital switching traces to minimize crosstalk, and use a separate analog ground return if mixed-signal accuracy is required. The MCLR pin benefits from a 100 nF cap directly to ground and a series resistor if the board will be exposed to ESD.
Thông tin tuân thủ
Industrial temperature grade -40C to +85C. RoHS and lead-free per Microchip product page; not AEC-Q100 qualified (use automotive-grade PIC16F874-04E/P or PIC variant for Q100).