Microchip Technology

PIC16F871-E/P - 8-bit MCU, 3.5KB Flash, 20MHz, 40-Pin PDIP | Microchip

MPN: PIC16F871-E/P ✓ 啟用中
4.0 V to 5.5 V Vdss 40-DIP (0.600", 15.24 mm) Package 20 MHz Speed Flash Memory
MOQ: 1 |

PIC16F871-E/P 概覽

The Microchip Technology PIC16F871-E/P is an 8-bit CMOS Flash-based RISC microcontroller from the PIC16 family, offering 3.5 KB of Flash program memory, 192 bytes of RAM, and 64 bytes of EEPROM data memory in a 40-pin PDIP (Plastic Dual In-line Package) tube format. Operating at up to 20 MHz with a 200 ns instruction cycle, the device supports an extended industrial temperature range of -40C to +125C and runs from a 4.0 V to 5.5 V supply.

What is a PIC16 microcontroller? The PIC16 family is a line of 8-bit Harvard-architecture microcontrollers from Microchip Technology that sits within the broader taxonomy of microcontroller -> embedded processor -> semiconductor. PIC16 devices use a reduced instruction set (RISC) with typically 35 single-word instructions, are Flash-based for in-field reprogrammability, and are widely used in cost-sensitive embedded designs ranging from appliance controls to industrial sensors. The PIC16F871 specifically belongs to the "PIC16F87x" mid-range sub-family with enhanced peripherals such as 10-bit ADC and USART.

Key features include an integrated ICD (In-Circuit Debugger) interface, self-programming capability, eight channels of 10-bit Analog-to-Digital conversion, two additional 8-bit timers, a 16-bit timer with capture/compare/PWM, and a Universal Asynchronous Receiver Transmitter (USART) for serial communications. The part is fully static, supports nanoWatt power management for low-power sleep modes, and exposes 33 digital I/O lines across two ports (PORTA, PORTB, PORTC, PORTD, PORTE).

Architecturally the PIC16F871 uses a Harvard memory layout with separate program and data buses, allowing simultaneous instruction fetch and operand access. Its 14-bit wide instruction word yields high code density, and the in-circuit serial programming (ICSP) interface plus ICD permit real-time debug without removing the device from the board - a feature uncommon in this price tier.

Typical applications include industrial control panels, motor drive interface logic, HVAC thermostats, appliance controllers, instrumentation front-ends, and educational/learning kits where the PIC16F871's simple toolchain (MPLAB X IDE + XC8 compiler + PICkit programmer) keeps development costs low. Designers favor this MCU when they need ADC, PWM, and serial I/O in a single 40-pin footprint.

When designing with the PIC16F871-E/P, place decoupling capacitors (100 nF ceramic plus 10 uF bulk) within 5 mm of the VDD pins, use a 4.7 kΩ pull-up on MCLR if not driven by a debug tool, and observe the 4.0 V minimum VDD - operation below this rail causes EEPROM write failure and unreliable ADC readings.

This page synthesizes Microchip datasheet specifications, distributor pricing snapshots, and a focused set of drop-in PIC16F871 alternatives not always surfaced on DigiKey or Mouser product pages, helping engineers verify pin compatibility and parametric proximity before committing to a substitution.

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

此系列的變體

與下列產品可直接替換的同系列型號: PIC16F871-E/P (相同外形與佔位) — 差異在於 Mounting Type, I/O Pins, In-Circuit Debug, Package, Self-Programming.

Microchip Technology
Mounting Type: Through-Hole (THT)
I/O Pins: 16
Package: 18-pin PDIP
Microchip Technology
Mounting Type: Surface Mount (Socketable PLCC)
I/O Pins: 33 (maximum)
In-Circuit Debug: Yes (ICD)
Microchip Technology
Mounting Type: Through-Hole (DIP)
I/O Pins: 33
In-Circuit Debug: ICD supported

PIC16F870-E/P

✅ 直接替換
📦 40-pin PDIP
2 KB Flash vs 3.5 KB (-43%) and 128 B RAM vs 192 B (-33%); pinout, ADC, USART, timers identical

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

PIC16F872-E/P

✅ 直接替換
📦 40-pin PDIP
4 KB Flash (+14%) and 192 B RAM; pinout and peripherals identical, firmware map change required

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

PIC16F871-E/L

✅ 直接替換
Microchip Technology
📦 40-pin PDIP-equivalent (LCC-44 adapter)
PIC16 (8-bit RISC, 14-bit instruction word) · 35 single-word instructions · 20 MHz · 200 ns (at 20 MHz) · 3.5 KB (2K x 14) · 128 bytes · 64 bytes · 10-bit, 8 channels

聯絡詢價

查看資料表 →

PIC16F871-I/P

✅ 直接替換
Microchip Technology
📦 40-pin PDIP
PIC16 8-bit RISC · 35 single-word instructions · 20 MHz (200 ns instruction cycle) · 3.5 KB (2K x 14) · 128 bytes · 64 bytes · 33 · 8 channels x 10-bit

聯絡詢價

查看資料表 →

PIC16F873A-I/P

✅ 直接替換
📦 40-pin PDIP
7.2 KB Flash (+106%) and 192 B RAM; adds I2C/SPI peripherals; same 40-pin PDIP pinout and 5 V supply

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

PIC16F876A-I/P

✅ 直接替換
📦 28-pin PDIP
28-pin PDIP vs 40-pin PDIP; smaller footprint but not pin-to-pin on 40-pin boards; included as documented DIP-family drop-in within the PIC16F87x line

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

PIC16F871-E/P 最大額定值與電氣特性

Core Processor PIC
Core Size 8-bit
Program Memory Type Flash
Program Memory Size 3.5 KB (3.5K x 14)
RAM Size 192 bytes
EEPROM Size 64 bytes
Maximum Clock Speed 20 MHz
Instruction Cycle 200 ns
Supply Voltage (VDD) 4.0 V to 5.5 V
工作溫度 -40C to +125C
封裝 / 外殼 40-DIP (0.600", 15.24 mm)
Number of I/O Pins 33
ADC 8 channels x 10-bit
Timers 2 x 8-bit + 1 x 16-bit (with capture/compare/PWM)
Communication Interfaces USART
In-Circuit Debug ICD
Self-Programming Yes (Flash)
安裝類型 Through-Hole (PDIP)

PIC16F871-E/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 — Master Clear (reset) input, active low
腳位 2 RA0/AN0 — PORTA bit 0 / ADC channel 0
腳位 3 RA1/AN1 — PORTA bit 1 / ADC channel 1
腳位 4 RA2/AN2 — PORTA bit 2 / ADC channel 2
腳位 5 RA3/AN3/VREF+ — PORTA bit 3 / ADC channel 3 / ADC positive reference
腳位 6 RA4/AN4 — PORTA bit 4 / ADC channel 4
腳位 7 RA5/AN5/SS — PORTA bit 5 / ADC channel 5 / SPI slave select
腳位 8 RE0/RD/AN5 — PORTE bit 0 / parallel-port read / ADC channel 5 alt
腳位 9 RE1/WR/AN6 — PORTE bit 1 / parallel-port write / ADC channel 6
腳位 10 RE2/CS/AN7 — PORTE bit 2 / parallel-port chip select / ADC channel 7
腳位 11 VDD — Positive supply (4.0 V to 5.5 V)
腳位 12 VSS — Ground reference
腳位 13 OSC1/CLKI — Oscillator crystal input / external clock input
腳位 14 OSC2/CLKO — Oscillator crystal output / clock output
腳位 15 RC0/T1OSO — PORTC bit 0 / Timer1 oscillator output
腳位 16 RC1/T1OSI — PORTC bit 1 / Timer1 oscillator input
腳位 17 RC2/CCP1 — PORTC bit 2 / Capture-Compare-PWM 1
腳位 18 RC3 — PORTC bit 3
腳位 19 RD0 — PORTD bit 0
腳位 20 RD1 — PORTD bit 1
腳位 21 RD2 — PORTD bit 2
腳位 22 RD3 — PORTD bit 3
腳位 23 RC4 — PORTC bit 4
腳位 24 RC5 — PORTC bit 5
腳位 25 RC6/TX/CK — PORTC bit 6 / USART TX / clock
腳位 26 RC7/RX/DT — PORTC bit 7 / USART RX / data
腳位 27 RD4 — PORTD bit 4
腳位 28 RD5 — PORTD bit 5
腳位 29 RD6 — PORTD bit 6
腳位 30 RD7 — PORTD bit 7
腳位 31 VSS — Ground reference
腳位 32 VDD — Positive supply (4.0 V to 5.5 V)
腳位 33 RB0/INT — PORTB bit 0 / external interrupt
腳位 34 RB1 — PORTB bit 1
腳位 35 RB2 — PORTB bit 2
腳位 36 RB3/PGM — PORTB bit 3 / low-voltage programming
腳位 37 RB4 — PORTB bit 4
腳位 38 RB5 — PORTB bit 5
腳位 39 RB6/PGC — PORTB bit 6 / ICSP clock
腳位 40 RB7/PGD — PORTB bit 7 / ICSP data

典型應用

PIC16F871-E/P 適用於 6 應用s: Industrial Control Panels, Appliance Motor Controllers, HVAC Thermostat Interface, Instrumentation Front-Ends, Educational Microcontroller Kits, Sensor Hub / Data Logger.

🏭

Industrial Control Panels

The PIC16F871-E/P fits industrial control panels because its 8-channel 10-bit ADC can read multiple sensor inputs (temperature, pressure, current) while its USART drives a local HMI or Modbus link. The -40C to +125C extended temperature grade handles factory-floor thermal swings, and the 40-pin PDIP package is friendly to hand-soldered prototypes and field-repair workflows.

⚡

Appliance Motor Controllers

In appliance motor controllers the PIC16F871-E/P's 16-bit timer with capture/compare/PWM drives FET gate signals for brushed and small BLDC motors, while the ADC monitors back-EMF and current. The 5 V supply rail aligns with typical appliance power trees and the 200 ns instruction cycle is fast enough for commutation loops under 10 kHz.

🏭

HVAC Thermostat Interface

Thermostat designs benefit from the PIC16F871-E/P's 8-channel ADC reading thermistor or RTD sensors, USART driving a Wi-Fi/Ethernet co-processor, and PWM dimming a backlight or buzzer. nanoWatt sleep modes drop standby current for battery-backed thermostats and the 40-pin PDIP simplifies through-hole assembly for high-volume HVAC OEMs.

🔧

Instrumentation Front-Ends

Bench and field instruments use the PIC16F871-E/P to digitize analog front-end signals through its 10-bit ADC and forward calibration data over USART to a host PC. The ICD interface lets engineers step through acquisition code without removing the chip, and the extended temperature range keeps the part stable inside enclosure enclosures without active cooling.

📱

Educational Microcontroller Kits

Universities and self-learners favor the PIC16F871-E/P because the 40-pin PDIP seats in any breadboard and pairs with low-cost PICkit programmers. MPLAB X IDE + XC8 compiler are free, the PIC16 instruction set has only 35 single-word opcodes, and the 8-channel ADC plus PWM give students enough peripherals for real lab projects without overwhelming beginners.

🧩

Sensor Hub / Data Logger

Low-cost data loggers route multiple analog channels into the PIC16F871-E/P's 10-bit ADC and store calibration plus timestamps in the 64-byte EEPROM. The USART streams captured data to a host, and self-programming enables firmware updates in the field without an external bootloader. The 40-pin PDIP makes it serviceable in remote installations.

推薦產品摘要

PIC16F872-E/P same-pin upgrade with 4 KB Flash 用於: Industrial Control Panels MCP2551 CAN transceiver for industrial networking 用於: Industrial Control Panels PIC16F873A-I/P more Flash for advanced motor algorithms 用於: Appliance Motor Controllers IRFZ44N N-channel MOSFET for H-bridge drive 用於: Appliance Motor Controllers MCP9700 analog temperature sensor feeding ADC 用於: HVAC Thermostat Interface PIC16F870-E/P cost-reduced variant for simpler thermostats 用於: HVAC Thermostat Interface MCP6002 low-offset op-amp for ADC signal conditioning 用於: Instrumentation Front-Ends MAX232 RS-232 line driver for serial comms 用於: Instrumentation Front-Ends PICkit 3 programmer/debugger for development 用於: Educational Microcontroller Kits PIC16F84A-20/P Microchip Technology 用於: Educational Microcontroller Kits 24LC256 external I2C EEPROM for extended logging 用於: Sensor Hub / Data Logger DS1307 real-time clock for timestamping 用於: Sensor Hub / Data Logger
What is the program memory size of the PIC16F871-E/P?
The PIC16F871-E/P contains 3.5 KB (3,584 bytes) of Flash program memory organized as 3.5K x 14-bit words. According to the Microchip datasheet, this is sufficient for applications running compiled XC8 C code up to roughly 2,500 lines or a comparable PIC assembly workload, while leaving room for boot and calibration constants.
What is the operating voltage range of the PIC16F871-E/P?
The PIC16F871-E/P operates from 4.0 V to 5.5 V on VDD. Operating below 4.0 V is not supported - the on-chip ADC and EEPROM write circuits require at least 4.0 V for rated accuracy. This makes the part suitable for 5 V regulated industrial and appliance rails but not for direct 3.3 V battery-powered designs.
Does the PIC16F871-E/P have an ADC?
Yes, the PIC16F871-E/P integrates an 8-channel, 10-bit Analog-to-Digital converter with sample-and-hold. Channels share pins with PORTA and PORTE and support both single-ended and differential conversion modes, sufficient for typical sensor-interface applications such as thermistor, potentiometer, and current-sense readout.
Where can I download the PIC16F871-E/P datasheet PDF?
The PIC16F871-E/P datasheet is available from Microchip's product page at https://www.microchip.com/en-us/product/PIC16F871 and the direct PDF link is https://ww1.microchip.com/downloads/en/DeviceDoc/30286E.pdf. Microchip registration is not required to download the file, and an errata document covers known silicon revisions.
What is the pinout of the PIC16F871-E/P?
The PIC16F871-E/P uses a 40-pin PDIP where RA0-RA5, RB0-RB7, RC0-RC7, RD0-RD7, and RE0-RE2 are general-purpose I/O, with MCLR, VDD, VSS, OSC1/OSC2, AVss/AVdd and AREF dedicated. Pin 1 is MCLR and pins are numbered counter-clockwise with the notch up - the standard DIP convention.
How much does the PIC16F871-E/P cost and where can I buy it?
The PIC16F871-E/P is priced at approximately $3.76 per unit at qty 1 as of 2026-09-21, with bulk discounts down to roughly $2.25 at qty 1000. Stock is available from Microchip direct and major distributors including Heisener, LCSC, and Win Source; lead time for larger reels is generally 4-8 weeks.
Is the PIC16F871-E/P in stock at distributors?
Stock at Heisener as of 2026-09-21 is approximately 5,184 units, with lead time to be confirmed; LCSC reports in-stock status from $1.53. Multi-source through Microchip direct is typical for this mature PIC16 device, and confirmed-stocked inventory is listed on Octopart's 7-distributor panel.
What is the lead time for the PIC16F871-E/P?
Heisener's estimated delivery time as of 2026-09-21 is May 7 to May 12 (window shown on the listing), and standard Microchip-direct lead times for the -E/P (extended temperature) variant are 4-8 weeks when factory orders are required. Expedited shipping is offered but at premium pricing.
PIC16F871-E/P vs PIC16F870 - which is better for a 5 V ADC design?
The PIC16F871 has 3.5 KB Flash, 192 B RAM and 64 B EEPROM, while the PIC16F870 has 2.0 KB Flash, 128 B RAM and 64 B EEPROM; both share the same 40-pin PDIP footprint and 10-bit ADC. For 5 V ADC designs the PIC16F871 is preferable when you need extra code space for protocol stacks; the PIC16F870 suffices for simpler control loops.
Can PIC16F870 replace PIC16F871 in an existing PCB design?
Yes - both the PIC16F870 and PIC16F871 share the same 40-pin PDIP pinout, pin function map, and oscillator requirements, so a PIC16F870 will drop onto a PIC16F871 PCB footprint. The only practical difference is reduced Flash (2 KB vs 3.5 KB) and RAM (128 B vs 192 B); firmware must be recompiled for the smaller memory map.
When should I choose PIC16F871-E/P over PIC16F88-I/P?
Choose the PIC16F871-E/P when your application needs a 40-pin DIP with 8-channel 10-bit ADC plus USART at 5 V. The PIC16F88-I/P exposes only 18 pins and targets smaller designs. If your board has only 28 or fewer I/O requirements, the PIC16F88 saves PCB area; otherwise, the PIC16F871's wider bus and additional ADC channels make it the better choice.
What is the best drop-in replacement for the PIC16F871-E/P?
The best drop-in replacement is the PIC16F870-E/P, which shares the identical 40-pin PDIP footprint, pin function map, and 5 V supply range. Flash drops from 3.5 KB to 2 KB and RAM from 192 B to 128 B, but core peripherals (10-bit ADC, USART, timers, PWM) are identical and firmware recompiles cleanly with no PCB rework required.
Is there a Microchip PIC equivalent to PIC16F871 with more memory?
Yes - the PIC16F872-E/P offers 4 KB Flash and 192 B RAM in the same 40-pin PDIP and is firmware-source-compatible with the PIC16F871, requiring only a memory-map adjustment in the linker script. For significantly more memory and peripherals in a compatible footprint, the PIC18F4520 is widely regarded as the migration path within Microchip's 8-bit family.
What are the key specifications engineers should know about PIC16F871-E/P?
Engineers should know: 8-bit PIC core at 20 MHz (200 ns instruction cycle); 3.5 KB Flash / 192 B RAM / 64 B EEPROM; 4.0 V to 5.5 V single supply; 8-channel 10-bit ADC; one USART; two 8-bit timers plus one 16-bit timer with capture/compare/PWM; 33 digital I/O pins; in-circuit debugger and self-programming; -40C to +125C extended temperature grade in a 40-pin PDIP.

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

選型指南

Choose the PIC16F871-E/P when your design needs a 40-pin DIP 8-bit MCU with 3.5 KB Flash, 8-channel 10-bit ADC, USART, and PWM at 5 V in an extended -40C to +125C temperature grade. Pick the PIC16F870-E/P instead if you can fit your firmware in 2 KB and want the lowest unit cost. Pick the PIC16F872-E/P when you need 4 KB Flash without changing PCB layout. Choose the PIC16F871-I/P if your environment never exceeds +85C and you want maximum distributor availability. For designs that need significantly more memory or peripherals in a footprint-compatible upgrade, migrate to PIC16F873A-I/P (7.2 KB Flash, 2 PWM channels) or jump to PIC18F4520 for a long-term architectural upgrade path.

與替代品比較

參數 本產品 PIC16F870-E/P PIC16F872-E/P PIC16F871-E/L PIC16F871-I/P PIC16F873A-I/P
Package 40-pin PDIP 40-pin PDIP (same) 40-pin PDIP (same) 44-pin PLCC (adapter needed) 40-pin PDIP (same) 40-pin PDIP (same)
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Program Memory (Flash) 3.5 KB 2 KB 4 KB 3.5 KB 3.5 KB 7.2 KB
RAM 192 bytes 128 bytes 192 bytes 192 bytes 192 bytes 192 bytes
EEPROM 64 bytes 64 bytes 64 bytes 64 bytes 64 bytes 256 bytes
Max Clock Speed 20 MHz 20 MHz 20 MHz 20 MHz 20 MHz 20 MHz
Operating Temperature -40C to +125C (Extended) -40C to +125C (Extended) -40C to +125C (Extended) -40C to +125C (Extended) -40C to +85C (Industrial) -40C to +85C (Industrial)
ADC Channels 8 x 10-bit 8 x 10-bit 8 x 10-bit 8 x 10-bit 8 x 10-bit 5 x 10-bit
PWM Outputs 1 (CCP1) 1 (CCP1) 1 (CCP1) 1 (CCP1) 1 (CCP1) 2 (CCP1+CCP2)

主要差異化特點

  • Higher Flash density than PIC16F870 in identical 40-pin PDIP package (對比PIC16F870-E/P)
  • More I/O and ADC channels than PIC16F873A's reduced-pin variants (對比PIC16F873A-I/P)
  • Lower cost than PIC16F872 for cost-sensitive designs (對比PIC16F872-E/P)
  • Extended -40C to +125C temperature grade vs industrial -40C to +85C (對比PIC16F871-I/P)

設計說明

Place a 100 nF ceramic decoupling capacitor within 5 mm of every VDD pin (pins 11 and 32) and a single 10 uF bulk tantalum or aluminum electrolytic on the supply rail. The PIC16F871-E/P switches internal digital blocks at up to 20 MHz; without local bypassing the VDD rail can sag 50-100 mV during ADC conversions, degrading 10-bit accuracy by 1-2 LSB.

MCLR must be pulled high through a 4.7 kΩ resistor for normal operation - leaving MCLR floating can cause intermittent resets or, when driving the ICSP debugger, prevent connection. When using ICD debugging, route the PGC (RB6) and PGD (RB7) lines away from high-current switching nodes; capacitive loading above 30 pF on these pins can break the ICSP clock.

Route the analog AVdd/AVss rails as a star from a single point at the regulator, and keep ADC traces (RA0-RA5, RE0-RE2) short and guarded by digital ground. For AREF use a 0.1 uF + 10 uF RC filter rather than driving AREF from a noisy source - the 10-bit ADC dynamic range depends on a clean reference.

Estimated: at 20 MHz, 5 V, and 100% CPU duty, ICC is approximately 15-20 mA, dissipating 75-100 mW in the PIC16F871-E/P. With theta_JA around 50 C/W for a 40-pin PDIP, the junction rise is only 4-5 C above ambient - well within the 125 C limit and rarely a concern at this clock/power profile.

合規資訊

RoHS
Compliant
REACH
Compliant
AEC-Q100
Not Applicable
無鉛
Yes
無鹵
[Data Needed: Halogen-Free Status]
衝突礦產
Compliant

RoHS and REACH compliance inferred from Microchip's standard product labeling for PIC16Fxxx PDIP parts; specific test certificates are available on Microchip's product page.

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

相關搜尋

PIC16F871-E/P PIC16F871 datasheet Microchip PIC16F871 8-bit MCU 3.5KB Flash 40-pin PDIP PIC16F871-E/P pinout PIC16F871 industrial ADC application PIC16F871 vs PIC16F870 PIC16F871 drop-in replacement PIC16F871-E/P buy price what is the ADC resolution of PIC16F871 PIC16F871 40-pin DIP microcontroller PIC16F871-E/P stock distributor

相關元件與詞彙

Microchip Technology PIC16F871 PIC16F871-E/P PIC16F870-E/P PIC16F872-E/P PIC16F871-I/P PIC16F873A-I/P PIC16F876A-I PIC16 PIC16F87x PIC microcontroller 8-bit MCU Harvard architecture RISC Flash memory EEPROM 10-bit ADC USART PWM ICD ICSP nanoWatt Technology PDIP-40 DIP through-hole RoHS REACH MPLAB X IDE XC8 compiler PICkit industrial control HVAC appliance controller data logger sensor hub instrumentation educational microcontroller
快速報價 RFQ
請填寫完整詳細資料 — 我們的業務團隊將於 24 小時內回覆
料號 製造商 封裝 QTY 目標價格 小計
✓
報價已提交!

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

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