PIC16F873-04E/SO - 8-bit Flash MCU, 7KB, 22 I/O, SOIC-28 | Microchip
MPN: PIC16F873-04E/SO β End of Life| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $6.0493 | $6.05 |
| 10 | $5.44 | $54.40 |
| 100 | $4.84 | $484.00 |
| 500 | $4.29 | $2,145.00 |
| 1,000 | $3.81 | $3,810.00 |
PIC16F873-04E/SO Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, program memory, data memory, and peripheral interfaces. The PIC16F87X family occupies the mid-range tier of Microchip's 8-bit PIC portfolio, sitting between the baseline PIC10/12/16 families and the high-performance PIC18 enhanced family. Flash-based MCUs like this one allow in-circuit re-programming, making them suitable for prototyping and field-upgradeable products. Within the system hierarchy, this part is classified as an 8-bit CISC-style RISC MCU in the embedded controller segment of the semiconductor market.
Key features include a 10-bit Analog-to-Digital Converter (ADC) with up to 8 channels, a USART module for serial communication, an MSSP (Master Synchronous Serial Port) supporting SPI and I2C, two 8-bit timers plus one 16-bit timer, and a watchdog timer with its own on-chip RC oscillator. The nanoWatt Technology features deliver multiple power-managed modes including SLEEP, with typical sleep currents in the microamp range.
Architecturally, the part uses a Harvard bus topology with separate program and data paths, allowing instruction fetch and data access to occur in the same cycle. The 14-bit instruction word packs more capability per opcode than 12-bit baseline parts, but the register set remains compatible with the broader PIC16 mid-range ecosystem for code portability. Brown-out Reset (BOR), Power-on Reset (POR), and the programmable code-protection bitstream are standard on-die features.
Typical applications include industrial sensor nodes, white-goods control boards, low-cost motor controllers, smart meters, automotive body modules (with the -I or -04 extended variants), and standalone peripherals requiring serial bridge functionality. The wide SOIC-28 footprint simplifies hand-soldering and rework for prototype builds.
Design consideration: when migrating between PIC16F873/874/876/877 variants, remember that this -04 part is rated at 4 MHz / 200 ns minimum instruction cycle; for 20 MHz operation, choose the -20 (PIC16F873-20) variant. The 28-pin SOIC package has a thermal resistance theta_JA of approximately 80 C/W which limits continuous dissipation - keep clock-stretched idle states short in thermally enclosed enclosures.
Drop-in alternatives for PIC16F873-04E/SO β 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 PIC16F873-04E/SO (same form factor and footprint) β differing in Core Architecture, Package, Mounting Type, Timers, ADC.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F873-04I/SO
β Drop-Inπ Reference alternative (not in catalog)
PIC16F873T-04E/SO
β Drop-Inβ In Stock
$4.85 / Unit
View Datasheet βPIC16F876-04E/SO
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
PIC16F873-04E/SO Maximum Ratings & Electrical Characteristics
| Family | PIC16F Mid-Range 8-bit |
| Core Architecture | PIC RISC (Harvard) |
| Program Memory Type | Flash |
| Program Memory Size | 7 KB (4K x 14 words) |
| RAM | 192 bytes |
| EEPROM Data Memory | 128 bytes |
| Maximum Clock Frequency | 4 MHz (200 ns instruction cycle) |
| Supply Voltage (Vdd) | 4.0 V to 5.5 V |
| I/O Pins | 22 |
| ADC | 10-bit, up to 5 channels |
| Timers | 2 x 8-bit + 1 x 16-bit |
| Communication Interfaces | USART, MSSP (SPI/I2C) |
| Operating Temperature Range | -40C to +125C (Extended, "E" suffix) |
| Package | 28-pin SOIC (SO), wide-body 0.295 inch (7.50 mm) |
| Mounting Type | Surface Mount |
| Instruction Set | 35 single-word instructions |
| Watchdog Timer | Yes (with dedicated on-chip RC oscillator) |
| Power-Saving Modes | SLEEP and nanoWatt Technology modes |
| RoHS Status | Compliant |
PIC16F873-04E/SO Pin Configuration
| Pin 1 | MCLR/VPP/RE3 β Master Clear (reset) input / Programming voltage / PORTE bit 3 |
| Pin 2 | RA0/AN0 β PORTA bit 0 / Analog input channel 0 |
| Pin 3 | RA1/AN1 β PORTA bit 1 / Analog input channel 1 |
| Pin 4 | RA2/AN2/CVREF β PORTA bit 2 / Analog input channel 2 / Comparator voltage reference output |
| Pin 5 | RA3/AN3/VREF+ β PORTA bit 3 / Analog input channel 3 / ADC positive voltage reference |
| Pin 6 | RA4/T0CKI/C1OUT β PORTA bit 4 / Timer0 clock input / Comparator 1 output |
| Pin 7 | RA5/AN4/SS/C2OUT β PORTA bit 5 / Analog input channel 4 / SPI slave select / Comparator 2 output |
| Pin 8 | VSS β Ground reference |
| Pin 9 | OSC1/CLKIN β Oscillator crystal input / External clock input |
| Pin 10 | OSC2/CLKOUT β Oscillator crystal output / External clock output (FOSC/4) |
| Pin 11 | RB0/INT β PORTB bit 0 / External interrupt input |
| Pin 12 | RB1 β PORTB bit 1 |
| Pin 13 | RB2 β PORTB bit 2 |
| Pin 14 | RB3/PGM β PORTB bit 3 / Low-voltage programming entry |
| Pin 15 | RB4 β PORTB bit 4 |
| Pin 16 | RB5 β PORTB bit 5 |
| Pin 17 | RB6/PGC β PORTB bit 6 / In-Circuit Debugger clock |
| Pin 18 | RB7/PGD β PORTB bit 7 / In-Circuit Debugger data |
| Pin 19 | VSS β Ground reference |
| Pin 20 | VDD β Positive supply voltage (4.0 V to 5.5 V) |
| Pin 21 | RC0/T1OSO/T1CKI β PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| Pin 22 | RC1/T1OSI/CCP2 β PORTC bit 1 / Timer1 oscillator input / CCP2 module |
| Pin 23 | RC2/CCP1 β PORTC bit 2 / CCP1 (Capture/Compare/PWM) module |
| Pin 24 | RC3/SCK/SCL β PORTC bit 3 / MSSP SPI clock / I2C clock |
| Pin 25 | RC4/SDI/SDA β PORTC bit 4 / MSSP SPI data input / I2C data |
| Pin 26 | RC5/SDO β PORTC bit 5 / MSSP SPI data output |
| Pin 27 | RC6/TX/CK β PORTC bit 6 / USART asynchronous transmit / synchronous clock |
| Pin 28 | RC7/RX/DT β PORTC bit 7 / USART asynchronous receive / synchronous data |
Typical Applications
PIC16F873-04E/SO is suitable for 6 applications: Industrial Sensor Interface Node, Appliance Control Board (White Goods), Low-Cost Serial-to-Bridge Module, Automotive Body Module (Non-Safety), Smart Meter Edge Subsystem, Educational / Hobby Development Board.
Industrial Sensor Interface Node
The PIC16F873-04E/SO fits industrial 4-20 mA sensor interface nodes thanks to its 10-bit ADC (5 channels), 4 MHz deterministic instruction timing, and Extended -40C to +125C temperature rating per the E suffix. In a typical deployment, the MCU digitizes one or more analog transducer signals and exposes the results over the integrated USART (RS-485) or MSSP (I2C) for a host PLC. Its nanoWatt SLEEP mode holds sensor-power draw under 10 uA between samples, and the SOIC-28 wide-body package simplifies hand-rework during commissioning. The 200 ns instruction cycle is fast enough to service ADC, comms, and TIMER1-based sample scheduling without missing events, while the 7KB Flash holds a full command-set interpreter and diagnostics stack.
Recommended
Appliance Control Board (White Goods)
For washing-machine or dishwasher control boards, the PIC16F873-04E/SO provides the right mix of cost, I/O count (22 pins), and ruggedness: the USART drives a UI display, the MSSP in I2C mode talks to a temperature sensor front-end, and the 8-bit Timer2 hardware PWM drives TRIAC-based motor phase control. Per Microchip's PIC16F87X datasheet, the ICSP interface on RB6/RB7 allows firmware tuning on the production line without removing the SOIC-28 part. The Extended temperature rating and built-in brown-out reset keep the part reliable across the wide thermal envelope of laundry equipment, and the 7KB Flash comfortably stores look-up tables for cycle profiles, water-level calibrations, and fault history.
Recommended
Low-Cost Serial-to-Bridge Module
Design engineers use the PIC16F873-04E/SO as a low-cost serial bridge between legacy UART peripherals and a host processor: one USART connects to a 5V sensor string, while MSSP in SPI mode talks to an SPI peripheral, with the MCU repackaging data into a different protocol stream. Its 4 MHz / 200 ns cycle sustains multi-kbaud rates without throttling, and the 22 I/O pins give plenty of GPIO for status LEDs and a fault output. According to Microchip's PIC16F87X family documentation, the part supports in-circuit debugging via ICD on RB6/RB7, letting engineers iterate protocol firmware quickly. The SOIC-28 wide-body is friendly to assembly houses using conservative no-lead reflow profiles.
Recommended
Automotive Body Module (Non-Safety)
Non-safety body electronics such as lighting controllers, mirror adjusters, or seat-position memories can use the PIC16F873-04E/SO with its Extended -40C to +125C rating to ride through cabin temperature extremes. Its 10-bit ADC reads potentiometer wiper voltages, the 16-bit Timer1 times LIN-bus-style intervals, and the PWM outputs ease motor soft-start. The 28-pin SOIC footprint supports the larger-creepage PCB designs typical of under-dash boards. For safety-critical or powertrain modules, Microchip recommends using AEC-Q100 qualified parts such as PIC16F15313-I/SL instead; the E-suffix PIC16F873 is appropriate for cabin comfort modules where functional-safety documentation is not required.
Recommended
Smart Meter Edge Subsystem
In electricity or water-meter edge subsystems, the PIC16F873-04E/SO reads pulses from a metering front-end via its 16-bit Timer1 in counter mode, drives an LCD or LED display via I/O and the MSSP peripheral, and forwards aggregate readings over the USART to a concentrator. Its nanoWatt SLEEP mode keeps battery drain minimal between pulse events, and the brown-out reset ensures the meter keeps its calibration across main-battery swap events. The 4 MHz speed grade is fast enough for 100+ Hz pulse counting, and the 7KB Flash stores calibration coefficients, accumulated readings, and tamper flags per the meter manufacturer's protocol. The wide-body SOIC eases assembly across the long-lifecycle meter product lifespan.
Recommended
Educational / Hobby Development Board
The PIC16F873-04E/SO is a staple of university microcontroller courses and hobby robotics projects because the standard 28-pin SOIC footprint is easy to breadboard with SOIC-to-DIP adapter boards, the ICSP programming scheme needs only two GPIO pins, and 7KB of Flash supports full syllabus-spanning C programs without page banking. The Microchip MPLAB X IDE supports the full PIC16F87X family with free XC8 compiler and in-circuit debugger integration, letting students see register-level effects of their code. The Extended -40C to +125C rating is overkill for a classroom but reinforces the part's reliability for outdoor hobby projects and competitive robotics events. Many legacy reference designs and textbooks from 2000-2010 remain directly applicable.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F873-04E/SO β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F873-04I/SO | PIC16F873T-04E/SO | PIC16F876-04E/SO |
|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | SOIC-28 (0.295 inch wide-body) | SOIC-28 (0.295 inch wide-body) - same | SOIC-28 (0.295 inch wide-body) - same | SOIC-28 (0.295 inch wide-body) - same |
| Temperature Range | -40C to +125C (Extended) | -40C to +85C (Industrial) | -40C to +125C (Extended) | -40C to +125C (Extended) |
| Maximum Clock Frequency | 4 MHz (200 ns instruction cycle) | 4 MHz | 4 MHz | 4 MHz |
| Flash Program Memory | 7 KB (4K x 14) | 7 KB | 7 KB | 14 KB (8K x 14) |
| RAM | 192 bytes | 192 bytes | 192 bytes | 368 bytes |
| I/O Pins | 22 | 22 | 22 | 22 |
| Operating Voltage | 4.0 V to 5.5 V | 4.0 V to 5.5 V | 4.0 V to 5.5 V | 4.0 V to 5.5 V |
| Packaging Format | Tube (28-pin SOIC) | Tube | Tape and Reel | Tube |
Key Differentiators
- Extended temperature rating for harsh thermal environments (vs PIC16F873-04I/SO (Industrial grade))
- Doubles Flash and RAM for forward-looking designs (vs PIC16F876-04E/SO (14 KB / 368 B))
- Tube-format production-pack option (vs PIC16F873T-04E/SO (Tape-and-Reel))
Design Notes
Estimated: Power-supply decoupling for the PIC16F873-04E/SO should use a 100 nF ceramic capacitor between VDD (pin 20) and VSS (pin 19) placed within 5 mm of the package, plus a bulk 10 uF tantalum or aluminum-polymer cap at the board power entry. The Microchip PIC16F87X datasheet emphasizes that the brown-out reset (BOR) trip-point accuracy depends on a clean VDD; noisy rails cause spurious resets. Avoid routing high-current switching nodes (relay coils, motors) under or near the MCU's VDD pin to prevent ground-bounce faults. For battery-powered designs, the nanoWatt SLEEP mode with watchdog disabled drops I_DD below 1 uA per the datasheet's typical curve.
Two common pitfalls when using the PIC16F873-04E/SO: (1) confusing the -04E (Extended -40C to +125C) with the -04I (Industrial -40C to +85C) - verify the suffix before committing to a design that runs hot; and (2) choosing -04 instead of -20 for high-speed serial work - the 04 part's 4 MHz oscillator limit restricts USART baud rates to roughly 38.4 kbps at 1.5% error, while the -20 part supports 115.2 kbps. If you later need more code space, the PIC16F876 is a same-footprint upgrade (14 KB Flash / 368 B RAM) per the PIC16F87X family datasheet, but you cannot drop firmware from 876 to 873 if it exceeds 7 KB.
For reliable ICSP programming and in-circuit debugging on the 28-pin SOIC footprint, keep the MCLR/VPP line accessible (one test pad or pull-up to VDD with a 10 kohm resistor and a programming header) and reserve RB6/PGC plus RB7/PGD as a clean 2-pin bus without series resistors greater than 100 ohm. The Microchip PIC16F87X datasheet's AC characteristics list the PGC and PGD slew-rate limits, so source-terminated traces longer than 50 mm need a 33 ohm series resistor. Crystal traces (OSC1/OSC2) should be short, ground-guarded, and routed away from the I/O switching edges to avoid injected jitter on the system clock.
Compliance Information
RoHS compliant per Microchip PIC16F87X datasheet and product page. Not AEC-Q100 qualified - use AEC-Q100 grade MCUs (e.g., PIC16F15313-I/SL) for automotive safety-critical applications. REACH compliant per Microchip product page statement. Halogen-free status should be verified from shipment-specific Certificate of Compliance.