This article will discuss the PIC16F628A microcontroller, including its pinout, specifications, internal features, circuit implementation, equivalent models, applications, and more.

The PIC16F628A is an 8-bit Flash-based microcontroller from Microchip Technology, designed for low-cost and high-performance embedded control. It belongs to the PIC16F62X family and uses an advanced RISC architecture with separate instruction and data buses based on the Harvard design. This structure allows fast execution with a two-stage instruction pipeline and 35 compact instructions, where most operations are completed in a single cycle.
The device can operate at speeds up to 20 MHz and includes an 8-level hardware stack, multiple addressing modes, and several integrated system features. It supports both internal and external oscillator options, including a precision 4 MHz internal oscillator and a low-power 48 kHz oscillator. The microcontroller also integrates memory, timers, comparators, serial communication, and programmable I/O pins within a compact 18-pin package, helping reduce system complexity and external components.
If you are interested in purchasing the PIC16F628A, feel free to contact us for pricing and availability.



PIC16F628A-I/P symbol, footprint, 3d model.

| Pin No. | Pin Name | Description |
| 1 | RA2 / AN2 / VREF | Port A pin 2, analog input channel 2, or voltage reference input |
| 2 | RA3 / AN3 / CMP1 | Port A pin 3, analog input channel 3, or comparator input |
| 3 | RA4 / T0CKI / CMP2 | Port A pin 4, Timer0 clock input, or comparator input |
| 4 | RA5 / MCLR / VPP | Master Clear (reset) input or programming voltage input |
| 5 | VSS | Ground reference |
| 6 | RB0 / INT | Port B pin 0, external interrupt input |
| 7 | RB1 / RX / DT | USART receive data pin |
| 8 | RB2 / TX / CK | USART transmit data or clock pin |
| 9 | RB3 / CCP1 | Capture/Compare/PWM module output |
| 10 | RB4 / PGM | Port B pin 4 or low-voltage programming input |
| 11 | RB5 | General-purpose digital I/O pin |
| 12 | RB6 / T1OSO / T1CKI / PGC | Timer1 oscillator output, Timer1 clock input, or programming clock |
| 13 | RB7 / T1OSI / PGD | Timer1 oscillator input or programming data |
| 14 | VDD | Positive power supply |
| 15 | RA6 / OSC2 / CLKOUT | Oscillator output or system clock output |
| 16 | RA7 / OSC1 / CLKIN | Oscillator input or external clock input |
| 17 | RA0 / AN0 | Port A pin 0, analog input channel 0 |
| 18 | RA1 / AN1 | Port A pin 1, analog input channel 1 |
• PIC16F627A
• PIC16F648A
• PIC16F88
• PIC16F84A
• PIC16F819
• PIC16F1827
| Part Number | Package Type | Temperature Range | Description |
| PIC16F628A-I/P | 18-pin DIP | -40°C to +85°C | Industrial grade, through-hole package |
| PIC16F628A-I/SO | 18-pin SOIC | -40°C to +85°C | Industrial grade, surface-mount package |
| PIC16F628A-I/SS | 18-pin SSOP | -40°C to +85°C | Industrial grade, compact surface-mount package |
| PIC16F628A-E/P | 18-pin DIP | -40°C to +125°C | Extended temperature range, through-hole package |
| PIC16F628A-E/SO | 18-pin SOIC | -40°C to +125°C | Extended temperature range, surface-mount package |

A basic breadboard module circuit for the PIC16F628A microcontroller. The chip is powered using +5 V (VDD) and ground (VSS), with a 0.1 µF capacitor placed across the power lines to stabilize the voltage and reduce electrical noise. This helps the microcontroller operate reliably during program execution.
A 4.0 MHz crystal oscillator connected to RA6 and RA7 provides the clock signal needed for the microcontroller to run its instructions. Two 22 pF capacitors support the crystal to keep the clock signal stable. The MCLR pin uses a 10 kΩ pull-up resistor and a reset button, allowing the microcontroller to restart when needed.
The circuit also includes an ICSP programming header, which allows the microcontroller to be programmed directly on the board. A power LED with a 470 Ω resistor indicates when the board is powered. The RA and RB pins are exposed as headers so external devices can easily connect to the microcontroller.

| Parameter | Specification |
| Manufacturer | Microchip Technology |
| Core Architecture | 8-bit RISC |
| Maximum Operating Frequency | 20 MHz |
| Program Memory | 2048 × 14 Flash |
| RAM Data Memory | 224 bytes |
| EEPROM Data Memory | 128 bytes |
| Instruction Set | 35 instructions |
| Hardware Stack Depth | 8 levels |
| I/O Pins | 16 |
| Timers | Timer0 (8-bit), Timer1 (16-bit), Timer2 (8-bit) |
| PWM Module | 10-bit CCP1 |
| Analog Comparators | 2 |
| Serial Communication | USART |
| Interrupt Sources | 10 |
| Internal Oscillator | 4 MHz calibrated |
| Low-Power Oscillator | 48 kHz |
| Operating Voltage Range | 2.0 V – 5.5 V |
| Brown-Out Reset | Yes |
| Watchdog Timer | Yes |
| Power-on Reset | Yes |
| Flash Endurance | 100,000 write cycles |
| EEPROM Endurance | 1,000,000 write cycles |
| Data Retention | 40 years |
| Operating Temperature | −40°C to +125°C |
| Storage Temperature | −65°C to +150°C |
| Maximum Output Current per I/O Pin | 25 mA |
| Maximum Power Dissipation | 800 mW |
| Packages | 18-pin DIP, SOIC, SSOP, 28-pin QFN |
The PIC16F628A uses a high-performance RISC CPU that allows fast and efficient program execution. It can operate at speeds from DC up to 20 MHz, making it suitable for many embedded applications. The device includes an 8-level deep hardware stack and supports direct, indirect, and relative addressing modes. It also provides 35 single-word instructions, and most instructions are completed in a single clock cycle, except for branch instructions.
The PIC16F628A includes many built-in features that simplify system design. It supports both internal and external oscillator options, including a factory-calibrated 4 MHz internal oscillator and a low-power 48 kHz oscillator. The microcontroller also provides sleep mode for power saving, programmable weak pull-ups on PORTB, and a multiplexed Master Clear/Input pin. Other important functions include watchdog timer protection, low-voltage programming, in-circuit serial programming, power-on reset, brown-out reset, and built-in flash and EEPROM memory with high endurance and long data retention.
The PIC16F628A is designed for low-power applications. It features very small standby and operating current levels, making it suitable for battery-powered devices. The microcontroller supports dual-speed internal oscillators, allowing the system to switch between 4 MHz and 48 kHz depending on power requirements. It also includes sleep mode and watchdog timer functions, which help reduce energy consumption while keeping the system responsive.
This microcontroller integrates several useful peripherals for embedded system design. It has 16 programmable I/O pins, each with individual direction control and high current drive capability for direct LED control. The device includes two analog comparators with selectable voltage references and externally accessible outputs. It also provides three timers, including an 8-bit Timer0, 16-bit Timer1, and 8-bit Timer2 with prescaler and postscaler options. Additionally, the PIC16F628A contains a Capture/Compare/PWM module and a USART communication interface, allowing easy serial communication with other devices.
• Data logging systems
• Embedded control modules
• Sensor interface circuits
• Timer and counter systems
• Robotics control units
• Consumer electronic controllers
• Smart energy meters
• Remote monitoring devices
• Electronic test equipment, etc.
| Feature | PIC16F628A | PIC16F84A | PIC16F88 | PIC16F648A | ATmega8 |
| Architecture | 8-bit PIC | 8-bit PIC | 8-bit PIC | 8-bit PIC | 8-bit AVR |
| Flash Memory | 2 KB | 1 KB | 4 KB | 4 KB | 8 KB |
| RAM | 224 B | 68 B | 368 B | 256 B | 1 KB |
| EEPROM | 128 B | 64 B | 256 B | 256 B | 512 B |
| I/O Pins | 16 | 13 | 16 | 16 | 23 |
| Maximum Clock | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 16 MHz |
| ADC | No | No | Yes | No | Yes |
| Serial Communication | USART | None | USART | USART | USART, SPI, I²C |
| Timers | 3 | 1 | 3 | 3 | 3 |
| Comparators | 2 | No | 2 | 2 | No |

Microchip Technology manufactures the PIC16F628A using advanced CMOS semiconductor fabrication processes designed for reliable and high-volume microcontroller production. The company’s manufacturing system covers the full process, including wafer fabrication, packaging, device assembly, and final electrical testing. Microchip applies strict quality control, automated testing, and reliability screening to ensure stable performance, long device lifespan, and consistent electrical characteristics. These manufacturing capabilities allow Microchip to deliver dependable microcontrollers with high Flash and EEPROM endurance, long data retention, and consistent quality for embedded system development.