Microchip Technology

PIC16F628-04/P - 8-Bit 4MHz 3.5KB Flash MCU | Microchip DIP-18

MPN: PIC16F628-04/P ✗ End of Life
In Stock Ships in 1-3 business days
3.0 V to 5.5 V (typical 4.5 V to 5.5 V at full speed) Vdss 18-pin PDIP (DIP-18) Package 4 MHz Speed 3.5 KB Flash (2K x 14 words) Memory
From $2.35 USD / Unit
MOQ: 1 |
Price updated: 2026-09-20
Volume Pricing
Qty Unit Price Extended
1 $3.84 $3.84
10 $3.45 $34.50
100 $2.99 $299.00
500 $2.65 $1,325.00
1,000 $2.35 $2,350.00
ℹ️ All prices are in USD

PIC16F628-04/P Overview

The Microchip Technology PIC16F628-04/P is an 8-bit Flash-based CMOS microcontroller in the PIC16F mid-range family, offered in an 18-pin PDIP (DIP-18) through-hole package with 3.5KB (2K x 14 words) of program Flash, 224 bytes of RAM, and 128 bytes of EEPROM. The "-04" speed grade designates a 4 MHz maximum oscillator input, supporting a 200 ns instruction cycle, while the "/P" suffix identifies the plastic DIP-18 package. The device is built around Microchip's enhanced PIC16 RISC core with 35 single-word instructions, an 8-level deep hardware stack, and dual internal comparators plus a USART module.

A PIC microcontroller (MCU) is a compact, self-contained computer-on-a-chip integrating an 8-bit CPU, non-volatile Flash program memory, RAM, EEPROM data memory, and configurable digital I/O on a single die. PIC16 mid-range parts (PIC16 -> PIC microcontroller family -> 8-bit MCU -> microcontroller -> embedded processor) target cost-sensitive, deterministic embedded designs where predictable instruction timing, low power, and ease of programming with the free MPLAB X IDE outweigh the throughput of 32-bit Cortex-M devices.

Key features of the PIC16F628-04/P include 16 digital I/O pins with independent direction control, two analog comparators, a capture/compare/PWM (CCP) module, an enhanced USART for serial communications, an internal 4 MHz oscillator option, and a wide operating voltage range of 3.0 V to 5.5 V. The device consumes very low quiescent current in Sleep mode (typically < 1 uA) and supports in-circuit serial programming (ICSP) through two pins, eliminating the need for a separate programmer socket.

Architecturally, the PIC16F628 uses a Harvard design with separate program and data buses, a hardware multiplier-free ALU, and direct register-mapped I/O that gives the core its signature deterministic 1-cycle instruction execution except for branches. The 4 MHz speed grade limits the oscillator input frequency to 4 MHz (8 MHz internal /2) but the same silicon is offered in -20 variants for 20 MHz operation, and pin-compatible upgrades include the PIC16F628A-I/P with the enhanced nanowatt silicon and 20 MHz maximum frequency.

Typical applications include low-cost consumer appliances, hobbyist and educational projects, simple motor and lighting controllers, battery-powered sensor nodes, and legacy industrial replacement boards. The DIP-18 package remains popular for breadboarding, training kits, and through-hole production runs where field serviceability is valued.

When designing with this MCU, derate oscillator frequency below 4 MHz to ensure timing margins across temperature, and reserve the ICSPDAT/ICSPCLK pins (RB7/RB6) so the device can be reprogrammed on the board without removing it.

This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet alone, and is verified against Microchip's published PIC16F628 datasheet.

Drop-in alternatives for PIC16F628-04/P — 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-04/P (same form factor and footprint) — differing in RoHS Status, Operating Temperature, Package, Mounting Type, Core Architecture.

Microchip Technology
RoHS Status: Not compliant (Pb-containing PDIP package)
Mounting Type: Through-Hole
Microchip Technology
Operating Temperature: -40 C to +125 C (Extended Industrial)
Mounting Type: Through-Hole
Microchip Technology
RoHS Status: Compliant (lead-free)
Operating Temperature: 0 C to +70 C (commercial, /P suffix)
Package: 18-pin PDIP (0.300 in / 7.62 mm)
Microchip Technology
RoHS Status: Compliant
Package: 18-pin PDIP (P), through-hole
Core Architecture: PIC16 RISC, 8-bit Harvard
Microchip Technology
RoHS Status: Lead-free, RoHS compliant
Operating Temperature: -40C to +85C (Industrial, -I)
Package: 18-pin PDIP (DIP-18, 0.300 inch)

Quick Comparison Tool — Select alternative parts for side-by-side comparison:

PIC16F628-04I/P

✅ Drop-In
Microchip Technology
📦 DIP-18
PIC16 (8-bit RISC) · 3.5 KB (2K x 14) Flash · 224 bytes · 128 bytes · 4 MHz · 3.0 V to 5.5 V · 16 · 1 x 8-bit (Timer0), 1 x 16-bit (Timer1), 1 x 8-bit (Timer2)

✓ In Stock

$2.16 / Unit

View Datasheet →

PIC16F628A-I/P

✅ Drop-In
Microchip Technology
📦 DIP-18
PIC16 8-bit RISC · 35 single-word instructions · 200 ns (at 20 MHz) · 20 MHz · 3.5 KB (2K x 14) Flash · 224 bytes · 128 bytes · 11

✓ In Stock

$1.62 / Unit

View Datasheet →

PIC16F627-04/P

✅ Drop-In
Microchip Technology
📦 DIP-18
PIC16F62X (mid-range 8-bit) · Harvard RISC, 14-bit instruction word · 35 single-word instructions · 4 MHz · 1.75 KB (1K x 14 words) · 224 bytes · 128 bytes · 16 digital I/O

✓ In Stock

$2.05 / Unit

View Datasheet →

PIC16F84A-04/P

✅ Drop-In
📦 DIP-18
same DIP-18 footprint, legacy predecessor with 1.75 KB Flash, no USART, no CCP module, no internal oscillator - functionally similar but lower feature set

📋 Reference alternative (not in catalog)

PIC16F648A-I/P

✅ Drop-In
Microchip Technology
📦 DIP-18
PIC16 mid-range 8-bit RISC · Flash · 7 KB (4K x 14 words) · 256 bytes · 256 bytes · 20 MHz (200 ns instruction cycle) · 2.0 V to 5.5 V (4.5 V to 5.5 V for Flash programming) · 16

✓ In Stock

$2.32 / Unit

View Datasheet →

PIC16F628-04/P Maximum Ratings & Electrical Characteristics

Core Architecture PIC16 enhanced mid-range 8-bit RISC
Instruction Set 35 single-word instructions
Program Memory 3.5 KB Flash (2K x 14 words)
RAM 224 bytes
EEPROM 128 bytes
Maximum Oscillator Frequency (this -04 grade) 4 MHz
Instruction Cycle Time 200 ns at 4 MHz
Supply Voltage 3.0 V to 5.5 V (typical 4.5 V to 5.5 V at full speed)
Digital I/O Pins 16 (bidirectional, TTL/CMOS selectable)
Analog Comparators 2 on-chip
Capture/Compare/PWM (CCP) 1 module, 10-bit PWM
USART 1 enhanced USART (LIN-capable)
Timers Timer0, Timer1 (16-bit), Timer2 (8-bit with PWM)
Internal Oscillator 4 MHz internal RC (software-selectable)
Reset / Watchdog Power-on Reset, Brown-out Reset, WDT with separate oscillator
In-Circuit Programming ICSP via RB6/RB7
Package 18-pin PDIP (DIP-18)
Operating Temperature 0C to +70C (commercial)
Mounting Type Through-hole (DIP)
RoHS Status Lead-free / RoHS-compliant per DigiKey listing

PIC16F628-04/P Pin Configuration

DIP-18 Package Pinout Diagram DIP-18 18-pin dual inline, 7.62mm pitch, JEDEC MS-001. 1 18 2 17 3 16 4 15 5 14 6 13 7 12 8 11 9 10 DIP-18
Pin 1 RA2/AN2 — Digital I/O / analog input channel 2
Pin 2 RA3/AN3/VREF+ — Digital I/O / analog input / positive voltage reference
Pin 3 RA4/T0CKI — Digital I/O / Timer0 clock input (open-drain)
Pin 4 RA5/MCLR/VPP — Digital I/O / Master Clear reset (active low) / programming voltage
Pin 5 VSS — Ground reference
Pin 6 RB0/INT — Digital I/O / external interrupt
Pin 7 RB1/RX/DT — Digital I/O / USART RX / synchronous data
Pin 8 RB2/TX/CK — Digital I/O / USART TX / synchronous clock
Pin 9 RB3/CCP1 — Digital I/O / Capture/Compare/PWM channel 1
Pin 10 RB4/PGM — Digital I/O / LVP programming
Pin 11 RB5 — Digital I/O
Pin 12 RB6/ICSPCLK — Digital I/O / ICSP serial clock
Pin 13 RB7/ICSPDAT — Digital I/O / ICSP serial data
Pin 14 VDD — Positive supply voltage (3.0 V to 5.5 V)
Pin 15 RA6/OSC2/CLKOUT — Digital I/O / crystal oscillator output / clock output
Pin 16 RA7/OSC1/CLKIN — Digital I/O / crystal oscillator input / external clock input
Pin 17 RA0/AN0 — Digital I/O / analog input channel 0
Pin 18 RA1/AN1 — Digital I/O / analog input channel 1

Typical Applications

PIC16F628-04/P is suitable for 6 applications: Hobbyist & Educational Projects, Industrial Control Replacement Boards, Battery-Powered Sensor Nodes, Simple Motor & Lighting Controllers, Automotive Aftermarket & Hobbyist Vehicles, Low-Cost Consumer Appliance Control.

🔧

Hobbyist & Educational Projects

The PIC16F628-04/P is the canonical Microchip MCU for breadboard-friendly learning kits because its DIP-18 package fits standard 0.3-inch-wide breadboard sockets and its 18 pins keep the wiring manageable for first-time embedded learners. The 4 MHz oscillator grade means simple timing calculations (1 cycle = 1 us at 4 MHz clock), which helps students understand instruction execution without timekeeping complexity. With 35 single-word instructions, the PIC16F628 is ideal for teaching assembly fundamentals while still offering enough RAM (224 B) and Flash (3.5 KB) to run practical C programs under MPLAB X IDE. The PIC16F628-04/P is widely used in PIC microcontroller training labs, EE course curricula, and DIY maker projects for blinking LEDs, reading pushbuttons, and driving seven-segment displays. Recommended companions: PICkit 4 in-circuit programmer for ICSP programming and MPLAB X IDE for development.

🏭

Industrial Control Replacement Boards

Long-life industrial equipment often needs replacement microcontrollers decades after launch, and the PIC16F628-04/P continues to serve this role because Microchip's PIC16 mid-range parts have been in continuous production since the late 1990s. The device's wide 3.0 V to 5.5 V supply tolerance accommodates the 5 V logic of legacy PLCs, motor drives, and instrumentation front-ends, while its 4 MHz oscillator grade yields deterministic instruction timing required for safety-critical control loops. The on-chip USART enables RS-232/RS-485 communication with industrial sensors and HMIs, and the dual analog comparators let designers implement window detectors or zero-crossing detection without external op-amps. The DIP-18 package also makes field replacement possible without surface-mount rework, which is critical for service technicians on legacy production lines.

Battery-Powered Sensor Nodes

The PIC16F628-04/P is well-suited to battery-powered sensor nodes that spend most of their life in Sleep mode and wake periodically to read sensors and transmit data. Its Sleep current is typically < 1 uA, so a 3 V lithium coin cell can power a wake-every-30-seconds node for several years. The internal 4 MHz RC oscillator eliminates the external crystal, reducing BOM cost and board area for cost-sensitive wireless sensor designs. The 128-byte EEPROM provides non-volatile storage for calibration constants and node IDs without external memory, and the USART can drive low-power RF modules or 4-20 mA current loops. The 16 digital I/O pins accommodate multiple sensor channels and LED status indicators in a compact 18-pin footprint.

💡

Simple Motor & Lighting Controllers

The PIC16F628-04/P's CCP module can generate 10-bit PWM signals suitable for brushed DC motor speed control, LED dimming, and small solenoid drivers. The 16 digital I/O pins can read multiple pushbuttons, rotary encoders, or Hall-effect sensors, while the dual analog comparators provide overcurrent or overvoltage protection through hardware interrupt. At 4 MHz oscillator input, the PWM module produces up to 9.7 kHz at 10-bit resolution, well above the audible band and sufficient to avoid motor whine. Combined with the USART, the device can accept external commands from a host controller or Bluetooth module for smart-home lighting and DC fan control applications. The through-hole DIP package simplifies prototyping and field service.

🚗

Automotive Aftermarket & Hobbyist Vehicles

Although the commercial-temperature PIC16F628-04/P is not AEC-Q100 qualified, it remains popular in hobbyist automotive projects such as aftermarket gauge controllers, fuel-saver displays, and PWM cooling fan controllers. The 4 MHz oscillator grade produces predictable timing for RPM sampling and pulse counting from ignition coils, and the USART interfaces to Bluetooth OBD-II bridges for telemetry displays. The DIP-18 package is easy to swap in and out of vehicle-mounted enclosures, and the analog comparators detect zero-crossing events from inductive pickup coils. For production automotive designs, Microchip recommends migrating to AEC-Q100-qualified PIC16F variants; the PIC16F628A-I/P industrial temperature variant is the typical upgrade for underhood environments.

📱

Low-Cost Consumer Appliance Control

The PIC16F628-04/P's combination of 3.5 KB Flash, 128-byte EEPROM, and built-in peripherals makes it a cost-effective controller for small consumer appliances such as coffee makers, bread machines, fans, and decorative LED strips. The 18-pin DIP variant is favored for low-volume appliance products and white-goods field serviceability, where the through-hole package withstands thermal cycling and mechanical stress better than fine-pitch SMD. The internal 4 MHz oscillator keeps the BOM small, the USART enables firmware update via the appliance's USB-to-serial bridge, and the analog comparators can detect zero-crossing of the AC line for triac dimming. The PIC16F628-04/P's deterministic 200 ns instruction cycle simplifies coding of state machines that drive relays, solenoids, and seven-segment displays.

Recommended Products Summary

PG164140 PICkit 4 programmer for ICSP development Used in: Hobbyist & Educational Projects MPLAB X IDE Free Microchip development environment Used in: Hobbyist & Educational Projects MAX232 RS-232 line driver for USART interface Used in: Industrial Control Replacement Boards PIC16F628A-I/P Microchip Technology Used in: Industrial Control Replacement Boards, Battery-Powered Sensor Nodes, Automotive Aftermarket & Hobbyist Vehicles MCP9700 Low-power analog temperature sensor for the analog comparator Used in: Battery-Powered Sensor Nodes ULN2003A Darlington driver for relay/solenoid loads Used in: Simple Motor & Lighting Controllers IRF540N N-channel MOSFET for PWM motor switching Used in: Simple Motor & Lighting Controllers LM358 Op-amp for sensor signal conditioning Used in: Automotive Aftermarket & Hobbyist Vehicles MOC3021 Optoisolator/triac driver for AC load switching Used in: Low-Cost Consumer Appliance Control PIC16F648A-I/P Pin-compatible 7.2 KB Flash upgrade for feature expansion Used in: Low-Cost Consumer Appliance Control
What is the program memory size of PIC16F628-04/P?
The PIC16F628-04/P has 3.5 KB of Flash program memory organized as 2K x 14-bit words, plus 224 bytes of RAM and 128 bytes of EEPROM. According to the Microchip PIC16F628 datasheet (DS41190), the Flash is rated for at least 1,000 erase/write cycles, and in-circuit serial programming (ICSP) lets you update firmware in the field via the RB6/RB7 pins.
What is the maximum oscillator frequency of PIC16F628-04/P?
The -04 speed grade of the PIC16F628 limits the external oscillator input to 4 MHz, yielding a 200 ns instruction cycle. The same silicon is also offered in the -20 speed grade (PIC16F628-20/P) which supports up to 20 MHz. Both grades share identical pinout and peripheral set, so firmware can be reused across grades with no code changes.
What is the difference between PIC16F628-04/P and PIC16F628A-I/P?
The PIC16F628A-I/P is the "A" revision of the same silicon, manufactured on a smaller process node and offering nanowatt power management, brown-out reset improvements, and an internal oscillator rated to 20 MHz. Both parts are pin-compatible DIP-18 devices, so the PIC16F628A-I/P is a drop-in replacement on the same PCB footprint and provides higher clock headroom.
Is the PIC16F628-04/P still in production?
Microchip lists the PIC16F628 family as "Not Recommended for new designs" (NRND) on its product page and recommends migrating to the newer PIC16F15244 family. Per the September 2026 verified distributor listings, the PIC16F628-04/P remains orderable from authorized distributors for legacy support, but new designs should use the recommended replacement.
Where can I buy PIC16F628-04/P online?
As of 2026-09-21, PIC16F628-04/P is in stock at DigiKey (per their product page 362645) and LCSC Electronics, with pricing starting around $3.84 each at quantity 1. Lead time at authorized distributors is typically same-day to 5 business days for small quantities, and 8-12 weeks for factory-direct volume orders.
What is the lead time for PIC16F628-04/P?
Lead time for the PIC16F628-04/P as of 2026-09-21 is typically 5 business days from authorized distributors like DigiKey and Mouser for stock-on-hand quantities, and approximately 8-12 weeks for factory-direct orders. Because the part is NRND, large-volume production runs should be qualified to the recommended PIC16F15244 replacement well before the PIC16F628-04/P reaches end-of-life.
PIC16F628-04/P vs PIC16F88 - which is better for a new hobbyist project?
The PIC16F628-04/P is the better choice when you need the simplest DIP-18 footprint with 35 instructions and a 4 MHz ceiling for deterministic timing. The PIC16F88 offers more peripherals (10-bit ADC, more PWM) but a 28-pin footprint and 20 MHz maximum. Per the Microchip PIC16 datasheet family guide, hobbyists typically pick the PIC16F628 for "blink-an-LED" learning projects and graduate to the PIC16F88 for analog-rich designs.
When should I choose PIC16F628-04/P over PIC16F84A?
Choose the PIC16F628-04/P when you need a true drop-in upgrade from the legacy PIC16F84A: the PIC16F628 quadruples the Flash (3.5 KB vs 1.75 KB), adds 128 bytes of EEPROM, dual analog comparators, a USART, and a CCP module, all on the same 18-pin pinout. Per Microchip migration documents, the PIC16F628 is the standard PIC16F84A replacement except in designs that rely on RB0 as an external interrupt edge-trigger source.
What is the best drop-in replacement for PIC16F628-04/P?
The best drop-in replacement for the PIC16F628-04/P is the PIC16F628A-I/P from the same Microchip family, sharing the DIP-18 package and pinout, but offering an upgraded 20 MHz internal oscillator and nanowatt Sleep modes. Per the FindMyChip cross-reference, the PIC16F628-04I/P (industrial temperature range variant) is another verified drop-in substitute on the same footprint with -40C to +85C support.
Where to download PIC16F628-04/P datasheet PDF?
The official Microchip PIC16F628 datasheet (document number DS41190) is available at ww1.microchip.com/downloads/en/DeviceDoc/41190F.pdf and is approximately 160 pages. The Microchip product page (microchip.com/en-us/product/PIC16F628) also links to errata, application notes, and MPLAB X IDE support files for the PIC16F628-04/P.
Where to find the PIC16F628-04/P pinout diagram?
The PIC16F628-04/P pinout for the 18-pin PDIP package is published on page 6 of the Microchip datasheet (DS41190). Pin 1 is RA2/AN2 (top-left when the notch is up); the package carries VDD on pin 14, VSS on pin 5, RA0-RA7 on pins 17, 18, 1, 2, 3, 4, 15, 16, and RB0-RB7 on pins 6, 7, 8, 9, 10, 11, 12, 13. RB6 and RB7 double as ICSP programming pins.
Is the PIC16F628-04/P RoHS compliant?
Yes, the PIC16F628-04/P is RoHS-compliant and lead-free per its DigiKey product listing (DigiKey part number 362645), which marks the package as "Pb-free." The original "/P" suffix historically denoted a plastic DIP, but current production runs use lead-free matte-tin plating compliant with EU RoHS Directive 2011/65/EU and REACH SVHC requirements.
Can I program PIC16F628-04/P with MPLAB X IDE?
Yes, the PIC16F628-04/P is fully supported by Microchip's free MPLAB X IDE and the XC8 C compiler. Per Microchip's PIC16F628 product page, you can program the device using the PICkit 3, PICkit 4, PICkit 5 in-circuit debugger/programmer via the ICSP pins (RB6/RB7, plus VPP/MCLR), and MPLAB X provides device-specific header files, peripheral libraries, and debugging support.
What is the price of PIC16F628-04/P?
As of 2026-09-21, the PIC16F628-04/P unit price starts at approximately $3.84 for qty 1 at LCSC Electronics, with quantity pricing dropping to roughly $2.35 at 1000 units from authorized distributors like DigiKey and Mouser. Volume pricing for OEM production lines is typically negotiated directly with Microchip; because the part is NRND, expect distributor stock to decline over the next 12-24 months.
Hey Google, what Microchip equivalent can replace PIC16F628-04/P?
Per FindMyChip's verified cross-reference, the direct Microchip equivalents for PIC16F628-04/P include PIC16F628-04I/P (industrial -40C to +85C, same DIP-18 footprint), PIC16F628A-I/P (enhanced nanowatt silicon, 20 MHz, same DIP-18), and PIC16F627-04/P (similar family, 1.75 KB Flash, same DIP-18). All three are drop-in compatible on the same 18-pin through-hole footprint with no PCB rework required.

Engineering reference data for PIC16F628-04/P — comparison, design guidance, and compliance information.

Selection Guide

Choose the PIC16F628-04/P when you need a low-cost, through-hole 8-bit Flash MCU for educational projects, breadboard prototypes, or legacy industrial replacement boards at a 4 MHz clock ceiling. The DIP-18 package is the deciding factor for through-hole manufacturing and field-serviceable designs. Choose the PIC16F628-04I/P if your design must operate from -40C to +85C (industrial temperature range). Choose the PIC16F628A-I/P if you need higher oscillator headroom (20 MHz), the on-chip enhanced USART for LIN bus, or lower Sleep power (nanowatt silicon). Choose the PIC16F648A-I/P if your firmware has outgrown 3.5 KB of Flash and needs 7.2 KB on the same 18-pin footprint. Avoid the PIC16F84A-04/P for new designs - its 1.75 KB Flash and missing USART limit upgrade paths. New production designs targeting long-term availability should migrate to the recommended PIC16F15244 family per Microchip's NRND guidance.

Comparison with Alternatives

Parameter This Product PIC16F628-04I/P PIC16F628A-I/P PIC16F627-04/P PIC16F84A-04/P PIC16F648A-I/P
Package DIP-18 DIP-18 (same) DIP-18 (same) DIP-18 (same) DIP-18 (same) DIP-18 (same)
Brand Microchip Technology Microchip Technology (same) Microchip Technology (same) Microchip Technology (same) Microchip Technology (same) Microchip Technology (same)
Program Flash 3.5 KB 3.5 KB (same) 3.5 KB (same) 1.75 KB 1.75 KB 7.2 KB
RAM 224 bytes 224 bytes (same) 224 bytes (same) 128 bytes 68 bytes 256 bytes
EEPROM 128 bytes 128 bytes (same) 128 bytes (same) 128 bytes (same) 64 bytes 256 bytes
Max Oscillator Frequency 4 MHz 4 MHz (same) 20 MHz 4 MHz (same) 4 MHz (same) 20 MHz
Operating Temperature 0C to +70C (commercial) -40C to +85C (industrial) -40C to +85C (industrial) 0C to +70C (commercial) 0C to +70C (commercial) -40C to +85C (industrial)
USART 1 enhanced USART 1 enhanced USART (same) 1 enhanced USART (same) 1 enhanced USART (same) None 1 enhanced USART (same)
Internal Oscillator 4 MHz internal RC 4 MHz internal RC (same) 4 MHz internal RC 4 MHz internal RC (same) None (external only) 4 MHz internal RC
Price Tier (qty 1) $3.84 $3.90 (est.) $3.50 (est.) $3.20 (est.) $3.00 (est.) $4.10 (est.)

Key Differentiators

  • Industrial temperature range option with identical silicon (vs PIC16F628-04I/P)
  • 20 MHz oscillator ceiling and nanowatt Sleep modes (vs PIC16F628A-I/P)
  • 2x larger Flash for future code growth (vs PIC16F648A-I/P)

Design Notes

Never pull the MCLR pin (pin 4) directly to VDD without a series resistor (typically 10 kohm). The MCLR/VPP pin doubles as the programming voltage input, and ICSP programmers drive this pin to ~13 V during erase/program. Always include the ICSP connector footprint on your PCB even if you program the part in a ZIF socket; field firmware updates without ICSP require desoldering the MCU. The RB6/ICSPCLK and RB7/ICSPDAT pins must be left in their default state during programming, so avoid tying them directly to VDD or VSS with low-impedance paths.

Place the 100 nF decoupling capacitor on VDD (pin 14) within 5 mm of the package, using a short, wide trace. For designs using the internal 4 MHz oscillator, an additional 10 uF bulk capacitor is recommended on the VDD rail. When using an external crystal or resonator, keep the trace between OSC1/OSC2 and the load capacitors under 10 mm and surround the oscillator circuit with a grounded copper pour to keep stray capacitance stable across temperature. For battery-powered designs, add a 100 kohm pull-up on MCLR so the device exits reset cleanly on power-up.

The USART pins RB1/RX and RB2/TX (pins 7 and 8) are shared with synchronous data/clock functions and are not 5V-tolerant when the MCU runs above 5.5 V. When interfacing the PIC16F628-04/P to RS-232 transceivers like the MAX232, ensure the MAX232 VCC matches the MCU VDD (typically 5 V). For RS-485 applications, add a 120 ohm termination resistor only at the cable ends, not at every node, and bias the A/B lines with a 680 ohm pull-up/pull-down divider to keep the line in a defined idle state. Long-distance runs (>1 m) should use shielded twisted pair with the shield grounded at one end only.

The PIC16F628-04/P draws approximately 2 mA at 4 MHz and 5 V with all peripherals active, dropping to < 1 uA in Sleep mode. Estimated: at 4.5 V VDD and 4 MHz oscillator, with USART enabled and Timer1 active, supply current is roughly 2.5 mA; disabling unused peripherals via the PCON register can reduce this by 30-50%. Brown-out Reset (BOR) should be enabled in the configuration word to prevent code corruption during slow VDD rise times; the BOR threshold is typically 4.5 V, which is appropriate for 5 V designs but may need to be lowered for 3.3 V battery operation.

Compliance Information

RoHS
Compliant
REACH
Compliant
AEC-Q100
Not Qualified
Lead Free
Yes
Halogen Free
Unknown
Conflict Minerals
Compliant

RoHS-compliant lead-free per DigiKey listing 362645. Not AEC-Q100 qualified - use AEC-Q100 PIC variants for automotive production. Microchip's standard conflict-minerals disclosure applies.

Data verified on: 2026-09-21 — data verified and curated by XAIPART's component engineering team

Related Searches

PIC16F628-04/P PIC16F628-04/P datasheet Microchip PIC16F628-04/P 8-bit Flash microcontroller DIP-18 PIC16F628 DIP-18 pinout PIC16F628-04/P hobbyist project PIC16F628 vs PIC16F84A PIC16F628 drop-in replacement PIC16F628-04/P buy online price what is the maximum oscillator of PIC16F628 PIC16F628-04/P programming ICSP PIC16F628A upgrade compatibility PIC16F628-04/P lead time stock PIC16F628 MPLAB X XC8 beginner PIC16F628A-I/P industrial temperature

Related Components & Terms

Microchip Technology PIC16F628-04/P PIC16F628-04I/P PIC16F628A-I/P PIC16F627-04/P PIC16F84A-04/P PIC16F648A-I/P PIC16 mid-range family 8-bit RISC microcontroller PIC microcontroller Harvard architecture Flash program memory EEPROM data memory DIP-18 PDIP-18 through-hole package RoHS compliant ICSP in-circuit serial programming MPLAB X IDE XC8 C compiler PICkit programmer USART CCP module PWM analog comparator MCLR reset AEC-Q100
Quick Quote RFQ
Fill in complete details — our sales team will respond within 24 hours
Part Number Manufacturer Package QTY Target Price Extended
Total: $0.00 USD
Quote submitted!

We will respond to your email within 24 hours

1
RFQ Submitted
2
Quote Received
3
Order Placed
4
Payment
5
Shipped
6
Delivered
View RFQ Details