PIC16F873A-I/SO - 8-bit MCU, 7KB Flash, 20MHz, 28-SOIC | Microchip
MPN: PIC16F873A-I/SO β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.3 | $4.30 |
| 10 | $3.96 | $39.60 |
| 100 | $3.3 | $330.00 |
| 500 | $2.94 | $1,470.00 |
| 1,000 | $2.65 | $2,650.00 |
PIC16F873A-I/SO Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, non-volatile program memory (Flash/ROM), volatile data memory (RAM), and a configurable set of peripheral blocks (timers, ADC, communication ports, comparators). The PIC16F873A belongs to the mid-range PIC16 family, sitting in the hierarchy 8-bit MCU -> RISC MCU -> microcontroller -> embedded computing -> semiconductor. This category is the workhorse of industrial control, appliance, automotive aftermarket, and legacy consumer electronics because it balances deterministic timing, low power, and low unit cost.
Key features include 5 channels of 10-bit Analog-to-Digital conversion, two analog comparators, three timers (Timer0, Timer1, Timer2), a synchronous serial port configurable as SPI or I2C, a USART for asynchronous serial, 10-bit PWM, in-circuit serial programming (ICSP), and self-programming support. The device operates across 2.0V to 5.5V, drawing typically < 2 mA at 5V/4MHz and < 1 uA in standby. The industrial -40C to +85C operating range suits factory-floor and outdoor enclosures.
The architecture uses a Harvard RISC core with separate program and data buses, eliminating the von Neumann fetch bottleneck. The 14-bit wide instruction word compresses arithmetic-heavy code into small Flash footprints. Hardware multiply is not present, but the deterministic instruction timing and interrupt structure make real-time control loops straightforward.
Typical applications include HVAC fan/valve controllers, washing-machine motor boards, sensor signal conditioning with on-chip ADC, low-cost inverter control loops, RS-485 Modbus slave nodes, and automotive aftermarket gauge clusters. Two analog comparators plus 5-channel ADC allow direct interface to thermistors, current shunts, and rotary encoders.
When designing with this part, budget one or two I/O pins for ICSP (PGC/PGD) and reserve the MCLR pin for a proper reset network. Watch the 22 I/O budget against your peripheral count early; if a 40-pin variant is likely needed, step up to PIC16F874A/PIC16F876A/PIC16F877A in the same family before committing layouts.
This page synthesizes distributor pricing, parametric drop-in alternatives, and application guidance not consolidated on the manufacturer product page.
Drop-in alternatives for PIC16F873A-I/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 PIC16F873A-I/SO (same form factor and footprint) β differing in Package, Timers, Core Architecture, ADC, Operating Temperature.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F876A-I/SO
β Drop-Inπ Reference alternative (not in catalog)
PIC16F873A-I/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F873A-I/ML
β Drop-Inβ In Stock
$2.32 / Unit
View Datasheet βPIC16F873A-E/SS
β Drop-Inβ In Stock
$3.55 / Unit
View Datasheet βPIC16F873A-E/SP
β Drop-Inβ In Stock
$4.62 / Unit
View Datasheet βPIC16F873A-E/ML
β Drop-Inβ In Stock
$3.35 / Unit
View Datasheet βPIC16F873A-I/SO Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16 8-bit RISC (Harvard) |
| Program Memory | 7 KB (4K x 14) Flash |
| RAM | 192 bytes |
| EEPROM | 128 bytes |
| Instruction Set | 35 single-word instructions |
| Maximum CPU Frequency | 20 MHz (200 ns instruction cycle) |
| Supply Voltage (VDD) | 2.0 V to 5.5 V |
| I/O Pins | 22 |
| ADC | 5 channels, 10-bit |
| Analog Comparators | 2 |
| Timers | 3 (Timer0 8-bit, Timer1 16-bit, Timer2 8-bit) |
| PWM | 10-bit resolution, 2 channels |
| Communication | SPI / I2C (SSP), USART/SCI |
| Operating Temperature | -40 C to +85 C (industrial) |
| Package | 28-pin SOIC (SO) |
| In-Circuit Programming | ICSP supported |
| Self-Programming | Yes |
| RoHS Status | Compliant |
PIC16F873A-I/SO Pin Configuration
| Pin 1 | MCLR/VPP β Master clear (reset) input / programming voltage |
| Pin 2 | RA0/AN0 β PORTA bit 0 / analog input 0 |
| Pin 3 | RA1/AN1 β PORTA bit 1 / analog input 1 |
| Pin 4 | RA2/AN2/VREF- β PORTA bit 2 / analog input 2 / VREF- |
| Pin 5 | RA3/AN3/VREF+ β PORTA bit 3 / analog input 3 / VREF+ |
| Pin 6 | RA4/T0CKI β PORTA bit 4 / Timer0 clock input |
| Pin 7 | RA5/AN4/SS β PORTA bit 5 / analog input 4 / SSP slave select |
| Pin 8 | OSC2/CLKOUT β Oscillator output / clock out |
| Pin 9 | OSC1/CLKIN β Oscillator input / clock in |
| Pin 10 | RC0/T1OSO/T1CKI β PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| Pin 11 | RC1/T1OSI/CCP2 β PORTC bit 1 / Timer1 oscillator input / Capture-Compare-PWM 2 |
| Pin 12 | RC2/CCP1 β PORTC bit 2 / Capture-Compare-PWM 1 |
| Pin 13 | RC3/SCK/SCL β PORTC bit 3 / SPI clock / I2C clock |
| Pin 14 | RC4/SDI/SDA β PORTC bit 4 / SPI data in / I2C data |
| Pin 15 | RC5/SDO β PORTC bit 5 / SPI data out |
| Pin 16 | RC6/TX/CK β PORTC bit 6 / USART async transmit / sync clock |
| Pin 17 | RC7/RX/DT β PORTC bit 7 / USART async receive / sync data |
| Pin 18 | VSS β Ground reference |
| Pin 19 | VDD β Positive supply voltage |
| Pin 20 | RB0/INT β PORTB bit 0 / external interrupt |
| Pin 21 | RB1 β PORTB bit 1 |
| Pin 22 | RB2 β PORTB bit 2 |
| Pin 23 | RB3/PGM β PORTB bit 3 / low-voltage programming enable |
| Pin 24 | RB4 β PORTB bit 4 |
| Pin 25 | RB5 β PORTB bit 5 |
| Pin 26 | RB6/PGC β PORTB bit 6 / ICSP clock |
| Pin 27 | RB7/PGD β PORTB bit 7 / ICSP data |
| Pin 28 | VSS β Ground reference (second VSS pin on 28-pin variant) |
Typical Applications
PIC16F873A-I/SO is suitable for 7 applications: HVAC Fan and Valve Controller, Washing Machine Motor Control Board, Industrial RS-485 Modbus Slave Node, Automotive Aftermarket Gauge Cluster, Sensor Signal Conditioning Front-End, Battery-Backed Real-Time Clock Module, Custom USB-to-UART Bridge (Firmware CDC).
HVAC Fan and Valve Controller
The PIC16F873A-I/SO drives triac-controlled AC fan motors and thermostatic zone valves in HVAC systems. Its 5-channel 10-bit ADC reads thermistor temperature sensors directly without external signal conditioning, while the two analog comparators handle zero-crossing detection for triac firing. The 20MHz CPU executes 200 ns instruction cycles, fast enough for software PWM dimming at 1 kHz update rate. The 7KB Flash fits typical HVAC state machines including PID control loops and EEPROM-backed schedule storage. Per datasheet 30262D, the 22 I/O budget accommodates 3 triac outputs, 2 relay drivers, a 4x3 keypad matrix, and the LCD data bus. Industrial -40C to +85C operation tolerates attic equipment compartments.
Recommended
Washing Machine Motor Control Board
The PIC16F873A-I/SO is a classic 8-bit MCU in washing-machine motor controllers, driving triac-fired universal motors and solenoid valves. Its 10-bit PWM channels deliver smooth speed ramping, while Timer1 (16-bit) handles back-EMF zero-crossing timing for synchronous rectification. Per Microchip datasheet 30262D, the 7KB Flash accommodates drum control state machines, water-level sensing via ADC, door-lock interlocks, and fault logging. The 22 I/O pins cover the keypad, 7-segment display driver, and motor-driver enable lines. Industrial temperature grade and 5V operation suit the noisy electrical environment of an appliance back panel.
Recommended
Industrial RS-485 Modbus Slave Node
The PIC16F873A-I/SO implements a Modbus-RTU slave node on RS-485 with the on-chip hardware USART. The synchronous serial port (SSP) can be reconfigured for SPI to drive a local sensor front-end or for I2C to read an external RTC. Per datasheet 30262D, the 7KB Flash fits Modbus protocol state machines, register maps, and CRC16 routines. The 192-byte RAM buffers 16-bit holding registers, and the 128-byte EEPROM stores calibration constants through power cycles. The 2.0V to 5.5V supply range accepts 24V industrial bus power via a 5V LDO. Watchdog timer plus brown-out reset ensure field-reliable operation in industrial cabinets.
Recommended
Automotive Aftermarket Gauge Cluster
The PIC16F873A-I/SO powers aftermarket automotive gauges including oil-pressure, boost, and AFR displays. The 5-channel 10-bit ADC samples 0-5V sensor signals from automotive transducers, while Timer0 handles tachometer pulse-counting from ignition coils. Per datasheet 30262D, the 22 I/O drive multiplexed 7-segment or OLED displays, button inputs, and warning-LED outputs. Industrial -40C to +85C temperature operation tolerates under-dash thermal stress. The 7KB Flash accommodates gauge calibration tables and EEPROM stores user preferences. Note: this part is industrial-grade, not AEC-Q100 - use PIC16F876A-I/SO for OEM-grade automotive designs.
Recommended
Sensor Signal Conditioning Front-End
The PIC16F873A-I/SO serves as a smart sensor front-end, reading bridge sensors, thermistors, and 4-20 mA transducers via its 10-bit ADC and linearizing outputs to UART, SPI, or I2C. Per datasheet 30262D, the 7KB Flash accommodates polynomial calibration routines, while the 128-byte EEPROM stores factory calibration coefficients. The two analog comparators enable window-comparator alarm outputs without CPU intervention. The 22 I/O drive status LEDs, control relays, and accept button inputs. The 5V supply and -40C to +85C range suit process-control transmitter housings.
Recommended
Battery-Backed Real-Time Clock Module
The PIC16F873A-I/SO forms a standalone RTC module with battery backup, displaying time/date on an LCD and synchronizing via GPS or NTP through UART. Per datasheet 30262D, the 22 I/O drive 4-bit LCD data, RS, and enable lines plus accept GPS PPS input on CCP1 for sub-second accuracy. The 7KB Flash fits Gregorian calendar arithmetic and time-zone logic, and the 128-byte EEPROM stores user-set alarms and DST rules. The 2.0V minimum VDD allows CR2032 coin-cell operation when mains power fails. ICSP pins are reserved for in-field firmware updates via the rear-panel programming header.
Recommended
Custom USB-to-UART Bridge (Firmware CDC)
With a CH340 or FTDI companion chip, the PIC16F873A-I/SO can act as a custom USB CDC device firmware-side, performing protocol translation between USB and RS-232/RS-485 for legacy industrial equipment. Per datasheet 30262D, the on-chip USART handles async serial at up to 115200 baud reliably at 20MHz, while the SSP supports SPI master to talk to a UART-over-SPI expander for additional ports. The 7KB Flash fits USB request handlers, while EEPROM stores VID/PID and serial number. This is a low-volume bridge solution when COTS USB-UART chips do not meet custom-protocol needs.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F873A-I/SO β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F876A-I/SO | PIC16F873A-I/SP | PIC16F873A-I/ML | PIC16F873A-E/SS | PIC16F873A-E/SP | PIC16F873A-E/ML |
|---|---|---|---|---|---|---|---|
| Package | 28-SOIC (SO) | 28-SOIC (SO) | 28-PDIP (SP) | 28-QFN (ML) | 28-SSOP (SS) | 28-PDIP (SP) | 28-QFN (ML) |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Memory | 7 KB Flash | 14 KB Flash | 7 KB Flash | 7 KB Flash | 7 KB Flash | 7 KB Flash | 7 KB Flash |
| RAM | 192 bytes | 256 bytes | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 192 bytes |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 128 bytes |
| Maximum Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating Temperature | -40 C to +85 C | -40 C to +85 C | -40 C to +85 C | -40 C to +85 C | -40 C to +125 C | -40 C to +125 C | -40 C to +125 C |
| Temperature Grade | Industrial (I) | Industrial (I) | Industrial (I) | Industrial (I) | Extended (E) | Extended (E) | Extended (E) |
Key Differentiators
- Compact 28-pin footprint with full mid-range peripheral set (vs PIC16F876A-I/SO)
- Industrial -40C to +85C operating range (vs PIC16F873A-E/SS)
- Same die across SOIC/PDIP/QFN packages (vs PIC16F873A-I/SP)
Design Notes
Decouple VDD (pin 20) with 100 nF ceramic placed within 5 mm of the pin, plus a bulk 10 uF tantalum or aluminum electrolytic on the supply rail. Per Microchip datasheet 30262D, AVDD is internally tied to VDD on this 28-pin variant, so the same 100 nF cap serves both analog and digital supplies. Place the cap ground return directly to pin 18/28 VSS via a wide, short trace to avoid ground bounce corrupting ADC samples.
The MCLR pin (1) requires a 10 kohm pull-up to VDD plus a 100 nF cap to VSS for a proper power-on reset, unless internal MCLR is configured in the configuration bits. The ICSP pins RB6/PGC and RB7/PGD must be reserved for programming - do not load them with low-impedance peripherals that would interfere with the programmer. The OSC1/OSC2 pins should be guarded by a ground ring if using a high-frequency crystal to keep EMI away from the analog inputs.
Watch out for the 28-pin package losing PORT E entirely - the PIC16F873A has no RE0-RE2 pins. Designers coming from 40-pin PIC16F877A code may forget to remove PORT E references. Also, do not exceed the 25 mA sink/source per I/O pin or 200 mA per port (PORTB) total, per datasheet 30262D. Finally, when migrating to PIC16F876A, the program memory map shifts - linker scripts must be regenerated for the larger Flash.
Compliance Information
RoHS compliant per Microchip product page. Not AEC-Q100 qualified - choose PIC16F876A-I/SO with -40 to +125 C grade or an AEC-Q100 part for OEM automotive. Halogen-free status not confirmed in verified web data.