PIC16F628A-I/P - 8-Bit 20MHz Flash MCU | Microchip 18-PDIP
MPN: PIC16F628A-I/P β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.95 | $2.95 |
| 10 | $2.66 | $26.60 |
| 100 | $2.18 | $218.00 |
| 500 | $1.85 | $925.00 |
| 1,000 | $1.62 | $1,620.00 |
PIC16F628A-I/P Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, program and data memory, plus configurable peripherals such as timers, communications interfaces, comparators and I/O ports. The PIC16F628A belongs to the broader taxonomy 8-bit MCU -> RISC MCU -> PIC16 mid-range family -> embedded controller -> semiconductor. Its nanoWatt Technology variants add multiple power-managed modes that reduce quiescent current to the microamp range, which is critical for battery-backed designs.
Key features of the PIC16F628A-I/P include a hardware USART for serial communication, one Capture/Compare/PWM (CCP) module, two analog comparators with a programmable voltage reference, a 4 MHz internal RC oscillator, an 8-level hardware stack and 11 digital I/O pins. It also supports In-Circuit Serial Programming (ICSP) and a low-voltage programming mode, enabling firmware updates in the field without removing the device.
Architecturally the PIC16F628A uses a Harvard-style RISC core with separate program and data buses. Code runs from Flash, scratch variables live in the 224-byte SRAM and persistent settings are stored in the 128-byte EEPROM - the same partitioning introduced on the original PIC16F628 and kept for upward compatibility. Its 18-pin pinout is shared with the PIC16F627, PIC16F627A, PIC16F628, PIC16C62XA, PIC16C5X and PIC12CXXX families, which simplifies migration paths when memory size must grow.
Typical applications include automotive body and convenience modules, white-goods and appliance control boards, HVAC thermostat and sensor interfaces, industrial remote-keyed annunciators, low-cost data-acquisition front ends, hobby robotics and consumer remote controls. The internal oscillator and onboard USART make the part especially attractive where BOM cost and PCB area must be minimized.
Designers should note the -I temperature grade runs from -40C to +85C and the supply voltage range is 2.0 V to 5.5 V (Flash write requires 4.5 V minimum). Decouple VDD with a 100 nF ceramic capacitor placed within 5 mm of the pin and tie MCLR through a 10 kohm pull-up if in-system programming is desired. To reduce EMI, the internal 4 MHz oscillator can be selected over an external crystal when timing tolerance of about 1% is acceptable.
This page synthesizes DigiKey and Mouser distributor pricing, Microchip's recommended same-family drop-in alternatives, and application notes that are not present in the bare datasheet, giving engineers a faster path from selection to prototype.
Drop-in alternatives for PIC16F628A-I/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 PIC16F628A-I/P (same form factor and footprint) β differing in Package, Timers, Watchdog Timer, Operating Temperature Range, RoHS Status.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F628-04/P
β Drop-Inβ In Stock
$2.35 / Unit
View Datasheet βPIC16F627A-I/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F88-I/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F18444-I/P
β Drop-Inβ In Stock
$0.92 / Unit
View Datasheet βPIC16F628-20/P
β Drop-Inβ In Stock
$1.96 / Unit
View Datasheet βPIC16F628A-I/P Maximum Ratings & Electrical Characteristics
| Core | PIC16 8-bit RISC |
| Instruction Set | 35 single-word instructions |
| Instruction Cycle Time | 200 ns (at 20 MHz) |
| Maximum Clock Speed | 20 MHz |
| Program Memory | 3.5 KB (2K x 14) Flash |
| RAM | 224 bytes |
| EEPROM | 128 bytes |
| I/O Pins | 11 |
| Timers | 3 (TMR0, TMR1, TMR2) |
| Capture/Compare/PWM | 1 CCP module |
| Communication | USART (asynchronous / synchronous) |
| Analog Comparators | 2 with programmable voltage reference |
| Internal Oscillator | 4 MHz |
| Stack Depth | 8 levels |
| Supply Voltage | 2.0 V to 5.5 V (Flash write >= 4.5 V) |
| Operating Temperature | -40C to +85C (Industrial, -I) |
| Package | 18-pin PDIP (DIP-18, 0.300 inch) |
| Programming | ICSP, low-voltage programming, in-circuit debug |
| Brown-out Reset | Yes, programmable |
| RoHS Status | Lead-free, RoHS compliant |
PIC16F628A-I/P Pin Configuration
| Pin 1 | RA2/AN2/CVREF/VREF β GPIO RA2 / analog channel 2 / comparator voltage reference output |
| Pin 2 | RA3/AN3/C1OUT β GPIO RA3 / analog channel 3 / comparator 1 output |
| Pin 3 | RA4/AN4/T0CKI β GPIO RA4 / analog channel 4 / Timer 0 clock input |
| Pin 4 | RA5/AN5/_MCLR/VPP β GPIO RA5 / analog channel 5 / reset input (active-low) / programming |
| Pin 5 | VSS β Ground reference |
| Pin 6 | RB0/INT β GPIO RB0 / external interrupt input |
| Pin 7 | RB1/RX/DT β GPIO RB1 / USART RX / synchronous data |
| Pin 8 | RB2/TX/CK β GPIO RB2 / USART TX / synchronous clock |
| Pin 9 | RB3/CCP1 β GPIO RB3 / Capture-Compare-PWM channel 1 |
| Pin 10 | RB4/PGM β GPIO RB4 / low-voltage programming input |
| Pin 11 | RB5 β GPIO RB5 |
| Pin 12 | RB6/T1OSO/T1CKI/PGC β GPIO RB6 / Timer 1 oscillator out / T1 clock / ICD clock |
| Pin 13 | RB7/T1OSI/PGD β GPIO RB7 / Timer 1 oscillator in / ICD data |
| Pin 14 | VDD β Positive supply, 2.0 V to 5.5 V |
| Pin 15 | OSC2/CLKOUT/RA6 β Crystal oscillator output / Fosc/4 clock out / GPIO RA6 |
| Pin 16 | OSC1/CLKIN/RA7 β Crystal oscillator input / external clock in / GPIO RA7 |
| Pin 17 | RA0/AN0 β GPIO RA0 / analog channel 0 / C2 input |
| Pin 18 | RA1/AN1 β GPIO RA1 / analog channel 1 / C2 input |
Typical Applications
PIC16F628A-I/P is suitable for 6 applications: Appliance and White-Goods Control, HVAC Thermostat and Sensor Interface, Automotive Body and Convenience Modules, Industrial Remote Keyed Annunciator, Low-Cost Data-Acquisition Front End, Consumer Remote Control and Hobby Robotics.
Appliance and White-Goods Control
The PIC16F628A-I/P fits appliance control boards such as microwave ovens, washing-machine user interfaces and dishwasher timers because its 18-pin PDIP is through-hole-friendly for serviceability, its 2.0 V to 5.5 V range covers 3.3 V logic and 5 V relay coils, and the integrated USART talks to inverter boards. The CCP module drives TRIAC phase-angle control for heater regulation, while the two comparators handle zero-crossing detection for AC line synchronization. Compared with a discrete 555-timer design, the PIC16F628A reduces BOM count by 30 to 50 percent in the same PCB area.
Recommended
HVAC Thermostat and Sensor Interface
The PIC16F628A-I/P is a fit for low-cost HVAC thermostat and remote sensor panels because it operates from -40C to +85C, draws microamp-level sleep current through nanoWatt Technology, and exposes a hardware USART for networking multiple indoor units. The two analog comparators with programmable voltage reference serve as a low-cost thermistor bridge without adding an external ADC. In a battery-backed thermostat the typical 1 uA sleep current allows 5-year coin-cell lifetimes, and the EEPROM holds user set-points across power cycles.
Recommended
Automotive Body and Convenience Modules
The PIC16F628A-I/P serves automotive body controllers - door locks, seat controllers, mirror adjusters, alarm key fobs - because the -40C to +85C industrial grade handles cabin environments and the internal 4 MHz oscillator eliminates external crystals under vibration. The PWM channel drives small DC motor drivers at up to 20 kHz, and the USART links to other modules on the LIN-style sub-bus. For designs targeting AEC-Q100, pair this part with the automotive-grade PIC16F628A-E/P variant or migrate to a newer PIC16F18444 design.
Recommended
Industrial Remote Keyed Annunciator
In an industrial annunciator or alarm panel, the PIC16F628A-I/P scans up to 11 digital inputs through its I/O ports, latches events in 128 bytes of EEPROM for power-loss retention, and reports via USART to a SCADA gateway. The programmable brown-out reset protects against noisy 24 V industrial supplies, and the 200 ns instruction cycle keeps the scan rate under 1 ms for 16 inputs. Compared with PLC logic blocks, the PIC16F628A-based annunciator delivers faster response and lower unit cost at small channel counts.
Recommended
Low-Cost Data-Acquisition Front End
For a small-channel data-acquisition front end, the PIC16F628A-I/P reads two analog signals through its on-chip comparators, time-stamps events through TMR1/TMR2, and streams the results over the USART at 250 kbps. The CCP module acts as a sample-time base, while the 128-byte EEPROM stores calibration constants. Adding a low-cost external sigma-delta front end can reach 16-bit effective resolution; the 224-byte SRAM buffers the high-throughput stream before UART transmission.
Recommended
Consumer Remote Control and Hobby Robotics
The PIC16F628A-I/P powers consumer IR/RF remote controls and small hobby robots thanks to its single-chip integration of USART, CCP for servo PWM and 11 I/O for sensor fusion. The 4 MHz internal oscillator eliminates the external crystal, shrinking the BOM to one IC and a few passives. Hobby designs use the ICSP interface for in-circuit programming, while consumer remote controls use the EEPROM for pairing codes. A typical CR2032-powered IR remote fits inside a coin-cell holder with this MCU.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F628A-I/P β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F628-04/P | PIC16F627A-I/P | PIC16F88-I/P | PIC16F18444-I/P | PIC16F628-20/P |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 18-pin PDIP | 18-pin PDIP (same) | 18-pin PDIP (same) | 18-pin PDIP (same) | 18-pin PDIP (same) | 18-pin PDIP (same) |
| Program Memory (Flash) | 3.5 KB | 2 KB | 1.75 KB | 7 KB | 14 KB | 2 KB |
| Maximum Clock | 20 MHz | 4 MHz | 20 MHz | 20 MHz | 32 MHz | 20 MHz |
| RAM | 224 bytes | 224 bytes | 128 bytes | 368 bytes | 1024 bytes | 224 bytes |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 256 bytes | 256 bytes | 128 bytes |
| On-chip ADC | None | None | None | 10-bit, 7 channels | 12-bit, multiple channels | None |
| USART | Yes | Yes | Yes | Yes (AUSART) | Yes (EUSART) | Yes |
Key Differentiators
- Mid-range 8-bit PIC16 with nanoWatt low-power modes (vs PIC16F88-I/P)
- 128-byte EEPROM for non-volatile data storage (vs PIC16F627A-I/P)
- Field-upgradable via ICSP and low-voltage programming (vs PIC16F18444-I/P)
Design Notes
Decouple VDD with a 100 nF ceramic capacitor placed within 5 mm of pin 14 and connect VSS to a low-impedance ground pour. For battery operation, the PIC16F628A-I/P draws roughly 1 uA in sleep mode at 2 V thanks to nanoWatt Technology. Estimated: with a CR2032 cell rated 220 mAh, sleep current of 1 uA gives a theoretical 20+ year shelf life ignoring self-discharge.
Flash programming and EEPROM writes require VDD >= 4.5 V. Brown-out reset must be enabled in CONFIG words for any design that can brown-out at low battery; otherwise the MCU can execute garbage code during VDD sag. For ICSP, tie MCLR to VDD through a 10 kohm pull-up and isolate it from any reset supervisor that could pull MCLR low during programming.
Keep the 4 MHz crystal traces short and surrounded by a ground guard ring; switch to the internal 4 MHz oscillator if the application can tolerate ~1% frequency drift. When using the comparator inputs, route them away from the PWM outputs and USART TX line to prevent switching noise from coupling into the analog signal. The CCP1 pin (RB3) is the recommended PWM output, freeing the USART pins for serial comms.
Compliance Information
Lead-free / RoHS compliant per Microchip product page. Industrial -40C to +85C temperature grade. Not AEC-Q100 qualified; for automotive designs use the -E extended grade or migrate to PIC16F18444.