# PIC16F628A 8-Bit Flash Microcontroller (DIP-18)

- **Manufacturer**: Microchip Technology
- **Type**: Chip
- **Year**: 2001
- **URL (German)**: https://pinoutdb.org/component/pic16f628a
- **URL (English)**: https://pinoutdb.org/en/component/pic16f628a
- **Description**: 2048W Flash, 224B SRAM, 128B EEPROM, DIP18
- **Datasheets & Links**:
  - [PIC16F628A Datasheet (PDF)](http://ww1.microchip.com/downloads/en/DeviceDoc/40300c.pdf) (datasheet)

## View: DIP-18 Top View (Package: dip)

| Pin | Signal Name | Type | Alternative Functions / Description |
| :--- | :--- | :--- | :--- |
| 1 | RA2 | Digital | RA2 — General Purpose I/O, Port A bit 2 [GPIO], AN2 — Analog Input Channel 2 for internal comparator module [Analog], Vref+ — Positive voltage reference input for comparator (when VREN bit set) [Reference] |
| 2 | RA3 | Digital | RA3 — General Purpose I/O, Port A bit 3 [GPIO], AN3 — Analog Input Channel 3 for comparator [Analog], CMP1 — Comparator 1 non-inverting (+) input [Analog] |
| 3 | RA4 | Digital | RA4 — General Purpose I/O, Port A bit 4 (open-drain output; requires external pull-up) [GPIO], T0CKI — Timer0 external clock input [Clock], CMP2 — Comparator 2 output [Output] |
| 4 | RA5 | Digital | MCLR — Master Clear Reset (Active Low); tie to VDD via 10kΩ resistor for normal operation [Reset], Vpp — High-voltage ICSP programming input (+12V) [Digital], RA5 — Input-only GPIO when MCLR enabled [GPIO] |
| 5 | VSS | Ground | System Ground (0V) — add 100nF bypass cap to VDD near pin [Ground] |
| 6 | RB0 | Digital | RB0 — General Purpose I/O, Port B bit 0 (programmable weak pull-up) [GPIO], INT — External interrupt input (rising or falling edge selectable via INTEDG bit) [Interrupt] |
| 7 | RB1 | Digital | RB1 — General Purpose I/O, Port B bit 1 [GPIO], RX — USART asynchronous receive input [UART], DT — USART synchronous data I/O [UART] |
| 8 | RB2 | Digital | RB2 — General Purpose I/O, Port B bit 2 [GPIO], TX — USART asynchronous transmit output [UART], CK — USART synchronous clock [Clock] |
| 9 | RB3 | Digital | RB3 — General Purpose I/O, Port B bit 3 [GPIO], CCP1 — Capture/Compare/PWM module 1 I/O [PWM] |
| 10 | RB4 | Digital | RB4 — General Purpose I/O, Port B bit 4 (interrupt-on-change capable) [GPIO], PGM — Low-Voltage ICSP programming mode entry (HIGH enables LVP; disable LVP bit in config to use as GPIO) [Debug] |
| 11 | RB5 | Digital | RB5 — General Purpose I/O, Port B bit 5 (interrupt-on-change capable) [GPIO] |
| 12 | RB6 | Digital | RB6 — General Purpose I/O, Port B bit 6 (interrupt-on-change capable) [GPIO], T1OSO — Timer1 crystal oscillator output [Oscillator], T1CKI — Timer1 external clock input [Clock], PGC — ICSP programming clock [Debug] |
| 13 | RB7 | Digital | RB7 — General Purpose I/O, Port B bit 7 (interrupt-on-change capable) [GPIO], T1OSI — Timer1 crystal oscillator input (connect 32.768 kHz crystal between T1OSI and T1OSO) [Oscillator], PGD — ICSP programming data [Debug] |
| 14 | VDD | Power | Positive Power Supply (+2.0V to +5.5V; add 100nF bypass cap to VSS near pin) [Power] |
| 15 | RA6 | Digital | RA6 — General Purpose I/O, Port A bit 6 (available when using internal oscillator) [GPIO], OSC2 — Crystal oscillator output (connect crystal between OSC1 and OSC2) [Oscillator], CLKOUT — Instruction clock output (Fosc/4) for external timing reference [Clock] |
| 16 | RA7 | Digital | RA7 — General Purpose I/O, Port A bit 7 (available when using internal oscillator) [GPIO], OSC1 — Crystal oscillator input (XT, HS, LP modes) [Oscillator], CLKIN — External clock input (EC mode) [Clock] |
| 17 | RA0 | Digital | RA0 — General Purpose I/O, Port A bit 0 [GPIO], AN0 — Analog Input Channel 0 for comparator module [Analog] |
| 18 | RA1 | Digital | RA1 — General Purpose I/O, Port A bit 1 [GPIO], AN1 — Analog Input Channel 1 for comparator module [Analog] |


---
Source: PinoutDatabase (https://pinoutdb.org). Verify against the manufacturer datasheet before production use.
