PIC16F882-I/SP - 8-Bit 20MHz MCU, 3.5KB Flash, 28-SPDIP | Microchip
MPN: PIC16F882-I/SP β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.42 | $2.42 |
| 10 | $2.19 | $21.90 |
| 100 | $1.85 | $185.00 |
| 500 | $1.62 | $810.00 |
| 1,000 | $1.45 | $1,450.00 |
PIC16F882-I/SP Overview
An 8-bit microcontroller is a single-chip computer containing a CPU, program memory, RAM, data EEPROM, and integrated peripherals such as timers, ADC, comparators, and serial communication modules. The PIC16F882 belongs to Microchip's mid-range PIC16F family, which sits in the broader hierarchy: PIC16F -> PIC microcontrollers -> 8-bit microcontrollers -> microcontrollers (MCU) -> microprocessors and controllers -> semiconductors. This category of device is widely used as the main system controller in cost-sensitive embedded designs.
Key features include 25 general-purpose I/O pins, a 10-bit ADC with up to 11 channels, two analog comparators, one 8-bit and one 16-bit timer/counter, enhanced PWM/Capture/Compare modules, and serial interfaces including AUSART, MSSP (SPI/I2C). Self-programming is supported for in-field firmware upgrades, and NanoWatt power management provides multiple low-power sleep modes. The device operates from 2.0V to 5.5V and is supported by Microchip's MPLAB X IDE and XC8 toolchain.
The PIC16F882 architecture uses a 14-bit instruction word and a RISC core with only 35 single-word instructions, simplifying code development. On-chip debug (ICD) support and ICSP (In-Circuit Serial Programming) headers enable in-system debugging without removing the part from the board. The enhanced flash memory supports 100,000 erase/write cycles typical, with data EEPROM endurance of 1,000,000 cycles.
Typical applications include industrial control systems, sensor interfaces, low-end consumer appliances, HVAC control, small motor control (PWM-driven), battery chargers, LED lighting controllers, and educational/development boards. The through-hole SPDIP package is convenient for prototyping and breadboarding, and the wide 2.0V-5.5V supply range supports both 3.3V and 5V designs.
When designing with this part, reserve an ICSP header footprint (5 pins: VPP, ICSPCLK, ICSPDAT, VDD, GND) so the device can be programmed and debugged in-circuit. The /MCLR reset pin should be tied to VDD through a 10k pull-up with a 100nF decoupling capacitor to ground for proper reset behavior during power-up.
This page synthesizes distributor stock and pricing, drop-in 28-SPDIP alternatives, package-level pinout diagrams, and practical design notes (ICSP layout, ADC reference decoupling, sleep-mode current budgeting) that complement but do not duplicate the manufacturer datasheet.
Drop-in alternatives for PIC16F882-I/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 PIC16F882-I/SP (same form factor and footprint) β differing in Core Architecture, Package, ADC, Timers, Program Memory (Flash).
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F882-E/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F886-I/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F883-I/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F884-I/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F887-I/SP
β Drop-Inπ Reference alternative (not in catalog)
PIC16F882-I/SP Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16F (8-bit RISC, 14-bit instruction word) |
| Maximum CPU Frequency | 20 MHz |
| Instruction Set | 35 single-word instructions |
| Program Memory (Flash) | 3.5 KB (2K x 14) |
| Data SRAM | 128 bytes |
| Data EEPROM | 128 bytes |
| General-Purpose I/O Pins | 25 |
| ADC | 10-bit, up to 11 channels |
| Comparators | 2 |
| Timers | 1 x 8-bit, 1 x 16-bit |
| PWM / ECCP Modules | 1 ECCP + 1 CCP |
| Serial Interfaces | AUSART (UART), MSSP (SPI / I2C) |
| Operating Voltage Range | 2.0 V to 5.5 V |
| Operating Temperature Range (Industrial) | -40 C to +85 C |
| Package | 28-pin SPDIP (Skinny Plastic DIP, through-hole) |
| Self-Programming | Yes (in-field flash updates) |
| In-Circuit Debug | Yes (ICD via ICSP) |
| RoHS Status | Compliant |
PIC16F882-I/SP Pin Configuration
| Pin 1 | MCLR/VPP/RE3 β Master Clear (reset) input / programming voltage / digital input only on RE3 |
| Pin 2 | RA0/AN0/ULPWU β PORTA bit 0 / ADC channel 0 / ultra-low-power wake-up input |
| Pin 3 | RA1/AN1 β PORTA bit 1 / ADC channel 1 |
| Pin 4 | RA2/AN2/VREF- β PORTA bit 2 / ADC channel 2 / negative ADC voltage reference |
| Pin 5 | RA3/AN3/VREF+ β PORTA bit 3 / ADC channel 3 / positive ADC voltage reference |
| Pin 6 | RA4/AN4/C1OUT/T0CKI β PORTA bit 4 (open-drain) / ADC ch4 / comparator 1 output / Timer0 clock input |
| Pin 7 | RA5/AN5/SS/HLVDIN/C2OUT β PORTA bit 5 / ADC ch5 / SPI slave select / high/low voltage detect / comparator 2 output |
| Pin 8 | VSS β Ground reference |
| Pin 9 | RA7/OSC1/CLKI β PORTA bit 7 / crystal oscillator input / external clock input |
| Pin 10 | RA6/OSC2/CLKO β PORTA bit 6 / crystal oscillator output / clock output |
| Pin 11 | RC0/T1OSO/T1CKI β PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| Pin 12 | RC1/T1OSI/CCP2 β PORTC bit 1 / Timer1 oscillator input / CCP2 PWM output |
| Pin 13 | RC2/P1A/CCP1 β PORTC bit 2 / ECCP1 PWM output A / CCP1 input/output |
| Pin 14 | RC3/SCK/SCL β PORTC bit 3 / SPI clock / I2C clock |
| Pin 15 | RC4/SDI/SDA β PORTC bit 4 / SPI data in / I2C data |
| Pin 16 | RC5/SDO β PORTC bit 5 / SPI data out |
| Pin 17 | RC6/TX/CK β PORTC bit 6 / AUSART transmit / AUSART clock |
| Pin 18 | RC7/RX/DT β PORTC bit 7 / AUSART receive / AUSART data |
| Pin 19 | VSS β Ground reference (second VSS pin) |
| Pin 20 | VDD β Positive supply voltage (2.0 V to 5.5 V) |
| Pin 21 | RB0/AN12/INT β PORTB bit 0 / ADC ch12 (only on 28-pin parts) / external interrupt |
| Pin 22 | RB1/AN10/C12INT1 β PORTB bit 1 / ADC ch10 / comparator 1 or 2 interrupt |
| Pin 23 | RB2/AN8 β PORTB bit 2 / ADC ch8 |
| Pin 24 | RB3/AN9/PGM/C12INT2 β PORTB bit 3 / ADC ch9 / low-voltage ICSP programming / comparator interrupt |
| Pin 25 | RB4/AN11 β PORTB bit 4 / ADC ch11 |
| Pin 26 | RB5/AN13/T1G β PORTB bit 5 / ADC ch13 / Timer1 gate |
| Pin 27 | RB6/PGC β PORTB bit 6 / ICD clock / ICSP clock |
| Pin 28 | RB7/PGD β PORTB bit 7 / ICD data / ICSP data |
Typical Applications
PIC16F882-I/SP is suitable for 7 applications: Industrial Sensor Interface Module, Low-End Consumer Appliance Control, HVAC and Thermostat Controller, LED Lighting Controller, Small Motor / Fan Speed Controller, Battery Charger Controller (Lead-Acid / Li-Ion), Educational and Development Board Platform.
Industrial Sensor Interface Module
The PIC16F882-I/SP's 10-bit ADC with up to 11 channels and 25 GPIO pins make it a strong fit for industrial sensor interface modules that aggregate analog inputs from temperature, pressure, and flow transducers. With its 3.5 KB Flash and 128 bytes SRAM, the part runs compact acquisition and linearization firmware without needing external memory. Operating from 2.0 V to 5.5 V, the same PCB can interface to both 3.3 V and 5 V sensor front-ends. Industrial-grade -40 C to +85 C rating supports cabinet and outdoor-enclosure deployment.
Recommended
Low-End Consumer Appliance Control
Cost-sensitive consumer appliances such as rice cookers, fans, and small kitchen tools use the PIC16F882-I/SP as a single-chip controller for timing, button input, LED status, and PWM-driven heating element or motor regulation. Its 3.5 KB Flash comfortably fits typical appliance state-machine firmware, and self-programming allows late-stage firmware customization on the production line. The NanoWatt sleep modes with sub-microamp currents extend battery life in portable appliance form factors, while the wide 2.0 V-5.5 V supply range simplifies multi-cell battery designs.
Recommended
HVAC and Thermostat Controller
Thermostat and small HVAC zone controllers use the PIC16F882-I/SP to read temperature sensors via the 10-bit ADC, drive triac-fired outputs via PWM, and communicate with the indoor unit over UART or I2C. The two on-chip analog comparators can be configured as window comparators for over-temperature protection. Industrial temperature grade (-40 C to +85 C) handles boiler-room and attic environments, and the 28-SPDIP package supports legacy HVAC control board assemblies where through-hole parts are still preferred for field serviceability.
Recommended
LED Lighting Controller
Architectural and accent LED lighting controllers use the PIC16F882-I/SP to generate multiple PWM channels for color-mixing or dimming via its ECCP and CCP modules, while AUSART or MSSP links to host controllers or DMX bridges. The 20 MHz instruction rate provides 5 MIPS, sufficient to refresh PWM at audio-noise-free frequencies above 20 kHz. Operating voltage range of 2.0 V to 5.5 V matches constant-current LED driver logic inputs directly, and the 128 bytes of EEPROM store fixture calibration and address data across power cycles.
Recommended
Small Motor / Fan Speed Controller
Brushless DC and brushed DC small-motor controllers use the PIC16F882-I/SP's ECCP module for PWM generation up to 20 kHz, its 16-bit timer for back-EMF zero-crossing detection in sensorless BLDC topologies, and its analog comparators for current-limit protection. The 25 GPIO pins handle Hall-sensor inputs, direction control, and fault outputs. Self-programming allows motor-tuning constants to be stored in Flash during factory calibration, and NanoWatt sleep reduces standby current to a few microamps when the motor is idle.
Recommended
Battery Charger Controller (Lead-Acid / Li-Ion)
Single- and multi-cell lead-acid and lithium-ion battery charger controllers use the PIC16F882-I/SP to run the CC/CV charge state machine, monitor cell voltage through the 10-bit ADC, and drive a power-MOSFET PWM via the ECCP module. The 128-byte EEPROM stores cell-count and charge-termination parameters, while the MSSP port talks to gas-gauge or SMBus charger peripherals. Wide 2.0 V to 5.5 V operation lets the same MCU work in 6 V lead-acid float, 12 V automotive, and 5 V USB-input topologies.
Recommended
Educational and Development Board Platform
The PIC16F882-I/SP is widely adopted in university microcontroller courses and hobby development boards because the 28-SPDIP through-hole package fits standard breadboards and ZIF sockets, the 35-instruction RISC core is easy to teach, and MPLAB X IDE + XC8 compiler are free. The ICSP header footprint and on-chip ICD debug let students program and step through code without removing the device. A robust sample-code base, including ADC, PWM, and I2C tutorials, lowers the learning curve for first-time embedded designers.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F882-I/SP β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F882-E/SP | PIC16F886-I/SP | PIC16F883-I/SP | PIC16F884-I/SP | PIC16F887-I/SP |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-SPDIP (through-hole) | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same |
| Maximum CPU Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Flash Program Memory | 3.5 KB (2K x 14) | 3.5 KB | 14 KB | 7 KB | 7 KB | 14 KB |
| Data SRAM | 128 bytes | 128 bytes | 368 bytes | 256 bytes | 256 bytes | 368 bytes |
| Data EEPROM | 128 bytes | 128 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes |
| GPIO Count | 25 | 25 | 25 | 25 | 25 | 25 |
| Operating Temperature | -40 C to +85 C (Industrial) | -40 C to +125 C (Extended) | -40 C to +85 C (Industrial) | -40 C to +85 C (Industrial) | -40 C to +85 C (Industrial) | -40 C to +85 C (Industrial) |
Key Differentiators
- Lowest-cost same-package option in the 28-SPDIP PIC16F88x family (vs PIC16F883-I/SP)
- Industrial temperature grade vs extended temperature grade (vs PIC16F882-E/SP)
- Direct Flash upgrade path without PCB rework (vs PIC16F886-I/SP)
Design Notes
Reserve a 5-pin ICSP header footprint (VPP, ICSPCLK, ICSPDAT, VDD, VSS) on every PIC16F882-I/SP board, even for production units. The ICSP pins are multiplexed with RB6 and RB7, so they remain usable as GPIO when no programmer is attached. A 100 nF decoupling capacitor must be placed within 5 mm of the VDD pin, and a bulk 10 uF electrolytic or tantalum should be located near the MCU. The /MCLR pin must be pulled up to VDD through a 10 kohm resistor and decoupled with a 100 nF cap to VSS to prevent spurious resets during power-up.
The PIC16F882-I/SP's ADC accuracy is highly dependent on clean supply and reference voltage. Use a dedicated 100 nF decoupling capacitor directly on VDD and VSS, and if using an external VREF+, place a 100 nF capacitor on the VREF+ pin to suppress noise. The internal band-gap reference has approximately +/- 2% tolerance over the full temperature range, so absolute ADC voltage measurements requiring better than 2% should use an external precision reference such as MCP1525 or rely on software calibration against a known voltage. Power consumption in sleep mode is typically less than 1.8 uA with the WDT disabled, enabling battery lifetimes of multiple years in low-duty-cycle designs.
Configuration bits must be explicitly programmed in every project; relying on factory defaults (especially the oscillator selection) is a common source of 'dead' boards. Confirm the FOSC bits match your clock source (HS for high-speed crystal, INTOSCIO for internal oscillator, etc.) and the WDT is either disabled or properly serviced. The ICD pins RB6/RB7 are also used for ICSP, so leaving them as inputs without proper configuration can cause the device to enter debug mode unintentionally. Brown-out detection should always be enabled (BOREN = 1) for industrial applications to avoid undefined execution during slow VDD ramps.
Compliance Information
RoHS and REACH compliance per Microchip product page. Lead-free and halogen-free packaging. AEC-Q100 qualification not applicable for this general-purpose industrial-grade MCU.