PIC16F874-04/L - 8-Bit 4MHz 7KB Flash MCU 44-PLCC | Microchip
MPN: PIC16F874-04/L ✓ Hoạt độngPIC16F874-04/L Tóm tắt
A PIC microcontroller is a programmable system-on-chip that combines a RISC CPU core, non-volatile program memory, RAM, EEPROM, and on-chip peripherals (timers, ADC, USART, I2C/SPI, PWM) into a single IC. Within the broader taxonomy, the PIC16F874 belongs to the mid-range PIC16 family, which sits between the baseline PIC10/12/16 family and the high-performance PIC18 and dsPIC families. Mid-range PICs are widely used in industrial control, automotive body electronics, and consumer appliances because of their deterministic architecture, low power consumption, and free MPLAB X IDE toolchain.
Key features of the PIC16F874-04/L include five 8-bit/16-bit timer/counter modules, a 10-bit ADC with up to 8 channels, a USART with support for RS-485/RS-232, an MSSP module supporting SPI and I2C (master/slave), a parallel slave port for external bus interfacing, and a 14-bit instruction word optimized for C and assembly development. The 04 speed grade limits the oscillator to 4 MHz, yielding 1 us instruction cycles, which is well-suited to applications that do not require high-speed sampling.
Architecturally, the PIC16F874 uses a Harvard RISC core with separate code and data buses, a hardware multiplier is absent on this mid-range device, and interrupt handling is vectored with prioritized sources. The FLASH memory supports in-circuit serial programming (ICSP) via RB6/RB7, enabling field firmware updates without removing the device from the board.
Typical applications include industrial automation controllers, HVAC and thermostat systems, motor control front-ends, smart sensor hubs, and legacy embedded products migrating from PIC16C/CR to FLASH. The 44-PLCC package offers socketed replacement-friendly mounting for low-volume and prototyping builds. According to Microchip, the PIC16F874 is recommended for new designs; engineers are pointed to PIC16F884 for new designs that need more memory, ADC channels, and peripherals.
When designing with this MCU, allocate a 100 nF decoupling capacitor within 5 mm of VDD and a 10 uF bulk capacitor near the ICSP header. Use a 4 MHz crystal with 22 pF load capacitors if higher timing accuracy than the internal RC oscillator is required. Note that the 04 speed grade caps oscillator frequency at 4 MHz; if 20 MHz operation is needed, select the PIC16F874-20/L variant.
Bộ thay thế dễ dàng lắp đặt cho PIC16F874-04/L — 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/L (cùng hình factor và footprint) — khác nhau ở Package, Timers, Core Architecture, Operating Temperature, Communication Peripherals.
PIC16F874-20/L
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F874-04I/L
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F874-20I/L
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F884-I/L
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F874-04/L Tỷ lệ tối đa & tính chất điện
| Core Architecture | 8-bit PIC16 mid-range RISC |
| Program Memory Type | FLASH |
| Program Memory Size | 7 KB (4K x 14 words) |
| SRAM | 192 bytes |
| EEPROM | 128 bytes |
| Maximum CPU Clock | 4 MHz |
| Instruction Cycle Time | 200 ns (at 20 MHz) / 1 us at 4 MHz |
| Supply Voltage (VDD) | 4 V to 5.5 V |
| I/O Pins | 33 |
| Hộp | 44-pin PLCC (J-lead) |
| Nhiệt độ hoạt động | 0C to +70C (commercial, /L) |
| ADC | 10-bit, up to 8 channels |
| Timers | Three 8/16-bit timers (Timer0, Timer1, Timer2) |
| Communication Peripherals | USART (RS-232/RS-485), MSSP (SPI/I2C) |
| Parallel Slave Port | Yes (8-bit PSP) |
| ICSP | In-Circuit Serial Programming (RB6/RB7) |
| Trạng thái RoHS | Compliant |
Cấu hình chân PIC16F874-04/L
| Chân 1 | MCLR/VPP — Master clear (reset) input / programming voltage input |
| 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 — PORTA bit 2 / analog input channel 2 |
| Chân 5 | RA3/AN3/VREF — PORTA bit 3 / analog input channel 3 / VREF+ |
| Chân 6 | RA4/T0CKI — PORTA bit 4 / Timer0 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 / parallel slave port read / AN5 |
| Chân 9 | RE1/WR/AN6 — PORTE bit 1 / parallel slave port write / AN6 |
| Chân 10 | RE2/CS/AN7 — PORTE bit 2 / parallel slave port chip select / AN7 |
| Chân 11 | VDD — Positive supply voltage (4V to 5.5V) |
| Chân 12 | VSS — Ground reference |
| Chân 13 | OSC1/CLKI — Crystal oscillator input / external clock input |
| Chân 14 | OSC2/CLKO — Crystal oscillator output / clock output |
| Chân 15 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / Timer1 clock |
| Chân 16 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2 PWM |
| Chân 17 | RC2/CCP1 — PORTC bit 2 / CCP1 PWM output |
| Chân 18 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Chân 19 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| Chân 20 | RC5/SDO — PORTC bit 5 / SPI data out |
| Chân 21 | RC6/TX/CK — PORTC bit 6 / USART TX / clock |
| Chân 22 | RC7/RX/DT — PORTC bit 7 / USART RX / data |
| Chân 23 | RB0/INT — PORTB bit 0 / external interrupt input |
| Chân 24 | RB1 — PORTB bit 1 |
| Chân 25 | RB2 — PORTB bit 2 |
| Chân 26 | RB3/PGM — PORTB bit 3 / low-voltage programming |
| Chân 27 | RB4 — PORTB bit 4 |
| Chân 28 | RB5 — PORTB bit 5 |
| Chân 29 | RB6/PGC — PORTB bit 6 / ICSP clock |
| Chân 30 | RB7/PGD — PORTB bit 7 / ICSP data |
| Chân 31 | VSS — Ground reference |
| Chân 32 | VDD — Positive supply voltage (4V to 5.5V) |
| Chân 33 | RD0/PSP0 — PORTD bit 0 / parallel slave port bit 0 |
| Chân 34 | RD1/PSP1 — PORTD bit 1 / parallel slave port bit 1 |
| Chân 35 | RD2/PSP2 — PORTD bit 2 / parallel slave port bit 2 |
| Chân 36 | RD3/PSP3 — PORTD bit 3 / parallel slave port bit 3 |
| Chân 37 | RD4/PSP4 — PORTD bit 4 / parallel slave port bit 4 |
| Chân 38 | RD5/PSP5 — PORTD bit 5 / parallel slave port bit 5 |
| Chân 39 | RD6/PSP6 — PORTD bit 6 / parallel slave port bit 6 |
| Chân 40 | RD7/PSP7 — PORTD bit 7 / parallel slave port bit 7 |
Ứng dụng tiêu biểu
PIC16F874-04/L phù hợp cho 6 Áp dụngs: Industrial Automation Controller, HVAC Thermostat and Climate Control, Motor Control Front-End, Smart Sensor Hub and Data Logger, Consumer Appliance Control Board, Legacy Industrial Controller Replacement.
Industrial Automation Controller
The PIC16F874-04/L fits industrial control because its 33 I/O pins drive relays, contactors, and indicator panels without external mux logic. Its 7 KB FLASH holds ladder-logic-style state machines, while the 128-byte EEPROM stores non-volatile calibration constants and trip thresholds across power cycles. The 10-bit ADC with 8 channels digitizes 4-20 mA loop signals and 0-10 V process variables, and the USART links to an HMI or PLC over RS-485 at up to 4 MHz. Designers benefit from PIC16F874-04/L's proven mid-range RISC core, deterministic 1 us instruction cycle, and the free MPLAB X IDE toolchain, all of which reduce firmware risk in long-life factory automation projects.
Được đề xuất
HVAC Thermostat and Climate Control
The PIC16F874-04/L is well-suited to HVAC thermostats because it integrates a 10-bit ADC for NTC thermistor temperature sensing, PWM outputs for damper and valve actuation, and 192 bytes of SRAM sufficient for scheduling state. Operating from a 5 V supply matches common HVAC control boards, and the 0-70C commercial temperature range covers indoor equipment. The MSSP module connects to wall-mounted display boards via I2C, while the USART links to a Wi-Fi or Zigbee module for smart-thermostat connectivity. With 7 KB of FLASH, the device accommodates full scheduling logic, PID control loops, and a user interface driver without external memory.
Được đề xuất
Motor Control Front-End
The PIC16F874-04/L drives small BLDC or stepper motor control front-ends by generating PWM on CCP modules, sampling current via the 10-bit ADC, and sequencing commutation through GPIO. Its 4 MHz clock yields 1 us PWM resolution at 20 kHz switching frequency, sufficient for fractional-horsepower fans and pumps. The USART provides a debug and command channel to a host controller or inverter display. With 33 I/O, designers can connect Hall sensors, encoder feedback, and fault indicators directly to the MCU, eliminating the need for an I/O expander. The 44-pin PLCC package is socketed, simplifying bench tuning and field service.
Được đề xuất
Smart Sensor Hub and Data Logger
The PIC16F874-04/L serves as a smart sensor hub by aggregating multiple analog inputs through its 8-channel 10-bit ADC, conditioning data, and forwarding it via USART or SPI to a host processor. Its 128-byte EEPROM stores calibration coefficients and sensor identity for plug-and-play replacement, while the 192-byte SRAM holds 32 latest samples for averaging. The MSSP module reads I2C temperature, humidity, or pressure sensors without an external bus controller. ICSP via RB6/RB7 enables in-the-field firmware updates as sensor algorithms evolve. This makes PIC16F874-04/L an ideal low-power data aggregator for industrial IoT edge nodes.
Được đề xuất
Consumer Appliance Control Board
The PIC16F874-04/L is widely used in consumer appliances like washing machines, microwave ovens, and coffee makers because of its 33 I/O capability, integrated timers, and free development tools. The 10-bit ADC reads water level, temperature, and humidity sensors, while PWM outputs drive solenoid valves, triac-fired heaters, and brushless DC motors. The USART connects to LED or LCD user interfaces, and the parallel slave port allows a graphics controller to share memory. With 7 KB FLASH, designers implement complete wash-cycle programs, user menus, and diagnostic routines without external program memory.
Được đề xuất
Legacy Industrial Controller Replacement
The PIC16F874-04/L is the go-to choice for maintaining and replicating legacy industrial controllers that originally used PIC16C, PIC16CR, or PIC16F parts in 40-pin PDIP or 44-pin PLCC sockets. Engineers can drop it into existing PCB footprints without redesigning the board, and use ICSP to program it without removing it from the circuit. The 7 KB FLASH, 192-byte SRAM, and 128-byte EEPROM match the resource profile of mid-1990s designs, allowing straightforward firmware porting. Industrial customers with installed equipment that must be supported for 10-20 years rely on the PIC16F874-04/L's long-term availability and Microchip's product longevity policy.
Đượ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/L — 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-20/L | PIC16F874-04I/L | PIC16F874-20I/L | PIC16F884-I/L |
|---|---|---|---|---|---|
| Package | 44-pin PLCC | 44-pin PLCC - same | 44-pin PLCC - same | 44-pin PLCC - same | 44-pin PLCC - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Max Clock Speed | 4 MHz | 20 MHz | 4 MHz | 20 MHz | 20 MHz |
| FLASH Memory | 7 KB | 7 KB | 7 KB | 7 KB | 14 KB |
| SRAM | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 368 bytes |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 256 bytes |
| I/O Pins | 33 | 33 | 33 | 33 | 36 |
| Operating Temperature | 0C to +70C (commercial) | 0C to +70C (commercial) | -40C to +85C (industrial) | -40C to +85C (industrial) | -40C to +85C (industrial) |
Bảo phân biệt quan trọng
- 44-pin PLCC with socketed mounting (vsPIC16F874-04/PQ (44-pin PQFP))
- Industry-standard mid-range PIC16 core with proven toolchain (vsPIC16F84A (18-pin baseline PIC))
- Long-term availability with Microchip product longevity program (vsPIC16F74 (smaller FLASH variant))
Ghi chú thiết kế
Estimated: at 4 MHz clock and 5 V supply, PIC16F874-04/L typical operating current is 2-5 mA, with idle current below 1 mA and sleep current around 1 uA. Place a 100 nF decoupling capacitor within 5 mm of each VDD pin and a 10 uF bulk capacitor near the ICSP header to suppress switching noise. Brown-out reset (BOR) should be enabled in CONFIG to avoid undefined behavior during slow power-down ramps below 4V.
The PIC16F874-04/L operates over 0C to +70C (commercial /L grade). For industrial environments, choose PIC16F874-04I/L rated -40C to +85C. The 44-pin PLCC package has a typical theta_JA around 60 C/W in still air, well within the device's thermal envelope since total power dissipation is below 50 mW. No heatsink is required.
Route the 4 MHz crystal traces symmetrically and keep them short (under 10 mm) with grounded guard traces to reduce EMI pickup. Use 22 pF load capacitors matched to the crystal's load specification. Place MCLR/VPP reset pull-up resistor (typically 10 kOhm) close to the pin and add a 100 nF cap if long reset traces are unavoidable. Keep ICSP lines RB6/PGC and RB7/PGD away from high-current switching traces to prevent programming glitches.
Do not exceed 5.5V on any VDD pin or apply voltage to MCLR before VDD is stable - this can trigger latch-up. The 04 speed grade caps the oscillator at 4 MHz; using a 20 MHz crystal on the 04 grade may cause intermittent operation or device damage over time. When porting code from PIC16F877, verify ADC channel count (8 vs 14) and parallel slave port pin mapping. Always set the CONFIG register for proper oscillator selection, BOR, and code protection before final firmware lock.
Thông tin tuân thủ
RoHS and REACH compliance per Microchip product documentation. Not AEC-Q100 qualified; for automotive applications consider PIC16F1939 or PIC16F1829. Lead-free finish compatible with 260C peak reflow. Operating temperature 0C to +70C (commercial /L grade).