PIC16F628-04/SO - 4MHz 8-bit Flash MCU 3.5KB | 18-SOIC
MPN: PIC16F628-04/SO ✗ Cuối đờiPIC16F628-04/SO Tóm tắt
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.
Bộ thay thế dễ dàng lắp đặt cho PIC16F628-04/SO — cùng gói, chân-to-chân tương thích. Các bộ phận yêu cầu hàn PCB bị loại trừ.
Các biến thể trong loạt này
Các mẫu cùng loạt có thể lắp đặt dễ dàng tương thích với PIC16F628-04/SO (cùng hình factor và footprint) — khác nhau ở Package, Operating Temperature, Internal Oscillator, Core Architecture, Analog Comparators.
PIC16F628A-I/SO
✅ Drop-In✗ Hết hàng
$2.32 / Đơn vị
Xem tài liệu →PIC16F628A-E/SO
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F628T-04E/SO
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC16F627-04/SO
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F627-04I/SO
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F88-I/SO
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC16F628-04/SO Tỷ lệ tối đa & tính chất điện
| 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 |
| Điện áp cung cấp | 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 |
| Hộp | 18-pin SOIC (SO) |
| Nhiệt độ hoạt động | -40°C to +85°C (industrial) |
| Kiểu lắp đặt | Surface Mount |
| RoHS | Compliant |
Cấu hình chân PIC16F628-04/SO
| Chân 1 | RA2/AN2/VREF — Digital I/O / analog comparator input / voltage reference |
| Chân 2 | RA3/AN3/CMP1 — Digital I/O / analog comparator input / comparator 1 output |
| Chân 3 | RA4/T0CKI/CMP2 — Digital I/O (open-drain) / Timer0 clock input / comparator 2 output |
| Chân 4 | MCLR/VPP — Master clear reset (active low) / programming voltage |
| Chân 5 | VSS — Ground reference |
| Chân 6 | RB0/INT — Digital I/O / external interrupt input |
| Chân 7 | RB1/RX/DT — Digital I/O / USART RX / synchronous data |
| Chân 8 | RB2/TX/CK — Digital I/O / USART TX / synchronous clock |
| Chân 9 | RB3/CCP1 — Digital I/O / CCP1 PWM output |
| Chân 10 | RB4/PGM — Digital I/O / LVP programming pin |
| Chân 11 | RB5 — Digital I/O |
| Chân 12 | RB6/T1OSO/T1CKI/PGC — Digital I/O / Timer1 oscillator / Timer1 clock / ICSP clock |
| Chân 13 | RB7/T1OSI/PGD — Digital I/O / Timer1 oscillator / ICSP data |
| Chân 14 | VDD — Positive supply (3.3 V to 5.5 V) |
| Chân 15 | OSC2/CLKO/RA6 — Crystal oscillator output / clock output / digital I/O |
| Chân 16 | OSC1/CLKI/RA7 — Crystal oscillator input / clock input / digital I/O |
| Chân 17 | RA0/AN0 — Digital I/O / analog comparator input |
| Chân 18 | RA1/AN1 — Digital I/O / analog comparator input |
Ứng dụng tiêu biểu
PIC16F628-04/SO phù hợp cho 6 Áp dụngs: 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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
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.
Được đề xuất
Tóm tắt các sản phẩm được đề xuất
Dữ liệu tham khảo kỹ thuật cho PIC16F628-04/SO — so sánh, hướng dẫn thiết kế và thông tin tuân thủ.
Hướng dẫn chọn lựa
So sánh với các sản phẩm thay thế
| Tham số | Sản phẩm này | 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 |
Bảo phân biệt quan trọng
- Lowest-cost flash MCU in the PIC16F62X family (vsPIC16F88-I/SO)
- More flash than PIC16F627 in same footprint (vsPIC16F627-04/SO)
- NRND with active migration path to PIC16F15244 (vsPIC16F628A-I/SO)
Ghi chú thiết kế
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.
Thông tin tuân thủ
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.