PIC16F872-E/SP - 8-bit Flash MCU, 3.5KB, 28-Pin SPDIP | Microchip
MPN: PIC16F872-E/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $5.06 | $5.06 |
| 10 | $4.55 | $45.50 |
| 100 | $3.92 | $392.00 |
| 500 | $3.4 | $1,700.00 |
| 1,000 | $2.95 | $2,950.00 |
PIC16F872-E/SP Overview
A microcontroller (MCU) is a single-chip computer containing a processor core, non-volatile program memory, volatile data memory, and configurable peripherals on one integrated circuit. PIC16 mid-range microcontrollers sit in the hierarchy: PIC16F872 -> PIC16 mid-range family -> 8-bit MCU -> microcontroller -> embedded processor -> semiconductor. PIC MCUs use a Harvard RISC architecture with separate program and data buses, enabling one instruction per clock cycle and deterministic interrupt latency.
Key specifications of the PIC16F872-E/SP include a 4.0V to 5.5V supply voltage range, 16 I/O ports (per chipdig listing), 5 channels of 10-bit ADC, 22 I/O, integrated ICD (In-Circuit Debugger) support, and self-programming capability. The "E" suffix designates an industrial temperature grade of -40 to +125 C, while the "/SP" suffix indicates the 28-pin SPDIP package. The device is part of Microchip's PIC16F87x family and is pin-compatible with siblings such as the PIC16F871, PIC16F870, PIC16F873A, and PIC16F876A across the 28-pin footprint.
Typical applications for the PIC16F872-E/SP include industrial control nodes, sensor interface boards, simple motor control loops using the CCP PWM, home appliance controllers, and educational/development boards where the integrated ICD eliminates the need for an external debugger. The device's 22 I/O and 5 ADC channels comfortably support multi-sensor data acquisition designs.
When designing with this MCU, note that PIC16F872 has been superseded by the PIC16F882 (with nanoWatt technology and extended peripherals) but remains widely available through distribution as a long-life-cycle part. Pin-compatible migration to PIC16F873A or PIC16F876A adds more memory and PWM channels on the same 28-pin SPDIP footprint.
This page synthesizes distributor pricing, drop-in pin-compatible alternatives (PIC16F871, PIC16F870, PIC16F873A, PIC16F882), and practical design notes not consolidated on the manufacturer product page alone.
Drop-in alternatives for PIC16F872-E/SP — same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Variants in this series
Same-series models that are drop-in compatible with PIC16F872-E/SP (same form factor and footprint) — differing in Core Architecture, In-Circuit Debug, Program Memory (Flash), Self-Programming, Timers.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F871-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F870-I/SP
✅ Drop-In✓ In Stock
$2.18 / Unit
View Datasheet →PIC16F873A-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F876A-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F882-I/SP
✅ Drop-In✓ In Stock
$1.45 / Unit
View Datasheet →PIC16F883-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F886-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F872-E/SP Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16 mid-range 8-bit RISC (Harvard) |
| Instruction Set | 35 single-word instructions |
| Program Memory (Flash) | 3.5 KB |
| Data SRAM | 128 bytes |
| Data EEPROM | 64 bytes |
| Maximum Clock Speed | 20 MHz |
| Instruction Cycle Time | 200 ns at 20 MHz |
| Supply Voltage (Vdd) | 4.0 V to 5.5 V |
| Digital I/O Pins | 22 (16 per chipdig listing) |
| ADC Channels | 5 channels, 10-bit resolution |
| Timers | 3 (Timer0, Timer1, Timer2) |
| CCP Modules | Capture/Compare/PWM |
| Serial Communication | SSP (configurable as SPI or I2C) |
| In-Circuit Debug | Yes (ICD) |
| Self-Programming | Yes |
| Operating Temperature | -40 C to +125 C (E suffix = industrial) |
| Package | 28-pin SPDIP (Skinny Plastic DIP, 0.300") |
| Mounting Type | Through-Hole (THT) |
| RoHS Status | Compliant |
PIC16F872-E/SP Pin Configuration
| Pin 1 | MCLR/Vpp — Master Clear (reset) / programming voltage input |
| Pin 2 | RA0/AN0 — Digital I/O / analog input channel 0 |
| Pin 3 | RA1/AN1 — Digital I/O / analog input channel 1 |
| Pin 4 | RA2/AN2 — Digital I/O / analog input channel 2 |
| Pin 5 | RA3/AN3/Vref+ — Digital I/O / analog input 3 / ADC positive reference |
| Pin 6 | RA4/T0CKI — Digital I/O / Timer0 clock input |
| Pin 7 | RA5/AN4/SS — Digital I/O / analog input 4 / SPI slave select |
| Pin 8 | Vss — Ground |
| Pin 9 | OSC1/CLKIN — Crystal/oscillator input / external clock input |
| Pin 10 | OSC2/CLKOUT — Crystal/oscillator output / clock output |
| Pin 11 | RC0/T1OSO/T1CKI — Digital I/O / Timer1 oscillator output / Timer1 clock input |
| Pin 12 | RC1/T1OSI/CCP2 — Digital I/O / Timer1 oscillator input / CCP2 |
| Pin 13 | RC2/CCP1 — Digital I/O / CCP1 PWM output |
| Pin 14 | RC3/SCK/SCL — Digital I/O / SPI clock / I2C clock |
| Pin 15 | RC4/SDI/SDA — Digital I/O / SPI data in / I2C data |
| Pin 16 | RC5/SDO — Digital I/O / SPI data out |
| Pin 17 | RC6/TX/CK — Digital I/O / USART TX / USART clock |
| Pin 18 | RC7/RX/DT — Digital I/O / USART RX / USART data |
| Pin 19 | Vss — Ground |
| Pin 20 | Vdd — Positive supply voltage |
| Pin 21 | RB0/INT — Digital I/O / external interrupt |
| Pin 22 | RB1 — Digital I/O |
| Pin 23 | RB2 — Digital I/O |
| Pin 24 | RB3/PGM — Digital I/O / low-voltage programming |
| Pin 25 | RB4 — Digital I/O |
| Pin 26 | RB5 — Digital I/O |
| Pin 27 | RB6/PGC — Digital I/O / ICD clock |
| Pin 28 | RB7/PGD — Digital I/O / ICD data |
Typical Applications
PIC16F872-E/SP is suitable for 7 applications: Industrial Sensor Interface Board, Home Appliance Control Board, Educational Microcontroller Trainer Board, Simple DC Motor Speed Controller, LED Lighting Driver and Dimmer, Battery-Powered Remote Sensor Node, Automotive Interior Accessory Controller.
Industrial Sensor Interface Board
The PIC16F872-E/SP is well-matched to industrial sensor interface boards because its 5-channel 10-bit ADC, 22 I/O pins, and SSP-configurable I2C port enable simultaneous connection of multiple analog sensors (temperature, pressure, flow) and I2C peripherals (digital sensors, EEPROM expanders). The 20 MHz clock supports sampling rates up to ~50 kS/s aggregate without DMA, and the 64-byte EEPROM retains calibration constants across power cycles. Its -40 to +125 C industrial temperature range (the 'E' suffix) supports factory-floor environments per Microchip datasheet DS30221C. The integrated ICD allows in-system firmware updates without removing the board from the chassis.
Recommended
Home Appliance Control Board
For washing-machine control boards, dishwasher timers, and HVAC zone controllers, the PIC16F872-E/SP's combination of 3.5 KB Flash, 22 I/O, and integrated CCP PWM modules drives triac-based AC loads and indicator LEDs while monitoring user inputs. The SSP port interfaces to LCD displays or user keypads via SPI. Compared to a PIC16F870, the EEPROM memory in the PIC16F872 stores user preferences (wash cycle, temperature, delay-start) across power cycles, a feature consumers expect. The 28-pin SPDIP package remains in production because through-hole designs are easier to service in white-goods repair shops.
Recommended
Educational Microcontroller Trainer Board
The PIC16F872-E/SP is popular in university electronics courses and PIC training kits because the integrated ICD eliminates the need for an external debug header and the 35-instruction RISC architecture keeps assembly-language teaching tractable. Coursework demonstrates ADC sampling of potentiometers, PWM generation for motor speed control, and SPI/I2C communication between MCUs. The 28-pin SPDIP package fits standard 0.300" IC sockets, simplifying repeated insertion in lab trainers. Self-programming via the ICD supports student firmware download without external programmers.
Recommended
Simple DC Motor Speed Controller
Using the PIC16F872-E/SP's CCP module in PWM mode, hobbyist and light-industrial DC motor controllers generate variable-duty-cycle drive signals for H-bridge power stages. The 5-channel 10-bit ADC reads speed-potentiometer, current-sense amplifier, and tachometer feedback for closed-loop control. The 22 I/O drives direction-control relays, brake, and fault LEDs alongside the PWM output. Firmware running at 20 MHz implements PID control at 1 kHz loop rates without CPU loading. The through-hole SPDIP package suits retrofits to existing through-hole motor-driver boards.
Recommended
LED Lighting Driver and Dimmer
Architectural LED dimmers and RGB color controllers benefit from the PIC16F872-E/SP's three timers, which independently drive multiple PWM channels for red/green/blue LED brightness, while the ADC reads rotary encoders or 0-10V analog dim inputs. The 22 I/O supports DMX-512 receive or DALI communication via the USART/SSP, enabling professional lighting-control protocols. The 64-byte EEPROM stores scene presets, and self-programming permits field firmware updates via bootloaders. Industrial -40 to +125 C operation covers outdoor architectural installations.
Recommended
Battery-Powered Remote Sensor Node
Although the PIC16F872 is not the lowest-power PIC option, its 22 I/O and 5 ADC channels let a single MCU monitor multiple sensors (temperature, humidity, vibration) in a remote node where the SSP/I2C connects to a radio module or local display. Sleep current on the PIC16F872 is higher than the nanoWatt PIC16F882, but at >20 MHz active processing, total energy per measurement cycle remains competitive when duty-cycled. The 28-pin SPDIP package is preferred over SMD for hand-soldered prototype nodes.
Recommended
Automotive Interior Accessory Controller
The PIC16F872-E/SP industrial temperature grade and its through-hole SPDIP package support aftermarket automotive accessories such as seat-heater controllers, ambient lighting modules, and aftermarket gauge drivers. The 5 ADC channels monitor potentiometers and thermistor inputs; the CCP PWM drives MOSFET gate signals for load control; and the SSP/I2C connects to I2C LED drivers. Pin compatibility with PIC16F873A and PIC16F882 enables feature upgrades without PCB rework, although for OEM automotive designs AEC-Q100-qualified variants are recommended.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F872-E/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F871-I/SP | PIC16F870-I/SP | PIC16F873A-I/SP | PIC16F882-I/SP |
|---|---|---|---|---|---|
| Package | SPDIP-28 (0.300") | SPDIP-28 (same) | SPDIP-28 (same) | SPDIP-28 (same) | SPDIP-28 (same) |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Program Memory | 3.5 KB | 7 KB | 3.5 KB | 7 KB | 3.5 KB |
| Data SRAM | 128 bytes | 128 bytes | 128 bytes | 192 bytes | 128 bytes |
| Data EEPROM | 64 bytes | 64 bytes | None | 128 bytes | 128 bytes |
| Maximum Clock Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| ADC Channels | 5 x 10-bit | 8 x 10-bit | 5 x 10-bit | 5 x 10-bit | 11 x 10-bit |
| Supply 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 | 2.0 V to 5.5 V |
| nanoWatt Technology | No | No | No | No | Yes |
Key Differentiators
- Integrated EEPROM data memory (vs PIC16F870-I/SP)
- Self-programming and ICD support (vs PIC16F873A-I/SP)
- SSP (SPI/I2C) peripheral integration (vs PIC16F870-I/SP)
- Pin-compatible upgrade path to nanoWatt family (vs PIC16F882-I/SP)
Design Notes
The PIC16F872-E/SP operates from a single 4.0V to 5.5V supply. Decouple Vdd with a 100 nF ceramic capacitor placed within 5 mm of pin 20 and a bulk 10 uF tantalum or aluminum at the supply entry point. For designs migrating to PIC16F882 or PIC16F883, the supply can drop to 2.0V - decoupling values remain unchanged. Brown-out reset is recommended in noisy industrial supply environments; use the internal BOR or external supervisor (e.g. MCP100) per Microchip datasheet DS30221C section 14.
Place the 20 MHz crystal or resonator within 5 mm of pins 9 (OSC1) and 10 (OSC2), with the load capacitors (typically 15-33 pF) grounded to a single low-noise Vss island near the MCU. Keep clock traces short and avoid routing them parallel to switching signals. For ICD, route PGC (RB6) and PGD (RB7) to a 6-pin header with MCLR/Vpp, Vdd, Vss, and RB7 to enable in-circuit programming without removing the chip.
Ensure the MCLR pin (pin 1) has a proper pull-up (10 kohm) to Vdd; floating MCLR causes erratic resets. Do not exceed 5.5V on any I/O pin - the absolute maximum is Vss - 0.3V to Vdd + 0.3V. When using the ADC, allow at least 20 us acquisition time (Tad) per channel; configure the A/D clock prescaler to comply with the minimum TAD of 1.6 us. The I2C SSP requires external pull-ups on SDA/SCL (typically 4.7 kohm at 100 kHz, 2.2 kohm at 400 kHz) - the PIC16F872's I/O are open-drain.
Keep the analog AVdd path separate from digital Vdd traces; if the PIC16F872 shares a single Vdd pin, place a ferrite bead or small inductor between digital Vdd and AVdd with a 100 nF decoupling cap on the AVdd side. Route analog input traces (AN0-AN4) away from switching nodes such as PWM outputs or oscillator traces to prevent ADC noise coupling. Use a ground plane beneath the MCU for low-impedance return.
Compliance Information
RoHS compliant per Microchip product page. Industrial temperature grade (-40 C to +125 C) - the E suffix. Not AEC-Q100 qualified; for automotive applications use PIC16F872-E/SP only in non-safety-critical aftermarket contexts or choose AEC-Q100-qualified parts.