PIC16F628T-20/SO - 20MHz 8-Bit Flash MCU 3.5KB | Microchip
MPN: PIC16F628T-20/SO ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.45 | $3.45 |
| 10 | $3.1 | $31.00 |
| 100 | $2.75 | $275.00 |
| 500 | $2.42 | $1,210.00 |
| 1,000 | $2.18 | $2,180.00 |
PIC16F628T-20/SO Overview
A PIC microcontroller (peripheral interface controller) is a family of 8-bit, 16-bit, and 32-bit RISC microcontrollers built around a Harvard architecture with separate program and data buses. The PIC16F628 belongs to the mid-range PIC16 family, which uses a 14-bit instruction word optimized for deterministic, single-cycle execution. PIC MCUs sit within the broader taxonomy of embedded microcontrollers, sitting beneath ARM Cortex-M and AVR families but offering lower cost, simpler toolchains, and wide availability for cost-sensitive embedded designs.
Key differentiating specifications include 3.3V/5V dual-voltage operation, hardware USART for serial communication, 16 I/O pins with 25 mA sink/source capability for direct LED drive, capture/compare/PWM (CCP) module, and nanoWatt power management for low-power sleep modes. The integrated VREF module eliminates external reference components in comparator-based designs. The 18-pin SOIC package provides drop-in compatibility with the broader PIC16F62X and PIC16F628A family while enabling surface-mount manufacturing.
Typical applications include consumer appliance control, automotive body electronics, lighting controllers, sensor signal conditioning, and battery-powered remote controls. Industrial uses span small motor control loops, security alarm panels, and HVAC damper actuators. The combination of low-cost, on-chip EEPROM, USART, and analog comparators makes it well suited to designs that previously required multiple discrete ICs.
When designing with this part, place a 100 nF decoupling capacitor within 5 mm of VDD and tie the MCLR pin to VDD through a 10 kohm resistor to ensure clean reset behavior. Verify the oscillator configuration bits match your crystal or resonator choice; using the internal 4 MHz oscillator eliminates two external pins.
Drop-in alternatives for PIC16F628T-20/SO — 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 PIC16F628T-20/SO (same form factor and footprint) — differing in Package, Internal Oscillator, Operating Temperature, Core Architecture, I/O Pins.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F628A-I/SO
✅ Drop-In✓ In Stock
$2.32 / Unit
View Datasheet →PIC16F628AT-I/SO
✅ Drop-In✓ In Stock
$1.92 / Unit
View Datasheet →PIC16F628T-04/SO
✅ Drop-In✓ In Stock
$2.2 / Unit
View Datasheet →PIC16F628-20/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F628-04/SO
✅ Drop-In✓ In Stock
$1.05 / Unit
View Datasheet →PIC16F628T-04I/SO
✅ Drop-In✓ In Stock
$1.82 / Unit
View Datasheet →PIC16F627A-I/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F648A-I/SO
✅ Drop-In✓ In Stock
$2.1 / Unit
View Datasheet →PIC16F628T-20/SO Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC 8-bit RISC (Harvard) |
| Program Memory (Flash) | 3.5 KB (2K x 14) |
| RAM | 224 bytes |
| EEPROM | 128 bytes |
| Maximum Clock Speed | 20 MHz |
| Operating Voltage | 3.0 V to 5.5 V (3.3 V / 5 V nominal) |
| I/O Pins | 16 |
| Analog Comparators | 2 with programmable VREF |
| Timers | Timer0, Timer1, Timer2 |
| CCP Module | 1 (Capture / Compare / PWM) |
| Communication | USART (hardware) |
| Package | 18-pin SOIC (SO) W, Tape and Reel |
| Mounting Type | Surface Mount |
| Operating Temperature | -40C to +85C (industrial) |
| Instruction Set | 35 instructions, 14-bit word |
| I/O Sink/Source Current | 25 mA per pin |
PIC16F628T-20/SO Pin Configuration
| Pin 1 | RA5/SS — Digital I/O / SPI slave select |
| Pin 2 | RA4/T0CKI — Digital I/O / Timer0 clock input |
| Pin 3 | RA3 — Digital I/O |
| Pin 4 | RA2/AN2/CVREF — Digital I/O / analog input 2 / comparator VREF output |
| Pin 5 | RA1/AN1 — Digital I/O / analog input 1 |
| Pin 6 | RA0/AN0 — Digital I/O / analog input 0 |
| Pin 7 | VSS — Ground reference |
| Pin 8 | OSC2/CLKOUT — Crystal output / clock out |
| Pin 9 | OSC1/CLKIN — Crystal input / external clock |
| Pin 10 | RC7/RX/DT — Digital I/O / USART RX / sync data |
| Pin 11 | RC6/TX/CK — Digital I/O / USART TX / sync clock |
| Pin 12 | RC5 — Digital I/O |
| Pin 13 | RC4 — Digital I/O |
| Pin 14 | RC3 — Digital I/O |
| Pin 15 | RC2/CCP1 — Digital I/O / CCP1 PWM output |
| Pin 16 | RC1 — Digital I/O |
| Pin 17 | RC0 — Digital I/O |
| Pin 18 | VDD — Positive supply (3.0 V to 5.5 V) |
Typical Applications
PIC16F628T-20/SO is suitable for 7 applications: Consumer Appliance Control, Industrial Sensor Signal Conditioning, Lighting Control and LED Drivers, Security and Alarm Panel Logic, Automotive Body Electronics, Battery-Powered Remote Controls, HVAC Damper and Valve Actuators.
Consumer Appliance Control
The PIC16F628T-20/SO is well suited for consumer appliance control boards such as washing machines, microwave ovens, and dishwasher controllers. Its 3.5 KB flash holds small state-machine firmware, while the 16 I/O pins with 25 mA sink/source capability directly drive relay coils, triac optocouplers, and seven-segment LED displays without external drivers. The hardware USART interfaces to inverter modules, and the two analog comparators monitor line voltage zero-cross for triac phase-angle firing. With 3.0-5.5 V operation it handles both 3.3 V and 5 V sensor rails. The 20 MHz instruction rate easily services 60 Hz zero-cross detection and PWM-controlled motor drives.
Recommended
Industrial Sensor Signal Conditioning
The PIC16F628T-20/SO is a strong fit for industrial sensor signal conditioning front ends, particularly 4-20 mA loop transmitters, RTD conditioner boards, and bridge-amplifier output digitizers. The two on-chip analog comparators with programmable VREF handle threshold detection and window comparison without external analog ICs, while the 20 MHz core reads comparator outputs and drives isolated serial links via the hardware USART. The 128-byte EEPROM stores calibration coefficients that survive power cycling. The 18-pin SOIC package fits compact sensor housings, and the -40C to +85C industrial temperature range covers factory-floor and outdoor enclosures. Pair with a precision op-amp such as the MCP6002 for full signal chain.
Recommended
Lighting Control and LED Drivers
The PIC16F628T-20/SO drives LED lighting controllers including RGB color-mixing fixtures, dimmer panels, and architectural DMX512 nodes. The CCP module generates PWM outputs up to 10-bit resolution, smoothly fading multiple LED channels simultaneously, while the 16 I/O lines with 25 mA drive directly sink low-current indicator LEDs. At 20 MHz the firmware runs DMX512 receivers, 0-10 V analog dim inputs, and capacitive touch sense on the comparator inputs. The internal oscillator option eliminates two external clock components, reducing BOM cost in high-volume lighting SKUs. The 18-pin SOIC footprint is compatible with hand-soldered retrofit boards and SMT production lines alike.
Recommended
Security and Alarm Panel Logic
The PIC16F628T-20/SO is widely deployed in security alarm panels, PIR motion-detector logic boards, and access-control keypads. Its two analog comparators detect PIR sensor analog signals, while the hardware USART communicates with central panels or wireless modules. The 16 I/O pins interface to magnetic-reed door sensors, glass-break detectors, piezo buzzers, and keypad matrices. The 128-byte EEPROM stores zone configuration, installer codes, and event logs that must survive power loss. Low-power nanoWatt sleep mode extends battery life in wireless PIR sensors. The 18-pin SOIC package drops into legacy alarm board layouts, easing end-of-life redesigns.
Recommended
Automotive Body Electronics
The PIC16F628T-20/SO handles automotive body-electronics modules including seat controllers, mirror-adjust drivers, interior lighting nodes, and HVAC damper actuators. Its 16 I/O lines with 25 mA drive interface to H-bridge motor drivers and LED arrays, while the hardware USART carries LIN-bus or K-line diagnostic traffic. The industrial temperature range (-40C to +85C) covers most cabin environments, though under-hood applications should select the PIC16F628AT-I/SO for full -40C to +125C. The CCP module generates PWM for variable-speed blower and mirror-fold motors. Three timer modules handle watchdog, debounce, and PWM tasks in parallel without burdening the main loop.
Recommended
Battery-Powered Remote Controls
The PIC16F628T-20/SO powers battery-operated remote controls such as RF key fobs, IR universal remotes, and wireless sensor node controllers. Its nanoWatt power-management modes drop quiescent current into the microampere range during sleep, extending coin-cell battery life to multiple years. The two analog comparators wake the MCU on external events such as button presses or sensor threshold crossings, eliminating continuous polling. The hardware USART drives 433 MHz or 2.4 GHz radio modules for one-way or two-way RF links. At 3.0 V minimum operation, the part runs directly from two AA cells without boost converters. The 18-pin SOIC footprint supports both hand-soldered prototypes and high-volume SMT manufacturing.
Recommended
HVAC Damper and Valve Actuators
The PIC16F628T-20/SO controls HVAC damper and valve actuators in building automation, zone-control thermostats, and hydronic radiator valves. Its two analog comparators read thermistor networks and potentiometer position feedback, while the CCP module drives a low-side MOSFET or solid-state relay for proportional valve control. The hardware USART interfaces to BACnet, Modbus, or proprietary building-automation networks. The 128-byte EEPROM stores calibration curves and last-position memory for fail-safe operation after power interruption. The 18-pin SOIC package and -40C to +85C industrial range handle plenum-mount and outdoor installations. Low-power sleep modes are critical for battery-backed or energy-harvesting valve nodes.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F628T-20/SO — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F628A-I/SO | PIC16F628AT-I/SO | PIC16F628T-04/SO | PIC16F648A-I/SO |
|---|---|---|---|---|---|
| Package | SOIC-18 (W) Tape & Reel | SOIC-18 - same | SOIC-18 - same | SOIC-18 - same | SOIC-18 - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 3.5 KB | 7 KB | 7 KB | 3.5 KB | 7 KB |
| Maximum Clock Speed | 20 MHz | 20 MHz | 20 MHz | 4 MHz | 20 MHz |
| RAM | 224 B | 224 B | 224 B | 224 B | 256 B |
| EEPROM | 128 B | 128 B | 128 B | 128 B | 256 B |
| Operating Temperature | -40C to +85C | -40C to +85C | -40C to +125C | 0C to +70C | -40C to +85C |
| A/D Converter | None | None | None | None | 10-bit |
| Internal Oscillator | No (external crystal required) | Yes, 4 MHz | Yes, 4 MHz | No | Yes, 4 MHz |
Key Differentiators
- Enhanced 'A' revision offers 7 KB flash and internal oscillator (vs PIC16F628A-I/SO)
- Automotive-grade temperature option available (vs PIC16F628AT-I/SO)
- Lower-cost 4 MHz option for throughput-tolerant designs (vs PIC16F628T-04/SO)
Design Notes
Place a 100 nF decoupling capacitor as close as physically possible to the VDD pin (pin 18) and VSS pin (pin 8), ideally within 5 mm trace length. For designs with significant digital switching or analog sensor inputs, add a bulk 10 uF tantalum or ceramic capacitor on the VDD rail near the MCU. The PIC16F628T-20/SO draws approximately 10-15 mA active at 20 MHz and 5 V; sleep current drops below 1 uA in nanoWatt mode. Tie the MCLR pin (not present as a discrete pin on 18-pin SOIC; handled internally on this part) to VDD through a 10 kohm resistor unless external reset is required. Brown-out reset should be enabled via configuration bits to protect against low-voltage firmware corruption.
Choose the oscillator configuration bit carefully: HS mode supports 20 MHz crystals with the highest drive, XT supports up to 4 MHz, and LP supports 32 kHz watch crystals for low-power designs. For cost-sensitive designs without a crystal, configure the OSC1/OSC2 pins as digital I/O (RC0/RC1) and use the internal 4 MHz RC oscillator available on the 'A' revision variants. If using an external crystal, keep the load capacitors (typically 15-33 pF) close to the OSC1 and OSC2 pins and route traces over a continuous ground plane to minimize EMI and clock jitter.
Three common pitfalls when designing with the PIC16F628T-20/SO: (1) forgetting to set the watchdog timer configuration bit can leave WDT enabled by default, causing unexpected resets every ~18 ms; (2) configuring RB3/RB4 as analog inputs without clearing the CMCON register leaves the comparators connected and prevents digital I/O operation; (3) using PGM (low-voltage programming) mode accidentally via the LVP configuration bit can cause the MCU to enter programming mode if pin RB4 is pulled low at power-up. Always read the configuration bits table in section 14 of the datasheet before locking the part for production.
The PIC16F628T-20/SO digital outputs have limited 25 mA sink/source capability. For driving higher-current loads such as relays, solenoids, or LED arrays, use an external driver transistor (e.g., BC847 NPN) or MOSFET (e.g., 2N7002) and clamp inductive loads with a flyback diode. Keep high-current switching traces short and isolated from sensitive analog comparator inputs. When using the USART at high baud rates (above 57600 bps), ensure the clock source has less than 0.5% frequency error and route the TX/RX traces over a continuous ground plane to minimize reflections on the asynchronous serial link.
Compliance Information
RoHS and REACH compliant per Microchip product page DS41191. Not AEC-Q100 qualified - choose PIC16F628AT-I/SO for automotive-grade designs. Lead-free and halogen-free packaging.