PIC16F628-04E/P - 8-Bit 4MHz PIC MCU, 3.5KB Flash | Microchip
N.º de pieza: PIC16F628-04E/P ✓ Activo| Cant. | Precio unitario | Total |
|---|---|---|
| 1 | $3.85 | $3,85 |
| 10 | $3.51 | $35,10 |
| 100 | $3.18 | $318,00 |
| 500 | $2.84 | $1.420,00 |
| 1.000 | $2.55 | $2.550,00 |
PIC16F628-04E/P Descripción general
An 8-bit microcontroller (MCU) is a single-chip computer built around an 8-bit data path, optimized for embedded control tasks such as sensor reading, actuator driving, and protocol handling. Within the broader semiconductor taxonomy, MCUs belong to the microcontroller family -> embedded processor -> integrated circuit. The PIC16F62X mid-range family sits between Microchip's baseline PIC10/12/16 architectures and its enhanced PIC18 devices, providing a balance of low cost, deterministic interrupt handling, and easy migration across 6-to-100 pin packages.
Key features of the PIC16F628-04E/P include 16 programmable digital I/O pins, two analog comparators, a USART module, an internal 4 MHz RC oscillator, and a Capture/Compare/PWM (CCP) module. The on-chip peripherals reduce BOM cost and PCB area by eliminating external timing, communication, and comparator components. Brown-out Detect (BOD), Power-on Reset (POR), Power-up Timer (PWRT), Oscillator Start-up Timer (OST), and a Watchdog Timer (WDT) with its own dedicated RC oscillator ensure reliable operation in electrically noisy environments and during power transients.
The architecture uses a Harvard-design RISC core with separate program and data buses, allowing simultaneous instruction fetch and operand access. The wide operating voltage range of 3.0V to 5.5V (the "-04E" extended temperature grade spans -40C to +125C) makes the device suitable for industrial, automotive aftermarket, and consumer products where supply rails vary and temperature swings are wide.
Typical applications include HVAC thermostat control, small appliance motor control, remote sensor nodes, lighting controllers, security keypads, and low-cost industrial sensor interfaces. The combination of on-chip EEPROM and USART allows engineers to add calibration data storage and wired serial communication without an external EEPROM or transceiver IC.
When designing with this part, ensure the MCLR pin is tied to VDD through the recommended 10 kohm pull-up if hardware reset is not required, and verify that the chosen 4 MHz instruction rate (DC = 4 MHz spec; the "04" suffix) matches the timing budget; the "20" speed-grade variant runs up to 20 MHz / 5 MIPS for time-critical loops.
This page synthesizes distributor pricing, drop-in 18-PDIP alternatives (same package, pin-to-pin compatible), and practical design notes not consolidated on the manufacturer datasheet or single distributor listing.
Alternativas directas para PIC16F628-04E/P — 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-04E/P (mismo factor de forma y huella) — difiere en Operating Temperature, Package, I/O Pins, Core Architecture, Timers.
Herramienta de comparación rápida — seleccione piezas alternativas para compararlas lado a lado:
PIC16F628-04/P
✅ Sustitución directa✓ En stock
$2.35 / unidad
Ver hoja de datos →PIC16F628-04I/P
✅ Sustitución directa✓ En stock
$2.16 / unidad
Ver hoja de datos →PIC16F628-20/P
✅ Sustitución directa✓ En stock
$1.96 / unidad
Ver hoja de datos →PIC16F628-04/SO
✅ Sustitución directa✓ En stock
$1.05 / unidad
Ver hoja de datos →PIC16F627-04E/P
✅ Sustitución directa ⚠️ Especificaciones sin verificar✓ En stock
$1.85 / unidad
Ver hoja de datos →PIC16F628-04E/P Valores máximos y características eléctricas
| Core Architecture | PIC16 RISC, 8-bit Harvard |
| Instruction Set Width | 14-bit |
| Number of Instructions | 35 single-word |
| Program Memory (Flash) | 3.5 KB (2K x 14) |
| RAM | 224 bytes |
| EEPROM Data Memory | 128 bytes |
| Maximum CPU Speed | 4 MHz / 4 MIPS (DC = 4 MHz) |
| Operating Voltage Range | 3.0 V to 5.5 V |
| I/O Pins | 16 programmable |
| Operating Temperature Range (E suffix) | -40 C to +125 C (extended) |
| Encapsulado | 18-pin PDIP (P), through-hole |
| On-chip Peripherals | USART, 2x analog comparators, 1x CCP, internal 4 MHz oscillator |
| Reset / Brown-out | POR, PWRT, OST, BOD, WDT with dedicated RC oscillator |
| Estado RoHS | Compliant |
| Tube Quantity | 25 per tube |
Configuración de pines de PIC16F628-04E/P
| Pin 1 | RA2/AN2/CVREF — Digital I/O port A bit 2 / analog comparator reference / VREF output |
| Pin 2 | RA3/AN3/C1OUT — Digital I/O port A bit 3 / comparator 1 output |
| Pin 3 | RA4/AN4/TOCKI — Digital I/O port A bit 4 / Timer0 clock input (open-drain) |
| Pin 4 | MCLR/VPP — Master Clear reset input / programming voltage input |
| Pin 5 | VSS — Ground reference |
| Pin 6 | RB0/INT — Digital I/O port B bit 0 / external interrupt |
| Pin 7 | RB1/RX/DT — Digital I/O port B bit 1 / USART RX or data |
| Pin 8 | RB2/TX/CK — Digital I/O port B bit 2 / USART TX or clock |
| Pin 9 | RB3/CCP1 — Digital I/O port B bit 3 / CCP1 module |
| Pin 10 | RB4/PGM — Digital I/O port B bit 4 / LVP programming |
| Pin 11 | RB5 — Digital I/O port B bit 5 |
| Pin 12 | RB6/T1OSO/T1CKI — Digital I/O port B bit 6 / Timer1 oscillator output or clock input |
| Pin 13 | RB7/T1OSI — Digital I/O port B bit 7 / Timer1 oscillator input |
| Pin 14 | VDD — Positive supply voltage (3.0 V to 5.5 V) |
| Pin 15 | OSC2/CLKOUT — Oscillator crystal output / CLKOUT |
| Pin 16 | OSC1/CLKIN — Oscillator crystal input / external clock input |
| Pin 17 | RA0/AN0 — Digital I/O port A bit 0 / analog comparator channel 0 |
| Pin 18 | RA1/AN1 — Digital I/O port A bit 1 / analog comparator channel 1 |
Aplicaciones típicas
PIC16F628-04E/P es adecuado para 6 aplicacións: HVAC Thermostat Control, Small Appliance Motor Control, Lighting Controller / DMX Receiver, Security Keypad / Access Control, Industrial Sensor Interface / 4-20 mA Transmitter, Remote Sensor Node / Battery Logger.
HVAC Thermostat Control
The PIC16F628-04E/P fits HVAC thermostat control because its 4 MHz instruction rate, 16 digital I/O, and extended -40 C to +125 C temperature grade cover wall-mounted thermistor inputs, relay drivers, and 7-day scheduling without external ADC. The internal 4 MHz RC oscillator eliminates an external crystal, while 128 B of EEPROM stores user setpoints and calibration across power cycles. Brown-out Detect and the Power-up Timer prevent relay chattering during brown-out events common to HVAC wiring. Compared with newer PIC16F1xxx, the PIC16F628-04E/P provides the proven mid-range core many HVAC firmware libraries are written for, simplifying code reuse.
Recomendado
Small Appliance Motor Control
The PIC16F628-04E/P suits small appliance motor control thanks to its CCP (Capture/Compare/PWM) module, two analog comparators for current sensing, and 16 I/O for H-bridge enable, brake, and tachometer feedback. The 1 MIPS instruction rate comfortably drives brushed-DC commutation at typical small-appliance RPMs while keeping EMI low versus a 20 MHz core. The 3.0 V to 5.5 V supply range lets the same PCB work from 4x AA or rectified mains-derived 5 V rails. Combined with Watchdog Timer and Brown-out Detect, the device recovers cleanly from supply droops caused by motor inrush, ensuring appliance longevity.
Recomendado
Lighting Controller / DMX Receiver
The PIC16F628-04E/P integrates a hardware USART that runs DMX-512 at 250 kbaud with negligible CPU overhead, freeing the 4 MIPS core for scene logic. Its 16 programmable I/O can drive multiple LED channels via shift registers while monitoring zero-cross detectors for TRIAC dimming. The 128-byte EEPROM allows user-defined scenes and dim curves to persist across power cycles without an external memory IC. The extended -40 C to +125 C temperature grade supports outdoor architectural lighting installations and stage lighting cabinets. Compared with bit-banged DMX on lower-end MCUs, the PIC16F628-04E/P's USART eliminates jitter and dropped frames.
Recomendado
Security Keypad / Access Control
The PIC16F628-04E/P is well suited to security keypad and access control products because its 128-byte EEPROM stores PIN codes and audit logs non-volatilely, and its 16 I/O scan up to a 4x4 matrix without external logic. The internal 4 MHz RC oscillator trims BOM cost versus a crystal, while POR/PWRT/BOD guard against code execution from corrupted memory after power tampering. The USART enables Wiegand or RS-485 connection to a central access panel. The extended -40 C to +125 C temperature grade lets the same keypad firmware serve indoor office and outdoor gate-mount installations, with the same firmware binary.
Recomendado
Industrial Sensor Interface / 4-20 mA Transmitter
The PIC16F628-04E/P works as the brain of a loop-powered 4-20 mA transmitter: its two analog comparators sense loop current, its 16-bit CCP plus timer chain synthesizes the loop current via PWM-filtered DAC, and its 128 B EEPROM holds calibration constants. The wide 3.0 V to 5.5 V supply range lets the same design operate from a 24 V loop with on-board regulation. The extended -40 C to +125 C temperature grade supports industrial sensor field cabinets. Compared with 32-bit ARM Cortex-M0 alternatives, the PIC16F628-04E/P's 35-instruction RISC core is easier to verify for functional-safety pre-qualification in sensor applications.
Recomendado
Remote Sensor Node / Battery Logger
The PIC16F628-04E/P supports remote battery-powered sensor logging with sleep current below 1 uA (SLEEP mode, WDT active), 128 B EEPROM for non-volatile sample history, and USART for wake-on-serial data dumps. The internal 4 MHz RC avoids a power-hungry external crystal oscillator, extending battery life in field-deployed loggers. The 3.0 V to 5.5 V range supports 2x AA (3 V) or lithium-thionyl-chloride (3.6 V) primary cells without boost converter. The extended -40 C to +125 C grade enables outdoor weather stations and refrigerated-chain cold loggers from the same firmware binary.
Recomendado
Resumen de productos recomendados
Datos de referencia de ingeniería para PIC16F628-04E/P — 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 | PIC16F628-04/P | PIC16F628-04I/P | PIC16F628-20/P | PIC16F628-04/SO | PIC16F627-04E/P |
|---|---|---|---|---|---|---|
| Package | 18-pin PDIP | 18-pin PDIP - same | 18-pin PDIP - same | 18-pin PDIP - same | 18-pin SOIC - same electrical, surface-mount | 18-pin PDIP - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Flash | 3.5 KB | 3.5 KB | 3.5 KB | 3.5 KB | 3.5 KB | 1.75 KB (-50%) |
| Maximum Clock | 4 MHz / 1 MIPS | 4 MHz / 1 MIPS | 4 MHz / 1 MIPS | 20 MHz / 5 MIPS (+400%) | 4 MHz / 1 MIPS | 4 MHz / 1 MIPS |
| Operating Temperature | -40 C to +125 C (E) | 0 C to +70 C (commercial) | -40 C to +85 C (industrial) | -40 C to +85 C typical (industrial) | -40 C to +125 C (E) typical | -40 C to +125 C (E) |
| EEPROM | 128 B | 128 B | 128 B | 128 B | 128 B | 0 B (no EEPROM) |
| RAM | 224 B | 224 B | 224 B | 224 B | 224 B | 224 B |
| Operating Voltage | 3.0 V to 5.5 V | 3.0 V to 5.5 V | 3.0 V to 5.5 V | 3.0 V to 5.5 V | 3.0 V to 5.5 V | 3.0 V to 5.5 V |
| On-chip USART | Yes | Yes | Yes | Yes | Yes | Yes |
| RoHS | Compliant | Compliant | Compliant | Compliant | Compliant | Compliant |
Diferenciadores clave
- Extended -40 C to +125 C operating temperature grade on the E suffix variant (frente a PIC16F628-04/P)
- Internal 4 MHz RC oscillator eliminates external crystal cost (frente a PIC16F628-20/P)
- Doubles program memory and adds 128-byte EEPROM vs PIC16F627 (frente a PIC16F627-04E/P)
Notas de diseño
PIC16F628-04E/P brown-out reset (BOD) is configured via configuration bits at programming time; typical BOD threshold settings range from 2.0 V to 4.5 V. For designs powered from unregulated supplies (rectified mains or USB), enable BOD with a 4.0 V threshold to prevent code execution from corrupted memory below VDD(min). The PWRT adds a 72 ms nominal startup delay before code runs, allowing VDD to stabilize. Always verify the BOD threshold vs the minimum supply rail during power-cuts.
Never leave the MCLR pin floating; tie MCLR to VDD through a 10 kohm resistor (or direct connection if hardware reset is unused) and place a 100 nF decoupling capacitor close to the VDD pin (pin 14). Floating MCLR causes spurious resets in industrial installations with long PCB traces. Watchdog Timer must be disabled in configuration bits if unused, or software must periodically clear the WDT - otherwise the MCU will reset unexpectedly. Note that PORTB weak pull-ups must be enabled via the RBPU bit for matrix-keypad inputs to read high reliably.
Place a 100 nF decoupling capacitor within 5 mm of the VDD pin (14) and the VSS pin (5). For designs using an external crystal, keep crystal traces short (<10 mm) and surround with a ground pour. The 18-pin PDIP through-hole footprint accepts a 2.54 mm (0.1 inch) pitch pin header, simplifying hand-wired prototypes; the 18-pin SOIC equivalent saves PCB area but requires reflow soldering. For high-noise environments, add a ferrite bead between VDD and the decoupling capacitor to suppress switching regulator noise.
The PIC16F628-04E/P draws approximately 2 mA active at 4 MHz / 5 V and 1 uA in SLEEP mode (WDT disabled); thermal dissipation is negligible at these currents, and no thermal management is required. Estimated: at 5 V x 2 mA, power dissipation is ~10 mW, well within the 18-pin PDIP thermal envelope. Use SLEEP mode aggressively in battery-powered designs - a sensor logger waking once per minute reduces average current to under 100 uA, extending coin-cell battery life to multi-year timeframes.
Información de cumplimiento
RoHS compliant per Microchip product page; lead-free 18-pin PDIP package. Not AEC-Q100 qualified - the PIC16F62X family pre-dates automotive-grade qualification programs. For automotive applications, use AEC-Q100-qualified PIC16F1xxx successors or contact Microchip for PPAP packages.