PIC16LC642-04/SP - 8-bit PIC MCU 7KB EPROM 22 I/O | Microchip
MPN: PIC16LC642-04/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $6.85 | $6.85 |
| 10 | $6.12 | $61.20 |
| 100 | $5.4 | $540.00 |
| 500 | $4.78 | $2,390.00 |
| 1,000 | $4.25 | $4,250.00 |
PIC16LC642-04/SP Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU core, program memory (ROM/EPROM/Flash), data memory (RAM), and a configurable set of peripheral modules. PIC microcontrollers use a RISC (Reduced Instruction Set Computer) Harvard architecture, separating program and data bus paths to allow simultaneous instruction fetch and operand access. The PIC16 family occupies the mid-range tier of Microchip's portfolio, sitting between the baseline PIC10/12/16 families and the high-performance PIC17/PIC18 families, and is widely used in industrial control, automotive subsystems, and consumer appliances where deterministic execution and low cost matter more than raw MIPS.
Key features of this part include 35 single-word instructions, all single-cycle except program branches which take two cycles, a hardware multiplier-free ALU optimized for bit and byte operations, an 8-bit timer/counter, a watchdog timer, on-chip power-on reset, brown-out detection, and an EPROM program memory that allows windowed erasure for prototype iteration. The instruction set is fully upward compatible with the broader PIC16 mid-range family, so code developed for related PIC16C/PIC16F parts can be retargeted with minimal rewrite.
Typical applications include industrial control logic, automotive body and accessory electronics, remote-control transmitters, sensor signal conditioning front-ends, low-cost data acquisition nodes, and simple user-interface controllers. The 22 I/O pins comfortably drive LED indicators, keypads, character LCDs, and serial-interface peripherals.
When designing with this part, place a 0.1uF decoupling capacitor as close as possible to the VDD pin and keep EPROM programming-voltage traces away from sensitive analog lines. The /SP suffix designates the 28-pin skinny plastic DIP package supplied in tubes, the most user-friendly form factor for prototype and through-hole assembly. For new designs, evaluate the Flash-based PIC16F-series equivalents for easier firmware iteration.
Drop-in alternatives for PIC16LC642-04/SP — 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 PIC16LC642-04/SP (same form factor and footprint).
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16LC642-04I/SP
✅ Drop-In✓ In Stock
$3.2 / Unit
View Datasheet →PIC16LC642T-04/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16LC642T-04/SS
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16C642-04/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16LC642-04/JW
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16LC642-04/SP Maximum Ratings & Electrical Characteristics
| Product Type | 8-bit Microcontroller (MCU) |
| Core Architecture | PIC16 RISC (Harvard) |
| Program Memory | 7 KB EPROM (windowed) |
| RAM | 176 bytes |
| I/O Pins | 22 |
| Clock Speed | 4 MHz (rated for 10 MHz 'LC' family, this '-04' speed grade) |
| Supply Voltage (VDD) | 3.0 V to 5.5 V |
| Instruction Set | 35 single-word instructions |
| Instruction Cycle Time | 4 TCY per instruction, except branches (8 TCY) |
| Timers | 1 x 8-bit Timer/Counter |
| Watchdog Timer | Yes (on-chip) |
| Power-on Reset / Brown-out | Yes (POR + BOR) |
| Interrupts | Yes (multiple sources) |
| Package | SPDIP-28 (Skinny Plastic DIP, 28-pin) |
| Mounting Type | Through-Hole |
| Tube Quantity | Per Microchip standard |
| RoHS Status | Compliant per Microchip product page |
| Lead-Free | Yes (Pb-free finish) |
PIC16LC642-04/SP Pin Configuration
| Pin 1 | MCLR — Master Clear reset input (active low) |
| Pin 2 | RA0 — Port A bit 0 (digital I/O) |
| Pin 3 | RA1 — Port A bit 1 (digital I/O) |
| Pin 4 | RA2 — Port A bit 2 (digital I/O) |
| Pin 5 | RA3 — Port A bit 3 (digital I/O) |
| Pin 6 | RA4 — Port A bit 4 / T0CKI (timer 0 clock input) |
| Pin 7 | RA5 — Port A bit 5 / SS (slave select) |
| Pin 8 | VSS — Ground reference |
| Pin 9 | OSC1/CLKIN — Oscillator crystal input or external clock input |
| Pin 10 | OSC2/CLKOUT — Oscillator crystal output or clock output |
| Pin 11 | RC0 — Port C bit 0 (digital I/O) |
| Pin 12 | RC1 — Port C bit 1 (digital I/O) |
| Pin 13 | RC2 — Port C bit 2 (digital I/O) |
| Pin 14 | RC3 — Port C bit 3 (digital I/O) |
| Pin 15 | RC4 — Port C bit 4 (digital I/O) |
| Pin 16 | RC5 — Port C bit 5 (digital I/O) |
| Pin 17 | RC6 — Port C bit 6 (digital I/O) |
| Pin 18 | RC7 — Port C bit 7 (digital I/O) |
| Pin 19 | VSS — Ground reference |
| Pin 20 | VDD — Positive supply voltage (3.0V to 5.5V) |
| Pin 21 | RB0/INT — Port B bit 0 / external interrupt |
| Pin 22 | RB1 — Port B bit 1 (digital I/O) |
| Pin 23 | RB2 — Port B bit 2 (digital I/O) |
| Pin 24 | RB3 — Port B bit 3 (digital I/O) |
| Pin 25 | RB4 — Port B bit 4 (digital I/O) |
| Pin 26 | RB5 — Port B bit 5 (digital I/O) |
| Pin 27 | RB6 — Port B bit 6 (digital I/O) |
| Pin 28 | RB7 — Port B bit 7 (digital I/O) |
Typical Applications
PIC16LC642-04/SP is suitable for 6 applications: Industrial Control Logic, Automotive Body Electronics, Remote Control and RF Transmitter, Sensor Signal Conditioning Front-End, Low-Cost Data Acquisition Node, User Interface Controller.
Industrial Control Logic
The PIC16LC642-04/SP fits industrial control logic applications thanks to its 7 KB EPROM, 22 I/O pins, and 3.0-5.5V wide supply range. With 35 single-word RISC instructions executing in 4 clock cycles, the 4 MHz oscillator delivers 1 MIPS deterministic throughput - ideal for hard-real-time state machines driving relays, solenoids, and indicator LEDs in PLC sub-modules. The on-chip watchdog timer and brown-out reset provide the fail-safe behavior demanded in factory automation, while EPROM memory ensures firmware integrity in electrically noisy plant floors. Pair it with optocouplers for mains-isolated I/O. The 28-pin SPDIP is convenient for control-panel through-hole assemblies and field-serviceable designs.
Recommended
Automotive Body Electronics
The PIC16LC642-04/SP serves automotive body and accessory electronics where compact code, 22 I/O lines, and wide supply tolerance are essential. The 3.0-5.5V VDD range tolerates cranking transients on 12V vehicle buses when paired with a 5V regulator, while the 22 I/O pins can drive window-lift relays, mirror-adjust motors, and LED indicators. Its deterministic RISC core suits timing-critical body-control tasks like seat-position memory, headlight delay, and wiper interval control. EPROM memory prevents firmware corruption under thermal cycling. For under-hood or extreme-temperature underbody modules, evaluate the PIC16LC642-04I/SP industrial-temperature variant instead.
Recommended
Remote Control and RF Transmitter
The PIC16LC642-04/SP is a natural fit for handheld remote-control transmitters and RF key-fob designs. Its 22 I/O pins can scan a 4x4 keypad matrix with 8 lines remaining for status LEDs and an RF modulator enable, while the 7 KB EPROM stores custom protocol stacks, rolling-code algorithms, and button debounce state machines. Operating from a 3V coin-cell or two AA cells in the 3.0-5.5V range, the LC variant draws minimal quiescent current - extending battery life across years of standby. The 28-pin SPDIP simplifies through-hole prototyping before transitioning to SOIC-28 (PIC16LC642T-04/SO) for high-volume reflow assembly.
Recommended
Sensor Signal Conditioning Front-End
The PIC16LC642-04/SP works well as a sensor signal conditioning front-end for non-analog sensor types such as thermocouples (via external amplifier), hall-effect switches, and mechanical encoders. Its 22 I/O pins handle quadrature decoding from incremental encoders, pulse counting from flow meters, and digital threshold detection from comparator-output sensors. The on-chip 8-bit timer/counter captures pulse widths precisely, enabling RPM measurement and event timing. EPROM memory holds calibration tables and linearization polynomials. Pair with an external op-amp and ADC front-end for full instrumentation; for designs needing on-chip ADC, the PIC16C711-04/P is the cross-family equivalent.
Recommended
Low-Cost Data Acquisition Node
The PIC16LC642-04/SP can be deployed as a low-cost data acquisition node for distributed sensor networks where 22 digital I/O suffice. It reads digital inputs from external ADC chips, multiplexers, or 1-Wire devices, applies on-chip filtering and thresholding logic, and reports results over a UART implemented in software on general-purpose I/O. The 7 KB EPROM holds the protocol stack, sensor identification tables, and error-handling code. With 176 bytes of RAM, the LC642 manages small circular buffers for sample averaging. Industrial installations benefit from the watchdog timer and brown-out reset. Combine with the PIC16LC642-04I/SP for outdoor or uncontrolled-temperature deployments.
Recommended
User Interface Controller
The PIC16LC642-04/SP drives simple user-interface controllers including character LCD displays, LED bar-graph indicators, and matrix keypads. Its 22 I/O pins handle an 8-bit LCD data bus plus 3 control lines (RS, RW, E), with 11 lines remaining for a 3x4 keypad and status LEDs - or a 4x4 keypad scan with a bi-color LED. The 7 KB EPROM stores custom character fonts, menu navigation trees, and button-debounce state machines. The wide 3.0-5.5V supply lets it interface directly to 5V character LCDs without level shifters. EPROM memory prevents accidental firmware corruption from user-accessible I/O connectors. For cost-sensitive consumer appliances this is a proven, stable MCU choice.
Recommended
Recommended Products Summary
Engineering reference data for PIC16LC642-04/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16LC642-04I/SP | PIC16LC642T-04/SO | PIC16LC642T-04/SS | PIC16C642-04/SP | PIC16LC642-04/JW |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | SPDIP-28 | SPDIP-28 (same) | SOIC-28 (SMD variant) | SSOP-28 (SMD variant) | SPDIP-28 (same) | CDIP-28 windowed ceramic (same footprint) |
| Program Memory | 7 KB EPROM | 7 KB EPROM | 7 KB EPROM | 7 KB EPROM | 7 KB EPROM | 7 KB EPROM (UV erasable) |
| RAM | 176 bytes | 176 bytes | 176 bytes | 176 bytes | 176 bytes | 176 bytes |
| I/O Pins | 22 | 22 | 22 | 22 | 22 | 22 |
| Supply 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 | 4.5 V to 5.5 V | 3.0 V to 5.5 V |
| Max Clock Speed | 4 MHz (-04 grade) | 4 MHz (-04 grade) | 4 MHz (-04 grade) | 4 MHz (-04 grade) | 4 MHz (-04 grade) | 4 MHz (-04 grade) |
| Temperature Grade | Commercial (0C to +70C) | Industrial (-40C to +85C) | Commercial (0C to +70C) | Commercial (0C to +70C) | Commercial (0C to +70C) | Commercial (extended prototype use) |
| Memory Type | EPROM (windowed JW variant only) | EPROM | EPROM | EPROM | EPROM | EPROM (UV erasable, windowed ceramic) |
| Mounting Type | Through-Hole (SPDIP) | Through-Hole (SPDIP) | Surface Mount (SOIC) | Surface Mount (SSOP) | Through-Hole (SPDIP) | Through-Hole (CDIP windowed ceramic) |
Key Differentiators
- Industrial temperature grade variant available with identical pinout (vs PIC16LC642-04I/SP)
- Windowed ceramic variant for prototype EPROM erasure (vs PIC16LC642-04/JW)
- Surface-mount production variants for reflow assembly (vs PIC16LC642T-04/SO)
Design Notes
Place a 0.1uF ceramic decoupling capacitor as close as physically possible to the VDD pin (pin 20) with a short, wide trace to the VSS ground pin (pin 19). For designs with heavy I/O switching or inductive loads driven by port pins, add a bulk 10uF tantalum or aluminum electrolytic capacitor on the same supply rail near the MCU. EPROM-based PICs can exhibit brief VDD inrush during program-memory reads; the local decoupling capacitor suppresses this transient and prevents inadvertent brown-out resets.
Route the MCLR pin (pin 1) with a short trace to its pull-up network, typically 10kohm to VDD. Add the standard Microchip ICSP connector (5-pin or 6-pin header) on the board for in-circuit programming and debugging - the connector pins must reach VPP/MCLR, VDD, VSS, RB6 (PGC), and RB7 (PGD). Route the oscillator traces (OSC1/OSC2) short and symmetric with a ground guard ring on noisy boards. Keep the EPROM-programming high voltage (typically 13V) trace isolated from sensitive analog sections.
Do not confuse the 'LC' (low-voltage CMOS, 3.0-5.5V) family with the 'C' (standard CMOS, 4.5-5.5V) family - applying 3.3V to a PIC16C642 will cause out-of-spec operation or permanent damage. Also avoid using the /SP plastic DIP package for windowed-EPROM erasure development cycles: only the /JW ceramic-windowed variant supports UV erasure. The 28-pin SPDIP pinout is shared with several PIC16C64X family members but differs from PIC16C71X 28-pin parts that have on-chip ADC; verify against the specific datasheet before swapping.
Port B pins on the PIC16LC642 have internal weak pull-ups that can be individually enabled via the OPTION register; this simplifies direct connection to SPST momentary switches and matrix keypads without external resistors. Port A pin RA4 is an open-drain output - external pull-up required if used as output driving a logic-high level. For long PCB traces carrying I/O signals (especially interrupt lines like RB0/INT), add series termination (100-470 ohm) close to the driver to suppress ringing in electrically noisy environments.
Compliance Information
RoHS and REACH compliant per Microchip product page. Not AEC-Q100 qualified - this is a commercial/industrial-grade MCU. For automotive designs, evaluate AEC-Q100-qualified PIC16F equivalents. Halogen-free status not stated in retrieved datasheets.