PIC16F628-04/SO - 4MHz 8-bit Flash MCU 3.5KB | 18-SOIC
N.º de pieza: PIC16F628-04/SO ✗ Fin de vida| Cant. | Precio unitario | Total |
|---|---|---|
| 1 | $1.68 | $1,68 |
| 10 | $1.55 | $15,50 |
| 100 | $1.32 | $132,00 |
| 500 | $1.18 | $590,00 |
| 1.000 | $1.05 | $1.050,00 |
PIC16F628-04/SO Descripción general
A mid-range 8-bit microcontroller (MCU) is a single-chip computer integrating a CPU, memory, and peripherals. The PIC16F62X architecture is classified within the taxonomy: 8-bit MCU -> mid-range MCU -> RISC microcontroller -> embedded controller -> semiconductor. The "F" suffix indicates flash memory, allowing in-circuit reprogramming. This category of device is widely used in cost-sensitive embedded designs where deterministic execution, low power, and simple peripheral integration outweigh the need for high clock speed.
Key features include the 35-instruction RISC instruction set, single-cycle execution (except branches), interrupt handling, power-on reset, brown-out detection, a watchdog timer with dedicated oscillator, and a programmable code protection mechanism. Compared with earlier PIC16C5X parts, the 16F628 adds flash memory, internal oscillator calibration, and on-chip EEPROM, eliminating external program memory and reducing BOM cost for small embedded nodes.
Typical applications span consumer electronics, appliance controls, security keypads, sensor interfaces, small motor drives (gate-driven, with external FETs), lighting controllers, and hobby/educational platforms such as the PICkit 1 baseline development environment. Pin-compatible migration paths within the PIC16F62X family allow designers to scale flash, RAM, and peripherals without PCB rework.
When designing with this part, pay attention to the analog-comparator input impedance and the USART baud-rate error at low clock frequencies. Use a 4 MHz crystal or the calibrated internal 4 MHz oscillator to free board space, and reserve the MCLR pin with a 10 kΩ pull-up if in-circuit serial programming (ICSP) is needed.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes that are not consolidated in the manufacturer datasheet, giving engineers an at-a-glance engineering summary for sourcing and migration decisions.
Alternativas directas para PIC16F628-04/SO — mismo encapsulado, compatible pin a pin. Se excluyen las piezas de otro encapsulado que requieren retrabajo de la PCB.
Variantes de esta serie
Modelos de la misma serie compatibles directamente con PIC16F628-04/SO (mismo factor de forma y huella) — difiere en Package, Operating Temperature, Core Architecture, Internal Oscillator, I/O Pins.
Herramienta de comparación rápida — seleccione piezas alternativas para compararlas lado a lado:
PIC16F628A-I/SO
✅ Sustitución directa✓ En stock
$2.32 / unidad
Ver hoja de datos →PIC16F628A-E/SO
✅ Sustitución directa📋 Alternativa de referencia (no en el catálogo)
PIC16F628T-04E/SO
✅ Sustitución directa📋 Alternativa de referencia (no en el catálogo)
PIC16F627-04/SO
✅ Sustitución directa✓ En stock
$1.85 / unidad
Ver hoja de datos →PIC16F627-04I/SO
✅ Sustitución directa✓ En stock
$1.59 / unidad
Ver hoja de datos →PIC16F88-I/SO
✅ Sustitución directa📋 Alternativa de referencia (no en el catálogo)
PIC16F628-04/SO Valores máximos y características eléctricas
| Core | PIC16 mid-range 8-bit RISC |
| Instruction Set | 35 instructions, single-cycle (200 ns at 4 MHz) |
| Program Memory | 3.5 KB (2K x 14) Flash |
| Data SRAM | 224 bytes |
| Data EEPROM | 128 bytes |
| CPU Speed | 4 MHz |
| Tensión de alimentación | 3.3 V to 5.5 V (extended) / 4.5 V to 5.5 V (standard) |
| I/O Pins | 16 digital I/O |
| Analog Comparators | 2 on-chip |
| Communication | Hardware USART |
| Timers | Timer0, Timer1, Timer2 with PWM |
| Watchdog Timer | Yes, with dedicated oscillator |
| Brown-out Reset | Yes |
| Internal Oscillator | 4 MHz calibrated |
| Encapsulado | 18-pin SOIC (SO) |
| Temperatura de funcionamiento | -40°C to +85°C (industrial) |
| Tipo de montaje | Surface Mount |
| RoHS | Compliant |
Configuración de pines de PIC16F628-04/SO
| Pin 1 | RA2/AN2/VREF — Digital I/O / analog comparator input / voltage reference |
| Pin 2 | RA3/AN3/CMP1 — Digital I/O / analog comparator input / comparator 1 output |
| Pin 3 | RA4/T0CKI/CMP2 — Digital I/O (open-drain) / Timer0 clock input / comparator 2 output |
| Pin 4 | MCLR/VPP — Master clear reset (active low) / programming voltage |
| Pin 5 | VSS — Ground reference |
| Pin 6 | RB0/INT — Digital I/O / external interrupt input |
| Pin 7 | RB1/RX/DT — Digital I/O / USART RX / synchronous data |
| Pin 8 | RB2/TX/CK — Digital I/O / USART TX / synchronous clock |
| Pin 9 | RB3/CCP1 — Digital I/O / CCP1 PWM output |
| Pin 10 | RB4/PGM — Digital I/O / LVP programming pin |
| Pin 11 | RB5 — Digital I/O |
| Pin 12 | RB6/T1OSO/T1CKI/PGC — Digital I/O / Timer1 oscillator / Timer1 clock / ICSP clock |
| Pin 13 | RB7/T1OSI/PGD — Digital I/O / Timer1 oscillator / ICSP data |
| Pin 14 | VDD — Positive supply (3.3 V to 5.5 V) |
| Pin 15 | OSC2/CLKO/RA6 — Crystal oscillator output / clock output / digital I/O |
| Pin 16 | OSC1/CLKI/RA7 — Crystal oscillator input / clock input / digital I/O |
| Pin 17 | RA0/AN0 — Digital I/O / analog comparator input |
| Pin 18 | RA1/AN1 — Digital I/O / analog comparator input |
Aplicaciones típicas
PIC16F628-04/SO es adecuado para 6 aplicacións: Consumer Electronics Control Boards, Security System Keypads, Industrial Sensor Interface Modules, Small Motor and Lighting Controllers, Educational and Hobby Development Boards, Automotive Auxiliary Controllers.
Consumer Electronics Control Boards
The PIC16F628-04/SO is well suited for cost-sensitive consumer control boards such as remote-control transmitters, small appliance timers, and toy controllers. Its 3.5 KB flash accommodates compact state-machine firmware, while 16 digital I/O pins can drive LEDs, relays, and keypads directly without external glue logic. The 4 MHz CPU clock is sufficient for slow human-interface tasks like debounced button scanning at 10-100 Hz and PWM beeper tones at 1-4 kHz. The hardware USART enables diagnostics via a debug UART bridge, while the internal 4 MHz oscillator eliminates the crystal, reducing BOM cost by about $0.10 per unit. For high-volume consumer runs of tens of thousands of units, this part's simple SO-18 footprint and broad distributor support keep supply chain and SMT assembly risk low.
Recomendado
Security System Keypads
PIC16F628-04/SO fits 4x4 matrix keypad scanners in security panels and access controllers where low power, deterministic scanning, and EEPROM-backed credential storage matter. The 128-byte EEPROM supports up to 32 four-byte user codes plus configuration parameters, while the 16 I/O pins easily handle 8 keypad lines (4 rows + 4 cols) plus status LEDs, a buzzer, and a serial link to a master panel. The two on-chip analog comparators can monitor a tamper loop or backup-battery voltage without extra components. Watchdog timer and brown-out reset provide robustness against supply glitches. Designers can pair it with an external 4x4 matrix and a piezo buzzer to build a complete access module on a 30x40 mm two-layer PCB.
Recomendado
Industrial Sensor Interface Modules
In industrial sensor-interface modules, the PIC16F628-04/SO acts as a protocol translator between a 4-20 mA analog loop or a digital sensor and an RS-232/485 master. Its hardware USART directly drives RS-485 transceivers at 9600-115200 baud, while the two on-chip comparators can be configured as window detectors for sensor threshold alarms. The 224-byte RAM is enough to buffer short telemetry packets without external memory. At 4 MHz, instruction cycles of 200 ns are sufficient for deterministic response within 1 ms for typical 4-20 mA loop updates. Industrial designers appreciate the extended 3.3 V to 5.5 V supply range and the -40°C to +85°C industrial temperature rating for factory floor operation.
Recomendado
Small Motor and Lighting Controllers
For small DC-motor and LED-lighting controllers, the PIC16F628-04/SO delivers PWM generation through Timer2 plus I/O pins capable of sourcing or sinking 25 mA per pin. With a 4 MHz CPU clock the PWM resolution reaches about 10 bits at 4 kHz, adequate for LED dimming and 1-2 A brushed DC motor speed control via an external logic-level MOSFET. The hardware USART enables DMX-512-like lighting-protocol reception by interrupt, while the EEPROM stores user-defined scenes or motor profiles. The 18-pin SOIC occupies only ~80 mm² of board area, leaving ample room for power-FET footprints and decoupling capacitors on a 30x50 mm single-sided PCB.
Recomendado
Educational and Hobby Development Boards
The PIC16F628-04/SO remains a popular part in educational kits and hobby projects because of its simple 35-instruction RISC architecture and its compatibility with low-cost programmers such as the PICkit 3 and PICkit 5. The flash memory supports hundreds of erase/write cycles for student lab exercises, while the 128-byte EEPROM is enough for storing lab parameters or small data logs. Through-hole sibling PIC16F628-04/P is preferred for breadboarding, but the -04/SO SOIC variant fits compact solder-training PCBs. The internal oscillator removes a barrier for first-time learners, and the USART enables printf-style debugging to a PC terminal at 9600 baud with just three wires.
Recomendado
Automotive Auxiliary Controllers
In non-safety automotive auxiliaries such as interior lighting controllers, mirror-adjust modules, and seat-heater keypads, the PIC16F628-04/SO handles logic-level tasks at 12 V through external regulators. The 16 digital I/O pins drive relays, MOSFET gates, and indicator LEDs, while the hardware USART communicates with the body-control module via LIN or simple UART. The PIC16F627-04E/SO and PIC16F628A-E/SO are the better-specified variants for automotive thermal ranges up to +125°C. Designers should pair the MCU with a TVS-protected 5 V LDO and a reverse-battery diode for reliable in-vehicle operation across cranking transients down to 6 V.
Recomendado
Resumen de productos recomendados
Datos de referencia de ingeniería para PIC16F628-04/SO — comparación, orientación de diseño e información de cumplimiento.
Guía de selección
Comparación con alternativas
| Parámetro | Este producto | PIC16F628A-I/SO | PIC16F628A-E/SO | PIC16F627-04/SO | PIC16F88-I/SO |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 18-SOIC | 18-SOIC - same | 18-SOIC - same | 18-SOIC - same | 18-SOIC - same |
| Clock Speed | 4 MHz | 20 MHz | 20 MHz | 4 MHz | 20 MHz |
| Program Memory | 3.5 KB Flash | 3.5 KB Flash | 3.5 KB Flash | 1.75 KB Flash | 7 KB Flash |
| RAM | 224 bytes | 224 bytes | 224 bytes | 128 bytes | 368 bytes |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 256 bytes |
| ADC | None | None | None | None | 10-bit, 7 channels |
| Lifecycle | NRND | NRND | NRND | NRND | Active |
| Internal Oscillator | 4 MHz | 4 MHz calibrated | 4 MHz calibrated | 4 MHz | 8 MHz calibrated |
Diferenciadores clave
- Lowest-cost flash MCU in the PIC16F62X family (frente a PIC16F88-I/SO)
- More flash than PIC16F627 in same footprint (frente a PIC16F627-04/SO)
- NRND with active migration path to PIC16F15244 (frente a PIC16F628A-I/SO)
Notas de diseño
Estimated: at 4 MHz, 5 V supply, and full I/O load, the PIC16F628-04/SO typically draws 2-5 mA active. Add a 100 nF decoupling capacitor directly at the VDD pin (within 5 mm) and a 10 µF bulk capacitor at the regulator output. Power-on reset and brown-out reset (BOR) are enabled by configuration bits; configure BOR voltage threshold to 4.0 V or 2.5 V depending on supply rail to avoid spurious resets during 12 V battery cranking transients.
For the 18-pin SOIC package, route the ICSP signals (MCLR/VPP, PGC, PGD) to a 5-pin header so that a PICkit 3/5 can program the device in-circuit. Keep traces to MCLR short (under 25 mm) and add a 10 kΩ pull-up to VDD. Place the 4 MHz crystal (if used) within 10 mm of OSC1/OSC2 with short traces and a ground guard ring to reduce EMI coupling into adjacent analog comparator inputs.
Do not leave the MCLR pin floating - if unused as reset, tie to VDD via 10 kΩ. The RA4 pin is open-drain and cannot source current; an external pull-up is required to drive an LED high. When migrating from PIC16F84A code, the configuration word bit positions differ; recompile or hand-set the CONFIG register. Finally, verify the oscillator mode bits (HS, XT, LP, RC, INTOSC) match the hardware to avoid silent clock-startup failures.
When driving long cables from the USART, add a 100 Ω series resistor at the TX pin and a TVS diode at the connector to suppress ESD and ringing. The hardware USART can drive up to 115200 baud at 4 MHz; for higher baud rates or noise-sensitive links, switch to the PIC16F628A-I/SO which runs at 20 MHz and provides higher baud-rate resolution with smaller error.
Información de cumplimiento
Per Microchip product page: RoHS compliant, lead-free finish. Not AEC-Q100 qualified - for automotive use, prefer PIC16F628A-E/SO with extended temperature grade. Lifecycle is NRND per Microchip product page as of 2026-09-21.