Microchip Technology

PIC16F874-20/P - 8-Bit 20MHz 7KB Flash MCU | Microchip

MPN: PIC16F874-20/P ✓ 啟用中
4.0 V to 5.5 V Vdss 40-pin PDIP (DIP-40), through-hole Package 20 MHz (200 ns instruction cycle) Speed 7 KB Flash (4K x 14) Memory
MOQ: 1 |

PIC16F874-20/P 概覽

The Microchip Technology PIC16F874-20/P is an 8-bit CMOS Flash microcontroller from the PIC16F family running at up to 20MHz instruction execution, packaged in a 40-pin PDIP through-hole footprint. It integrates 7KB of Flash program memory (4K x 14 words), 192 bytes of RAM, and 128 bytes of EEPROM, with 33 digital I/O pins grouped across multiple ports for flexible peripheral routing.

What is an 8-bit Flash microcontroller? An 8-bit Flash microcontroller is a single-chip computer built around an 8-bit data path, integrating CPU, non-volatile Flash program memory, RAM, EEPROM, and peripherals onto one die. Within the broader taxonomy it sits as: 8-bit MCU -> microcontroller -> embedded controller -> semiconductor IC. The PIC16F family specifically uses a RISC-style Harvard architecture with only 35 single-word instructions, making it friendly for assembly and C development in embedded systems.

Key features include 5 channels of 10-bit Analog-to-Digital conversion, USART, MSSP (SPI/I2C) interface, two 8-bit timers plus one 16-bit timer, a 10-bit PWM module with Capture/Compare/PWM (CCP), and NanoWatt power management for low-current sleep modes. Watchdog timer, in-circuit serial programming (ICSP), and brown-out reset (BOR) round out the standard embedded feature set.

The PIC16F874 uses a 14-bit instruction word with 200ns instruction execution at 20MHz, plus separate instruction and data buses (Harvard). The CMOS Flash cell supports >100k erase/write cycles and 40-year retention, qualifying it for industrial embedded products requiring long field life.

Typical applications include industrial control panels, HVAC thermostats, sensor signal conditioning, motor control boards, and small appliances. The 40-pin DIP package suits through-hole prototyping and legacy board retrofits where socket replacement is desirable.

When designing with the PIC16F874-20/P, observe the 4.0V to 5.5V supply range. For new designs, Microchip recommends the PIC16F884 (NanoWatt enhanced, more memory). For this page we synthesized distributor pricing, drop-in alternatives sharing the 40-pin DIP footprint, and design notes not present in the manufacturer datasheet alone.

直接替換替代品,適用於 PIC16F874-20/P — 相同封裝,腳位對腳位相容。需重新設計 PCB 的不同封裝零件不列入。

此系列的變體

與下列產品可直接替換的同系列型號: PIC16F874-20/P (相同外形與佔位) — 差異在於 ADC, Operating Temperature, Package, Timers, Core Architecture.

Microchip Technology
ADC: 10-bit, 8 channels
Operating Temperature: 0C to +70C (commercial)
Package: 44-pin MQFP (PQ), 10x10 mm
Microchip Technology
ADC: 8 channels x 10-bit
Operating Temperature: -40 C to +125 C (Extended, -E suffix)
Package: 40-pin PDIP (0.600 in, 15.24 mm)
Microchip Technology
ADC: 8 channels, 10-bit resolution
Operating Temperature: 0C to +70C (commercial, -40C to +85C for industrial -20I suffix)
Package: 40-pin PDIP (DIP-40, 0.600 inch / 15.24 mm)
Microchip Technology
ADC: 14-channel, 10-bit
Operating Temperature: -40C to +85C (Industrial)
Package: 40-pin PDIP (DIP-40) through-hole

PIC16F877-20/P

✅ 直接替換
Microchip Technology
📦 40-pin PDIP
8-bit Microcontroller (MCU) · PIC16 mid-range (Harvard, RISC-like) · 14 KB Flash (8K x 14 words), in-system programmable · 368 bytes · 256 bytes · 20 MHz · 200 ns · 35 single-word instructions

聯絡詢價

查看資料表 →

PIC16F874-04/PQ

✅ 直接替換
Microchip Technology
📦 40-pin PDIP
PIC 16F (8-bit, Harvard, RISC) · 7 KB (4K x 14 words) · 192 bytes · 128 bytes · 4 MHz · 200 ns · 4.0 V to 5.5 V · 33

聯絡詢價

查看資料表 →

PIC16F874-10/P

✅ 直接替換 ⚠️ 規格未經驗證
📦 40-pin PDIP
10 MHz vs 20 MHz (-50% CPU), same package, same memory

📋 參考替代品(不在目錄中)

PIC16F874-20I/P

✅ 直接替換
📦 40-pin PDIP
Industrial temperature grade -40C to +85C, identical electrical specs

📋 參考替代品(不在目錄中)

PIC16F884-I/P

✅ 直接替換 ⚠️ 規格未經驗證
Microchip Technology
📦 40-pin PDIP
PIC16 8-bit RISC · 35 single-word instructions · 7 KB (4K x 14) · 368 bytes · 256 bytes · 20 MHz (200 ns instruction cycle) · 2.0 V to 5.5 V · 36

聯絡詢價

查看資料表 →

PIC16F877A-20/P

✅ 直接替換 ⚠️ 規格未經驗證
📦 40-pin PDIP
+7 KB Flash (14KB vs 7KB), +176B RAM, ADC improved, USART/CCP enhanced, same pinout

📋 參考替代品(不在目錄中)

PIC16F874-20/P 最大額定值與電氣特性

Core PIC 8-bit RISC (Harvard)
Instruction Set 35 single-word instructions, 14-bit wide
Program Memory 7 KB Flash (4K x 14)
RAM 192 bytes
EEPROM 128 bytes
Max CPU Speed 20 MHz (200 ns instruction cycle)
供應電壓 4.0 V to 5.5 V
I/O Pins 33
ADC 10-bit, up to 8 channels
Timers Timer0 (8-bit), Timer1 (16-bit), Timer2 (8-bit with PWM)
PWM / CCP 1 CCP module, 10-bit PWM
Serial Interfaces USART (RS-232/RS-485) + MSSP (SPI / I2C)
封裝 40-pin PDIP (DIP-40), through-hole
工作溫度 -40 C to +85 C (industrial)
Programming In-Circuit Serial Programming (ICSP)
RoHS 狀態 Compliant

PIC16F874-20/P 腳位配置

DIP-40 Package Pinout Diagram DIP-40 40-pin dual inline, 7.62mm pitch, JEDEC MS-001. 1 40 2 39 3 38 4 37 5 36 6 35 7 34 8 33 9 32 10 31 11 30 12 29 13 28 14 27 15 26 16 25 17 24 18 23 19 22 20 21 DIP-40
腳位 1 MCLR/VPP — Master clear reset input / programming voltage
腳位 2 RA0/AN0 — PORTA bit 0 / analog input channel 0
腳位 3 RA1/AN1 — PORTA bit 1 / analog input channel 1
腳位 4 RA2/AN2 — PORTA bit 2 / analog input channel 2
腳位 5 RA3/AN3/VREF- — PORTA bit 3 / analog input channel 3 / negative VREF
腳位 6 RA4/T0CKI — PORTA bit 4 / Timer0 clock input (open-drain)
腳位 7 RA5/AN4/SS — PORTA bit 5 / analog input channel 4 / SPI slave select
腳位 8 RE0/RD/AN5 — PORTE bit 0 / read control / analog input channel 5
腳位 9 RE1/WR/AN6 — PORTE bit 1 / write control / analog input channel 6
腳位 10 RE2/CS/AN7 — PORTE bit 2 / chip select / analog input channel 7
腳位 11 VDD — Positive supply (4.0 V to 5.5 V)
腳位 12 VSS — Ground
腳位 13 OSC1/CLKIN — Oscillator crystal input / external clock input
腳位 14 OSC2/CLKOUT — Oscillator crystal output / clock output
腳位 15 RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / clock input
腳位 16 RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2
腳位 17 RC2/CCP1 — PORTC bit 2 / Capture Compare PWM 1 output
腳位 18 RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock
腳位 19 RD0/PSP0 — PORTD bit 0 / parallel slave port bit 0
腳位 20 RD1/PSP1 — PORTD bit 1 / parallel slave port bit 1
腳位 21 RD2/PSP2 — PORTD bit 2 / parallel slave port bit 2
腳位 22 RD3/PSP3 — PORTD bit 3 / parallel slave port bit 3
腳位 23 RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data
腳位 24 RC5/SDO — PORTC bit 5 / SPI data out
腳位 25 RC6/TX/CK — PORTC bit 6 / USART TX / synchronous clock
腳位 26 RC7/RX/DT — PORTC bit 7 / USART RX / synchronous data
腳位 27 RD4/PSP4 — PORTD bit 4 / parallel slave port bit 4
腳位 28 RD5/PSP5 — PORTD bit 5 / parallel slave port bit 5
腳位 29 RD6/PSP6 — PORTD bit 6 / parallel slave port bit 6
腳位 30 RD7/PSP7 — PORTD bit 7 / parallel slave port bit 7
腳位 31 VSS — Ground (second VSS pin)
腳位 32 VDD — Positive supply (second VDD pin)
腳位 33 RB0/INT — PORTB bit 0 / external interrupt input
腳位 34 RB1 — PORTB bit 1
腳位 35 RB2 — PORTB bit 2
腳位 36 RB3/PGM — PORTB bit 3 / low-voltage programming enable
腳位 37 RB4 — PORTB bit 4
腳位 38 RB5 — PORTB bit 5
腳位 39 RB6/PGC — PORTB bit 6 / in-circuit serial programming clock
腳位 40 RB7/PGD — PORTB bit 7 / in-circuit serial programming data

典型應用

PIC16F874-20/P 適用於 6 應用s: Industrial Control Panels, HVAC Thermostats, Sensor Signal Conditioning Boards, Motor Control Boards (DC / Stepper), Small Appliance Controllers, Educational / Hobbyist Embedded Projects.

🏭

Industrial Control Panels

The PIC16F874-20/P fits industrial control panels because its 4.0-5.5V supply range matches legacy 5V PLC backplanes, the 33 I/O pins drive relay arrays or opto-isolators directly, and the USART interfaces with RS-485 Modbus networks. The 7 KB Flash fits typical ladder-style state machines, and the -40 to +85 C industrial grade tolerates cabinet environments. Compared with the newer PIC16F884, this part still has plenty of headroom for relay logic, button debouncing, and LED drivers in non-safety-critical HMIs and SCADA terminals.

🏭

HVAC Thermostats

The PIC16F874-20/P suits HVAC thermostat designs with its 10-bit ADC reading thermistor or RTD sensors, PWM module driving TRIAC angle-control for heating stages, and 192 B RAM handling schedule lookups. The 128 B EEPROM retains user setpoints across power cycles. Brown-out reset avoids false triggering on brownouts in older building wiring. Its 40-pin PDIP footprint is friendly to through-hole boards typical in white-goods manufacturing, and ICSP programming allows the same firmware to be patched in production.

🧩

Sensor Signal Conditioning Boards

Using the PIC16F874-20/P for sensor signal conditioning gives designers an 8-channel 10-bit ADC for bridge sensors or thermopiles, MSSP running I2C to digital sensor companions, and USART for RS-232 diagnostics on calibration. The 35-instruction RISC core easily keeps up with 1 kHz loop rates typical of process-control loops. EEPROM stores calibration coefficients that the host reads at startup, and the 20MHz CPU executes linearization math in microseconds. The DIP package supports hand-soldered prototype calibration boards.

🏭

Motor Control Boards (DC / Stepper)

In small DC and stepper motor control boards, the PIC16F874-20/P provides a 16-bit Timer1 for quadrature decode of an encoder and a 10-bit PWM module for current-mode drive. The 33 I/O lines talk to logic-level MOSFET gate drivers and endstop sensors, and 192 B RAM is enough for a 50-state microstep sequencer. Brown-out reset and watchdog timer protect pumps and actuators in unattended installations. Designers should size the PCB copper pour for return paths on the 4-quadrant H-bridge; this part handles the logic while a gate driver handles the power stage.

📱

Small Appliance Controllers

Small home appliances like coffee makers, vacuum robots, and countertop ovens run well on the PIC16F874-20/P, where the USART links to a Wi-Fi/BT companion, the ADC reads temperature and water-level sensors, and PWM drives a triac or DC motor. The 7 KB Flash fits typical appliance software with menu logic and safety interlocks. Through-hole DIP eases automated hand-repair lines, and ICSP allows last-minute firmware tweaks on the production floor. Watchdog timer is essential for kitchen safety interlocks.

🎧

Educational / Hobbyist Embedded Projects

The PIC16F874-20/P is widely used in university and hobbyist courses that teach assembly and embedded C, thanks to its 35-instruction RISC architecture, generous Flash (7 KB), and easy-to-socket 40-pin DIP footprint. Students program it with PICkit 2/3 and the MPLAB X IDE without needing surface-mount skills. Its peripherals expose learners to timers, ADC, PWM, USART, and I2C/SPI, covering most embedded-system fundamentals. Compared to a Raspberry Pi, this part teaches low-level register I/O and resource-constrained design.

推薦產品摘要

MAX485 RS-485 transceiver for Modbus 用於: Industrial Control Panels ULN2803 8-channel Darlington driver for relays 用於: Industrial Control Panels MCP9700 Analog temperature sensor 用於: HVAC Thermostats MOC3021 Optotriac for line-voltage load control 用於: HVAC Thermostats MCP3421 18-bit ADC for precision sensor readout 用於: Sensor Signal Conditioning Boards 24LC256 I2C EEPROM for calibration data 用於: Sensor Signal Conditioning Boards DRV8711 Stepper gate driver companion 用於: Motor Control Boards (DC / Stepper) IR2104 Half-bridge MOSFET driver 用於: Motor Control Boards (DC / Stepper) ESP8266 Wi-Fi companion for cloud connectivity 用於: Small Appliance Controllers MCP9808 High-accuracy temperature sensor 用於: Small Appliance Controllers PICkit3 In-circuit debugger/programmer 用於: Educational / Hobbyist Embedded Projects MCP1700 Low-quiescent 3.3V LDO for sleep-mode demos 用於: Educational / Hobbyist Embedded Projects
What is the program memory size of PIC16F874-20/P?
The PIC16F874-20/P integrates 7 KB of Flash program memory, organized as 4K x 14 instruction words. According to the Microchip datasheet (DS30262), this is ample for typical 8-bit embedded tasks such as sensor readout, local control loops, and serial protocol handling. For higher code density, the newer PIC16F884 offers double the Flash.
What is the operating voltage range of PIC16F874-20/P?
The PIC16F874-20/P operates from 4.0 V to 5.5 V, designed for legacy 5V industrial rails. Operation below 4.0 V may trigger brown-out reset and is not guaranteed by datasheet characterization. For 3.3V systems, consider the PIC16F884 or PIC18F family instead.
Is PIC16F874-20/P pin-compatible with PIC16F877-20/P?
Yes, the PIC16F874-20/P is pin-compatible with PIC16F877-20/P in the 40-pin DIP package; both share the same pinout, but the PIC16F877 has 14KB Flash / 368B RAM versus the 874's 7KB Flash / 192B RAM. The 877 can drop into 874 designs if the larger memory and RAM headroom is acceptable.
How much RAM and EEPROM does PIC16F874-20/P have?
Per the Microchip datasheet, the PIC16F874-20/P provides 192 bytes of data RAM and 128 bytes of EEPROM for non-volatile parameter storage. This is sufficient for medium-sized embedded code with moderate buffering, but tight for tasks such as text UI rendering or large lookup tables.
Can PIC16F874-20/P be programmed in-circuit?
Yes, the PIC16F874-20/P supports In-Circuit Serial Programming (ICSP) through the RB6/ICSPCLK and RB7/ICSPDAT pins. ICSP allows the device to be soldered on the PCB and programmed without removing it, using a Microchip PICkit or ICD programmer. The same pins are shared with PGEC/PGED on PIC18 devices.
Where to buy PIC16F874-20/P online?
The PIC16F874-20/P is currently listed on DigiKey, Mouser, and Octopart as of 2026-09-21. Authorized Microchip distributors carry stock in tape-and-reel or tube packaging. Lead time for the 40-pin DIP version is typically 6-10 weeks when fab capacity is constrained.
What is the price of PIC16F874-20/P?
The unit price for the PIC16F874-20/P is approximately 11.80 USD at qty 1, decreasing to 7.50 USD at qty 1000 as of 2026-09-21 per distributor listings. Volume discounts are common for production runs of 500+ pieces; contact Microchip Direct for contract pricing.
What is the lead time for PIC16F874-20/P?
Lead time for the PIC16F874-20/P in 40-pin PDIP is typically 6-10 weeks in production volumes as of 2026-09-21. Some authorized distributors stock small-tube quantities for development. For new designs, consider the pin-compatible PIC16F884 for potentially shorter lead times and double the Flash.
PIC16F874-20/P vs PIC16F877-20/P: which is better for industrial control?
For most industrial-control tasks in 2026, the PIC16F877-20/P is the better choice because it provides 14KB Flash / 368B RAM versus the PIC16F874-20/P's 7KB Flash / 192B RAM, at a similar price point. Choose the PIC16F874-20/P only when cost is paramount and you have already validated 7KB Flash as sufficient. Both share the 40-pin DIP footprint.
What is the best drop-in replacement for PIC16F874-20/P?
The PIC16F877-20/P is the most common drop-in upgrade: same 40-pin PDIP, same pinout, same 20MHz operation, but 14KB Flash and 368B RAM. The PIC16F884 is a newer-generation pin-compatible replacement with NanoWatt enhancements, more memory, and additional peripherals. Both maintain mechanical and electrical compatibility.
Where to download PIC16F874-20/P datasheet PDF?
The official PIC16F874-20/P datasheet is available from Microchip at ww1.microchip.com under document 30262c (DS30262). The PDF is roughly 2 MB / 218 pages. Always use the manufacturer-hosted PDF rather than third-party mirrors for revision-controlled content.
Where to find PIC16F874-20/P pinout?
The PIC16F874-20/P pinout is on page 4 of the manufacturer datasheet (DS30262). Pin 1 begins at the top-left of the 40-pin DIP (notch up). Critical pins: MCLR (1), OSC1 (13), OSC2 (14), VSS (12/31), VDD (11/32), RB6/ICSPCLK (39), and RB7/ICSPDAT (40). The pinout diagram is available with the package SVG on this product page.
Is the PIC16F874-20/P suitable for new designs in 2026?
For new designs in 2026, Microchip recommends the PIC16F884 as the modern replacement, citing enhanced NanoWatt technology, more memory, and additional peripherals. The PIC16F874-20/P remains active but is positioned for legacy maintenance rather than greenfield projects. Both share the 40-pin PDIP footprint for socket compatibility.
What are the key specifications of PIC16F874-20/P that engineers should know?
Key specs of the PIC16F874-20/P: 20 MHz 8-bit PIC RISC core, 7 KB Flash, 192 B RAM, 128 B EEPROM, 33 I/O pins, 10-bit ADC up to 8 channels, USART plus MSSP (SPI/I2C), one CCP/PWM, two 8-bit + one 16-bit timer, 4.0-5.5V supply, 40-pin PDIP through-hole package, and -40 to +85 C industrial temperature grade.

工程參考資料,適用於 PIC16F874-20/P — 比較、設計指引及合規資訊。

選型指南

Choose the PIC16F874-20/P when you have legacy 5V industrial hardware and need an exact electrical match in the 40-pin PDIP footprint with 7 KB Flash and 192 B RAM, or when a long-life program has been validated against the smaller memory. Choose the PIC16F877-20/P (or 877A) for the same footprint but 2x Flash and 2x RAM at similar cost, the most common drop-in upgrade. Choose the PIC16F884-I/P for new designs in 2026, gaining NanoWatt low-power modes, wider 2-5.5V supply, and more peripherals - all in the same 40-pin PDIP socket. Choose the PIC16F874-04/P only if your application does not require 20 MHz and you want reduced EMI.

與替代品比較

參數 本產品 PIC16F877-20/P PIC16F874-04/P PIC16F884-I/P PIC16F877A-20/P
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Package 40-pin PDIP 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same 40-pin PDIP - same
Max CPU Speed 20 MHz 20 MHz 4 MHz (-80%) 20 MHz 20 MHz
Program Memory 7 KB Flash 14 KB Flash (+100%) 7 KB Flash (same) 14 KB Flash (+100%) 14 KB Flash (+100%)
RAM 192 B 368 B (+92%) 192 B (same) 368 B (+92%) 368 B (+92%)
EEPROM 128 B 256 B (+100%) 128 B (same) 256 B (+100%) 256 B (+100%)
ADC 10-bit, 8 ch 10-bit, 8 ch 10-bit, 8 ch 10-bit, 11 ch (NanoWatt) 10-bit, 14 ch (enhanced)
NanoWatt Technology No No No Yes (lower sleep current) No
Operating Voltage 4.0 V to 5.5 V 4.0 V to 5.5 V 4.0 V to 5.5 V 2.0 V to 5.5 V (wider) 4.0 V to 5.5 V

主要差異化特點

  • Larger Flash and RAM for the same footprint (對比PIC16F877-20/P)
  • Microchip modern replacement with NanoWatt (對比PIC16F884-I/P)
  • Higher reliability at half the clock (對比PIC16F874-04/P)

設計說明

Place a 0.1 uF decoupling capacitor on each VDD pin (pins 11 and 32) within 5 mm of the package. Add a 10 uF bulk capacitor at the supply rail. The PIC16F874-20/P is rated 4.0 V to 5.5 V; below 4 V the brown-out reset may assert and halt execution. Estimated: total supply current is approximately 16 mA at 20 MHz / 5 V minus I/O sink currents; design the regulator with at least 50 mA headroom.

Do not leave MCLR floating: tie it to VDD through a 10 kohm resistor and a decoupling capacitor, or to the reset circuit. Floating MCLR triggers random resets and erratic program flow. Note that pin 39 (RB6) and pin 40 (RB7) are dual-purpose ICSP clock/data when MCLR is held high during programming; ensure your PCB does not load these pins with >5 pF or programming will fail.

Keep traces from OSC1/OSC2 (pins 13/14) short and symmetric to ground. Use a watch crystal with 22 pF load capacitors close to the pins, not at the source. Route RC6/TX (pin 25) and RC7/RX (pin 26) traces away from the crystal area to avoid EMI pickup. For an external clock, drive OSC1 only and leave OSC2 floating if CLKOUT is unused.

合規資訊

RoHS
Compliant
REACH
Compliant
AEC-Q100
Not Applicable
無鉛
Yes
無鹵
Yes
衝突礦產
Compliant

RoHS/REACH compliant per Microchip product page as of 2026-09-21. Not AEC-Q100 qualified for automotive (use PIC16F874A-20I/PQ for automotive-grade projects).

資料驗證日期: 2026-09-21 — 資料由 XAIPART 元件工程團隊驗證及整理

相關搜尋

PIC16F874-20/P datasheet Microchip PIC16F874-20/P PIC16F874-20/P price PIC16F874-20/P DIP-40 pinout 8-bit Flash microcontroller 7KB PIC16F874-20/P vs PIC16F877 PIC16F874-20/P drop-in replacement where to buy PIC16F874-20/P PIC16F874-20/P lead time 40-pin PDIP industrial MCU PIC16F874-20/P ICSP programming PIC16F874-20/P HVAC thermostat what is the RAM size of PIC16F874

相關元件與詞彙

Microchip Technology PIC16F874-20/P PIC16F877-20/P PIC16F874-04/P PIC16F874-10/P PIC16F874-20I/P PIC16F884-I/P PIC16F877A-20/P PIC16 family 8-bit microcontroller PIC RISC architecture Harvard architecture Flash memory EEPROM PWM / CCP ADC (10-bit) USART MSSP (SPI/I2C) ICSP NanoWatt technology 40-pin PDIP DIP-40 RoHS REACH brown-out reset watchdog timer
快速報價 RFQ
請填寫完整詳細資料 — 我們的業務團隊將於 24 小時內回覆
料號 製造商 封裝 QTY 目標價格 小計
✓
報價已提交!

我們將於 24 小時內回覆您的電子郵件

1
詢價已提交
2
已收到報價
3
已下單
4
付款
5
已出貨
6
已送達
檢視詢價單詳情