The PIC16F628A is a versatile 8-bit FLASH-based microcontroller from Microchip Technology, designed for embedded control, automation, and electronic development applications.
Featuring a compact 18-pin DIP package, the PIC16F628A combines a high-performance RISC architecture with programmable FLASH memory, EEPROM data storage, timers, comparators, and a USART communication interface.
The microcontroller supports an internal 4MHz oscillator, reducing the need for external clock components in many applications. Its low-power operation and In-Circuit Serial Programming (ICSP) capability make it suitable for educational, industrial, and DIY electronics projects.
Key Features
-
8-Bit RISC Architecture: Efficient instruction execution with a compact instruction set.
-
FLASH Program Memory: Reprogrammable memory for firmware development.
-
4MHz Internal Oscillator: Allows operation without an external crystal in supported configurations.
-
Up to 20MHz Clock Frequency: Supports higher-speed operation using an appropriate external clock source.
-
128 Bytes EEPROM: Non-volatile memory for storing configuration settings and application data.
-
224 Bytes SRAM: Internal data memory for program execution.
-
16 I/O Pins: Configurable general-purpose input/output pins, subject to peripheral and configuration settings.
-
USART Interface: Supports asynchronous serial communication.
-
Capture/Compare/PWM Module: Suitable for timing and PWM control applications.
-
Two Analog Comparators: Enable analog signal comparison.
-
Programmable Voltage Reference: Supports comparator applications.
-
Watchdog Timer: Improves reliability in embedded applications.
-
Brown-Out Reset (BOR): Helps protect against low-voltage operation.
-
In-Circuit Serial Programming (ICSP): Supports programming without removing the microcontroller from the circuit.
-
Low-Power Sleep Mode: Reduces power consumption when the processor is idle.
Technical Specifications
| Parameter |
Specification |
| Manufacturer |
Microchip Technology |
| Model |
PIC16F628A |
| Microcontroller Type |
8-Bit PIC |
| Architecture |
RISC |
| Program Memory |
3.5KB FLASH (2K × 14-bit words) |
| EEPROM Memory |
128 Bytes |
| SRAM |
224 Bytes |
| Maximum Clock Frequency |
20MHz |
| Internal Oscillator |
4MHz |
| Operating Voltage |
3.0V–5.5V |
| GPIO Pins |
Up to 16 |
| Timers |
Timer0, Timer1, Timer2 |
| PWM Channels |
1 (CCP Module) |
| Analog Comparators |
2 |
| Serial Communication |
USART |
| ADC |
Not Available |
| Programming Interface |
ICSP |
| Watchdog Timer |
Yes |
| Brown-Out Reset |
Yes |
| Package |
PDIP-18 |
| Mounting Type |
Through-Hole |
| Pin Count |
18 |
Pin Configuration
| Pin |
Function |
| 1 |
RA2 / AN2 / VREF |
| 2 |
RA3 / AN3 / CMP1 |
| 3 |
RA4 / T0CKI / CMP2 |
| 4 |
RA5 / MCLR / VPP |
| 5 |
VSS – Ground |
| 6 |
RB0 / INT |
| 7 |
RB1 / RX / DT |
| 8 |
RB2 / TX / CK |
| 9 |
RB3 / CCP1 |
| 10 |
RB4 / PGM |
| 11 |
RB5 |
| 12 |
RB6 / T1OSO / T1CKI |
| 13 |
RB7 / T1OSI |
| 14 |
VDD – Positive Supply |
| 15 |
RA6 / OSC2 / CLKOUT |
| 16 |
RA7 / OSC1 / CLKIN |
| 17 |
RA0 / AN0 |
| 18 |
RA1 / AN1 |
Note: Pin functions are multiplexed and depend on the selected configuration and enabled peripherals. AN0–AN3 are analog comparator inputs, not ADC channels.
Programming and Development
The PIC16F628A can be programmed using compatible Microchip PIC programmers and development tools.
Recommended Development Tools:
- MPLAB X IDE
- MPLAB XC8 Compiler
- Compatible PICkit Programmer
- ICSP Programming Interface
Programming is typically performed using the PGD, PGC, MCLR/VPP, VDD, and VSS connections.
Applications
- Embedded Control Systems
- Industrial Automation
- DIY Electronics Projects
- LED Control and Sequencing
- Relay Control Systems
- Timer and Counter Circuits
- Serial Communication Projects
- Small Robotics Projects
- Home Automation
- Educational Microcontroller Projects
- Sensor Monitoring with Digital or Comparator Inputs
- Low-Power Electronic Devices
Important Notes
-
Programming Required: The PIC16F628A must be programmed with suitable firmware before performing application-specific functions.
-
No Built-In ADC: Although the device includes analog comparators, it does not have a conventional analog-to-digital converter.
-
Clock Configuration: The internal oscillator supports 4MHz operation. Higher clock frequencies require an appropriate external clock source.
-
Voltage Compatibility: Operates from 3.0V to 5.5V. Ensure connected peripherals use compatible logic levels.
-
ICSP Programming: Requires a compatible programmer and correct programming connections.
-
Pin Multiplexing: Some GPIO pins share functions with oscillators, programming, and communication peripherals.
-
Not an Arduino Board: This is a standalone PIC microcontroller and requires a compatible PIC development environment.
Package Includes