PIC16F628-04I/SO - 8-bit 4MHz Flash MCU 3.5KB | Microchip
MPN: PIC16F628-04I/SO ✗ End of Life| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.95 | $3.95 |
| 10 | $3.45 | $34.50 |
| 100 | $2.85 | $285.00 |
| 500 | $2.55 | $1,275.00 |
| 1,000 | $2.3 | $2,300.00 |
PIC16F628-04I/SO Overview
What is a PIC16 mid-range flash microcontroller? The PIC16 family is Microchip's classic 8-bit RISC architecture designed around a 14-bit instruction word, 35 single-word instructions and 200 ns instruction execution. Within the broader taxonomy it sits below 16-bit PIC24/dsPIC parts and 32-bit PIC32 SAM devices, and it targets cost-sensitive, deterministic embedded control where ARM Cortex-M0/M0+ is unnecessary. The 04I speed grade ("-04") denotes a 4 MHz oscillator maximum and the "I" suffix denotes industrial temperature grade.
Key features include two analog comparators with a programmable on-chip voltage reference, a USART module for asynchronous serial communication, a capture/compare/PWM (CCP) peripheral, two 8-bit timers plus one 16-bit timer, and 10-bit resolution PWM. The flash program memory is in-circuit serial programmable (ICSP) via two pins, allowing field firmware updates without removing the device from the board. Power-on reset, brown-out reset, watchdog timer and power-saving SLEEP mode are all on-chip.
The PIC16F628 architecture uses a Harvard-design RISC core with separate program and data buses, internal 4 MHz oscillator and an external oscillator option. The device replaces the older PIC16F84 footprint-compatible parts while adding hardware USART, comparators and a wider instruction set, making it a popular upgrade for legacy designs.
Typical applications include remote control transmitters, HVAC thermostat controls, small appliance controllers, sensor signal conditioning, battery chargers and automotive interior accessories. The 16 I/O count and SOIC-18 footprint also make it a fit for hand-held instrumentation where PCB area is constrained.
When designing, ensure the Vdd range of 3.0 V to 5.5 V and adequate bulk decoupling; place a 100 nF ceramic close to Vdd and a 10 µF electrolytic on the supply rail. For ICSP programming, reserve pins RB6 and RB7 and do not load them with low-impedance circuitry that prevents in-circuit programming.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet alone.
Drop-in alternatives for PIC16F628-04I/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 PIC16F628-04I/SO (same form factor and footprint) — differing in Operating Temperature, Package, I/O Pins, Internal Oscillator, Analog Comparators.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F628A-I/SO
✅ Drop-In✓ In Stock
$2.32 / Unit
View Datasheet →PIC16F628-04/SO
✅ Drop-In✓ In Stock
$1.05 / Unit
View Datasheet →PIC16F627-04I/SO
✅ Drop-In✓ In Stock
$1.59 / Unit
View Datasheet →PIC16F648A-I/SO
✅ Drop-In ⚠️ 参数待验证✓ In Stock
$2.1 / Unit
View Datasheet →PIC16F88-I/SO
✅ Drop-In ⚠️ 参数待验证📋 Reference alternative (not in catalog)
PIC16F628-04I/SO Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC® 16-bit mid-range (8-bit data path, 14-bit instruction word) |
| Program Memory Type | Flash |
| Program Memory Size | 3.5 KB (2K x 14) |
| Data EEPROM | 128 bytes |
| Data SRAM | 224 bytes |
| Maximum Clock Frequency | 4 MHz (04 speed grade) |
| Instruction Execution Time | 200 ns @ 20 MHz / 1 µs @ 4 MHz |
| Supply Voltage (Vdd) | 3.0 V to 5.5 V (industrial "I" grade operating range) |
| I/O Pins | 16 (bidirectional, individually direction-controlled) |
| Timers | 3 (Timer0 8-bit, Timer1 16-bit, Timer2 8-bit) |
| Analog Comparators | 2 with programmable on-chip VREF |
| Communication Peripherals | 1x USART (async/sync serial) |
| PWM Modules | 1x CCP (10-bit resolution PWM) |
| Operating Temperature | -40 °C to +85 °C (industrial, "I" suffix) |
| Package | SOIC-18 (SO), 7.50 mm body, 1.27 mm pitch, gull-wing |
| Mounting Type | Surface Mount |
| MSL Level | 1 (unlimited floor life at <30 °C / 85 % RH) |
| RoHS Status | Compliant (lead-free matte-tin) |
| ICSP Programming | Yes (RB6/RB7 clock/data, low-voltage ICSP supported) |
| Brown-out Reset | Yes (BOR, programmable trip) |
| Watchdog Timer | Yes (WDT with on-chip 128 kHz LF oscillator) |
| Internal Oscillator | 4 MHz precision internal RC (software-selectable) |
| AEC-Q100 Qualification | Not qualified (industrial grade only) |
| Pin Count | 18 |
| Recommended New Design Part | PIC16F15244 per Microchip product page |
PIC16F628-04I/SO Pin Configuration
| Pin 1 | RA2 — Bidirectional I/O / analog comparator C1OUT |
| Pin 2 | RA3 — Bidirectional I/O / analog comparator C1IN+ |
| Pin 3 | RA4/T0CKI — Bidirectional I/O (open-drain) / Timer0 clock input |
| Pin 4 | RA5/MCLR̅ — Bidirectional I/O / Master Clear (reset) input |
| Pin 5 | GND — Ground reference |
| Pin 6 | RB0/INT — Bidirectional I/O / external interrupt |
| Pin 7 | RB1 — Bidirectional I/O / analog comparator C1IN- |
| Pin 8 | RB2 — Bidirectional I/O |
| Pin 9 | RB3 — Bidirectional I/O / analog comparator C2IN+CVREF |
| Pin 10 | RB4 — Bidirectional I/O / interrupt-on-change |
| Pin 11 | RB5 — Bidirectional I/O / interrupt-on-change |
| Pin 12 | RB6/PGC — Bidirectional I/O / ICSP clock (serial programming) |
| Pin 13 | RB7/PGD — Bidirectional I/O / ICSP data (serial programming) |
| Pin 14 | VDD — Positive supply (3.0 V to 5.5 V) |
| Pin 15 | OSC2/CLKOUT — Oscillator crystal output / 4 MHz clock out |
| Pin 16 | OSC1/CLKIN — Oscillator crystal input / external clock input |
| Pin 17 | RA6 — Bidirectional I/O / oscillator crystal output (XT mode) |
| Pin 18 | RA7 — Bidirectional I/O / oscillator crystal input (XT mode) |
Typical Applications
PIC16F628-04I/SO is suitable for 7 applications: Remote Control Transmitter, HVAC Thermostat Controller, Small Appliance Control (Coffee Maker, Toaster, Mixer), Battery Charger for Lead-Acid / NiMH, Automotive Interior Accessory (LED Driver, Lighting Module), Sensor Signal Conditioning / Data Logger, Hand-Held Test & Measurement Instrument.
Remote Control Transmitter
The PIC16F628-04I/SO is well suited for handheld infrared / RF remote control transmitters where 16 I/O pins drive keypad matrix scanning and LED indicators, while the integrated USART supports newer bidirectional radio modules. The on-chip comparators and programmable VREF handle low-battery detection from a single CR2032 or 2× AA supply running 3.0 V to 5.5 V. Its 4 MHz maximum clock and industrial temperature range (-40 °C to +85 °C) comfortably cover the worst-case outdoor and automotive cabin environments. The 224-byte SRAM is sufficient for stack-based key-debounce and rolling-code buffers, and the 3.5 KB flash allows modest protocol stacks (e.g. RC5, NEC, simple proprietary protocols). Watchdog timer with internal LF oscillator ensures hang recovery without external components.
Recommended
HVAC Thermostat Controller
In HVAC thermostat designs the PIC16F628-04I/SO reads temperature sensors via its two analog comparators (with on-chip programmable VREF replacing an external zener), drives a 16×2 LCD through parallel I/O, and switches relays via 25 mA I/O sink. The 200 ns instruction execution at 20 MHz (or 1 µs at 4 MHz) easily handles PID loops and debounced keypad input. Brown-out reset and watchdog timer protect against brownouts during compressor inrush. The 128-byte EEPROM stores setpoint schedules across power cycles, while the USART enables connection to a Wi-Fi or Modbus module for smart-thermostat features. Industrial temperature grade -40 °C to +85 °C handles attic and equipment-room mounting.
Recommended
Small Appliance Control (Coffee Maker, Toaster, Mixer)
Small kitchen appliances benefit from the PIC16F628-04I/SO's 16 high-current I/O that can directly drive LED indicators, triac-trigger optos and buzzer elements. Its 3.5 KB flash holds menu UI logic for a coffee machine or blender while the 128-byte EEPROM saves user preferences. The two comparators detect zero-cross for triac phase-angle dimming and over-temperature conditions from an NTC. Industrial temperature rating supports the inside-housing thermal environment of toaster ovens and similar appliances. Combined with the PWM (CCP) channel, this part can also drive a low-cost BLDC or universal motor in low-end mixers.
Recommended
Battery Charger for Lead-Acid / NiMH
The PIC16F628-04I/SO serves as the supervisor MCU in simple single/dual-stage chargers. Its two analog comparators with programmable VREF monitor battery voltage and current-shunt feedback, replacing discrete op-amps. The 16 I/O drive status LEDs, control a relay or MOSFET for charge/discharge switching and read a temperature sensor for safety cutoff. The 4 MHz internal RC oscillator eliminates the external crystal, reducing BOM cost, while the watchdog timer protects against firmware lockup. Industrial temperature grade -40 °C to +85 °C handles garage and outdoor-charging conditions. Flash memory holds CC/CV charge profile tables and EEPROM stores cycle-count data.
Recommended
Automotive Interior Accessory (LED Driver, Lighting Module)
Although not AEC-Q100 qualified, the PIC16F628-04I/SO can drive interior 12 V accessories in non-safety automotive applications such as ambient LED strips, footwell lighting and trunk illumination. The PIC16F628-04I/SO has 16 high-current 25 mA I/O pins that directly drive LED strings through MOSFETs, while the comparators monitor over-current from a shunt and trigger protection. The CCP/PWM channel provides 10-bit dimming, and the USART enables CAN/LIN transceiver daughter boards for body-network communication. Note that AEC-Q100 qualified variants (e.g. PIC16F15244) are required for safety-critical automotive applications per Microchip guidance.
Recommended
Sensor Signal Conditioning / Data Logger
For low-cost sensor signal conditioning and data logging, the PIC16F628-04I/SO reads analog signals through its two comparators with programmable VREF replacing external ADC front ends, then formats and transmits results via the integrated USART to a host PC or radio. The 224-byte SRAM supports short rolling buffers and the 128-byte EEPROM retains calibration constants and device-ID strings. Industrial temperature range accommodates outdoor and industrial sensors. The internal 4 MHz oscillator eliminates the external crystal for cost-sensitive remote sensor nodes, and the watchdog timer with on-chip LF oscillator ensures autonomous recovery from field-side faults.
Recommended
Hand-Held Test & Measurement Instrument
Hand-held digital multimeters, continuity testers and simple oscilloscope front-ends use the PIC16F628-04I/SO for I/O expansion, range switching via relays and LCD segment driving. The 16 high-current I/O drive relay coils, range-indicator LEDs and rotary-switch decoder logic, while the USART interfaces to a Bluetooth module for wireless readout. The 3.5 KB flash holds calibration tables and user menus, and 128-byte EEPROM stores last-measurement and battery-state retention. Watchdog timer protects against battery brownout, and the SOIC-18 footprint is small enough for tight handheld enclosures. Industrial temperature range supports field-deployed use.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F628-04I/SO — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F628A-I/SO | PIC16F628-04/SO | PIC16F627-04I/SO | PIC16F648A-I/SO | PIC16F88-I/SO |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | SOIC-18 | SOIC-18 (same) | SOIC-18 (same) | SOIC-18 (same) | SOIC-18 (same) | SOIC-18 (same) |
| Program Memory (Flash) | 3.5 KB | 3.5 KB | 3.5 KB | 1 KB (-71%) | 7 KB (+100%) | 7 KB (+100%) |
| Data SRAM | 224 bytes | 224 bytes | 224 bytes | 128 bytes (-43%) | 256 bytes (+14%) | 368 bytes (+64%) |
| Data EEPROM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 256 bytes (+100%) | 256 bytes (+100%) |
| Max Clock Frequency | 4 MHz | 20 MHz | 4 MHz | 4 MHz | 20 MHz | 20 MHz |
| Operating Temperature | -40 °C to +85 °C (Industrial) | -40 °C to +85 °C (Industrial) | 0 °C to +70 °C (Commercial) | -40 °C to +85 °C (Industrial) | -40 °C to +85 °C (Industrial) | -40 °C to +85 °C (Industrial) |
| I/O Pins | 16 | 16 | 16 | 16 | 16 | 16 |
| nanoWatt Low-Power Modes | No | Yes | No | No | Yes | Yes |
Key Differentiators
- Legacy industrial-grade temperature qualification (vs PIC16F628-04/SO)
- Significantly more flash and RAM than PIC16F627 family (vs PIC16F627-04I/SO)
- Two analog comparators with programmable VREF replace external op-amp front ends (vs PIC16F88-I/SO)
Design Notes
Place a 100 nF ceramic decoupling capacitor as close as physically possible to the VDD pin (pin 14) of the PIC16F628-04I/SO, plus a 10 µF bulk capacitor on the same supply rail. The flash program memory erase/write cycle requires VDD ≥ 4.5 V - if the design runs below this threshold (e.g. battery-powered), use a small boost regulator for the ICSP programming step. The internal 4 MHz RC oscillator eliminates an external crystal, saving two GPIO and BOM cost in space-constrained designs.
Reserved pins RB6 and RB7 (pins 12 and 13) are shared with ICSP programming clock and data. Do not load these pins with low-impedance drivers (high-current LEDs, low-value pull-ups, or active drivers) that prevent the programmer from driving them during field updates. Also, the MCLR̅ pin (RA5/pin 4) requires a 10 kΩ pull-up to VDD for normal operation - leaving it floating prevents startup. The analog comparators on RA0/RA1/RA2/RA3 must be explicitly disabled in firmware if those pins are used as digital I/O.
The PIC16F628-04I/SO is a low-power CMOS part with typical active current around 2 mA at 4 MHz and 5 V, dropping below 1 µA in SLEEP mode. The SOIC-18 package has a thermal resistance of approximately 100 °C/W (θJA) - well above the dissipation budget of a typical digital design. No heatsink is required. For industrial -40 °C to +85 °C environments, ensure ambient airflow does not exceed 85 °C; derate oscillator frequency above 70 °C if the application is borderline.
Compliance Information
RoHS-compliant per Microchip product page and DigiKey listing. Industrial temperature grade -40 °C to +85 °C; not AEC-Q100 qualified (industrial only). Suggested modern replacement per Microchip is PIC16F15244.