PIC16F639-I/P - 8-Bit MCU, 3.5KB Flash, KeeLoq Crypto, 20-DIP
MPN: PIC16F639-I/P β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.96 | $3.96 |
| 10 | $3.62 | $36.20 |
| 100 | $3.21 | $321.00 |
| 500 | $2.84 | $1,420.00 |
| 1,000 | $2.49 | $2,490.00 |
PIC16F639-I/P Overview
A microcontroller (MCU) is a single-chip computer containing a CPU core, program and data memory, programmable I/O peripherals, and on-board timers and communication interfaces. Within the broader taxonomy, a microcontroller is a type of integrated circuit > semiconductor device > electronic component. The PIC16F639 belongs to Microchip's PIC16 mid-range family, which sits between the PIC10/12 baseline family and the PIC18 enhanced family. Its distinguishing feature is a hardware cryptographic peripheral implementing the KeeLoq block cipher, plus two analog comparators and a Programmable Low-Voltage Detect (PLVD).
Key features include 12 digital I/O pins, two comparators with programmable reference, hardware KEELOQ encoder, three timers (Timer0, Timer1, Timer2), an Enhanced Universal Synchronous/Asynchronous Receiver/Transmitter (EUSART), an MSSP module supporting SPI and I2C (master/slave), and nanoWatt power management with multiple idle/sleep modes. The device supports in-circuit serial programming (ICSP) and in-circuit debugging via two I/O lines.
The PIC16F639 is built on a CMOS process with a 14-bit instruction word and a RISC-based 35-instruction core. The Harvard architecture separates program (Flash) and data (RAM) buses, enabling single-cycle instruction fetch except for branches. The cryptographic engine executes the KeeLoq rolling-code algorithm in hardware to offload secure remote-keyless-entry transmitters and similar hopping-code systems, freeing the CPU for housekeeping tasks.
Typical applications include automotive remote keyless entry (RKE) transmitters, garage-door openers, secure access control fobs, wireless security sensors, and industrial remote-control units. The integrated crypto peripheral makes it a natural fit where anti-scan and anti-playback protection is required on a 3V coin-cell budget.
When designing with the PIC16F639, note that the device is optimized for 3V (3.6V max) operation; 5V-tolerant designs should select a PIC16F88x or PIC16F1xxx counterpart. Decouple VDD with a 100nF ceramic capacitor placed within 5mm of the supply pin, and use the internal 4MHz or 31kHz LFINTOSC to minimize external component count.
This page synthesizes distributor stock and pricing, parametric drop-in alternatives, and practical design notes that are not aggregated in the manufacturer datasheet alone, supporting faster sourcing and BOM decisions.
Drop-in alternatives for PIC16F639-I/P β same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F639-E/P
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
PIC16F639-I/SO
β Drop-Inπ Reference alternative (not in catalog)
PIC16F636-I/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F631-I/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F630-I/P
β Drop-In β οΈ εζ°εΎ ιͺθ―π Reference alternative (not in catalog)
PIC16F639-I/P Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC 8-bit RISC (mid-range) |
| Program Memory | 3.5 KB Flash (2K x 14 words) |
| RAM | 128 bytes |
| EEPROM | 256 bytes |
| Maximum CPU Speed | 20 MHz |
| Operating Voltage Range | 2.0 V to 3.6 V |
| I/O Pins | 12 |
| Timers | 3 (Timer0, Timer1, Timer2) |
| Analog Comparators | 2 |
| Communication Interfaces | EUSART, MSSP (SPI / I2C) |
| Cryptographic Peripheral | KeeLoq-compatible hardware encoder |
| Low-Voltage Detect | Programmable (PLVD) |
| Instruction Set | 35 single-word instructions |
| Package | 20-pin PDIP (through-hole, 0.300 inch / 7.62 mm) |
| Mounting Type | Through-Hole |
| Operating Temperature | -40 C to +85 C (Industrial) |
| Programming/Debug | ICSP (In-Circuit Serial Programming), ICD |
| RoHS Status | Compliant |
PIC16F639-I/P Pin Configuration
| Pin 1 | VDD β Positive power supply (2.0V to 3.6V) |
| Pin 2 | RA0/AN0/C1IN+ β Bidirectional I/O / analog input / comparator 1 positive input |
| Pin 3 | RA1/AN1/C1IN-/C2IN- β Bidirectional I/O / analog input / comparator inputs |
| Pin 4 | RA2/AN2/C2IN+ β Bidirectional I/O / analog input / comparator 2 positive input |
| Pin 5 | RA3/MCLR/VPP β Input-only / Master Clear reset / ICSP programming voltage |
| Pin 6 | RA4/AN3/T0CKI/C1OUT β Bidirectional I/O (open-drain) / analog input / Timer0 clock / comparator 1 output |
| Pin 7 | RA5/AN4/C2OUT β Bidirectional I/O / analog input / comparator 2 output |
| Pin 8 | VSS β Ground reference |
| Pin 9 | RC0 β Bidirectional I/O |
| Pin 10 | RC1 β Bidirectional I/O |
| Pin 11 | RC2 β Bidirectional I/O |
| Pin 12 | RC3 β Bidirectional I/O |
| Pin 13 | RC4 β Bidirectional I/O |
| Pin 14 | RC5 β Bidirectional I/O |
| Pin 15 | RC6 β Bidirectional I/O |
| Pin 16 | RC7 β Bidirectional I/O |
| Pin 17 | RA6 β Bidirectional I/O / oscillator I/O |
| Pin 18 | RA7 β Bidirectional I/O / oscillator I/O |
| Pin 19 | VSS β Ground reference |
| Pin 20 | VDD β Positive power supply (2.0V to 3.6V) |
Typical Applications
PIC16F639-I/P is suitable for 6 applications: Automotive Remote Keyless Entry (RKE), Garage Door Opener and Gate Remote, Secure Wireless Access Control Fob, Wireless Security Sensor Node, Industrial Remote Control Transmitter, Smart Meter and Utility Endpoint.
Automotive Remote Keyless Entry (RKE)
The PIC16F639 is purpose-built for automotive remote keyless entry fobs, where its hardware KeeLoq encoder implements the rolling-code hopping algorithm in silicon without CPU intervention. With 3.5KB Flash, 128 bytes RAM, and 256 bytes EEPROM, the part holds the rolling-code algorithm, manufacturer key, and counter values while running at 20MHz from a 3V coin-cell supply. The 2.0V minimum operating voltage lets the fob operate reliably as the cell drains toward end-of-life, while nanoWatt sleep currents under 1uA preserve standby life. Engineers pair this MCU with a 315MHz or 434MHz ISM-band SAW-resonator transmitter and a few tactile switches to build a production-grade secure RKE fob.
Recommended
Garage Door Opener and Gate Remote
Garage-door and gate remotes rely on rolling-code security to prevent replay attacks, and the PIC16F639 delivers exactly that with its integrated KeeLoq-compatible encoder. The 12 I/O pins are sufficient for 4-button interfaces plus a status LED and learn-mode switch, and the two on-chip comparators allow direct interface with low-battery detect circuitry. With 2.0V to 3.6V operation from two AAA cells or a single lithium coin cell, the part fits the slim industrial-design footprint demanded by modern openers. The hardware crypto offload frees the 20MHz core to handle button debouncing, LED feedback, and battery telemetry without timing pressure.
Recommended
Secure Wireless Access Control Fob
Commercial access control fobs use the PIC16F639 to combine KeeLoq rolling-code authentication with bi-directional challenge-response protocols. The 256 bytes of EEPROM securely store the manufacturer key and rolling counter, surviving power cycles without battery backup. The integrated MSSP supports SPI or I2C peripherals such as external EEPROM, secure elements, or transceivers, while the EUSART handles direct radio control. The 20MHz core executes the hopping-code algorithm in microseconds, keeping transmit bursts short and extending battery life on the 3V coin cell that powers most commercial fobs.
Recommended
Wireless Security Sensor Node
Wireless PIR motion, door/window, and glass-break sensors use the PIC16F639 in non-RKE configurations to leverage its nanoWatt sleep modes and 2.0V minimum supply. The Programmable Low-Voltage Detect generates an interrupt when the battery sags below a configurable threshold, and the two comparators interface directly with PIR sensors or analog front-ends without extra op-amps. The MSSP peripheral drives SPI or I2C sensors, while the EUSART can stream to a sub-GHz transceiver for periodic telemetry. 128 bytes of RAM is sufficient for buffering sensor events between transmissions, and 3.5KB Flash holds the protocol stack plus application logic.
Recommended
Industrial Remote Control Transmitter
Crane, hoist, and industrial machine remote controls adopt the PIC16F639 for its hardware crypto, robust industrial temperature grade, and 12 I/O lines that support up to 8 buttons plus status LEDs. The integrated EUSART can drive an FSK/ASK transmitter directly, while the MSSP interfaces with safety-critical peripherals such as tilt sensors or emergency-stop hardware. Running from 2.0V to 3.6V, the part operates from rechargeable Li-ion packs with predictable brownout behavior thanks to the Programmable LVD. The 35-instruction RISC core keeps code density high, allowing simple development in assembly or C under MPLAB X IDE.
Recommended
Smart Meter and Utility Endpoint
Smart electricity, water, and gas meter endpoints use the PIC16F639 as a low-power supervisory controller that wakes periodically to read a metrology front-end and report over a sub-GHz link. The hardware KeeLoq encoder protects command-and-control channels from replay attacks, while the two comparators monitor battery voltage and tamper switches. The 256-byte EEPROM stores calibration constants, and 3.5KB Flash holds the metering application plus optional DLMS/COSEM or wireless M-Bus stack. NanoWatt Technology keeps average current under 10uA in typical reporting profiles, extending the 10-15 year battery life target of utility AMI deployments.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F639-I/P β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F639-E/P | PIC16F636-I/P | PIC16F631-I/P | PIC16F630-I/P |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 20-pin PDIP | 20-pin PDIP - same | 20-pin PDIP - same | 20-pin PDIP - same | 20-pin PDIP - same |
| Program Memory | 3.5 KB Flash | 3.5 KB Flash | 3.5 KB Flash | 1.75 KB Flash | 1.75 KB Flash |
| RAM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 64 bytes |
| EEPROM | 256 bytes | 256 bytes | 128 bytes | 128 bytes | 128 bytes |
| Maximum CPU Speed | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| Operating Voltage | 2.0 V to 3.6 V | 2.0 V to 3.6 V | 2.0 V to 3.6 V | 2.0 V to 5.5 V | 2.0 V to 5.5 V |
| KeeLoq Crypto Engine | Yes | Yes | No | No | No |
| I/O Pins | 12 | 12 | 12 | 12 | 12 |
| Temperature Grade | -40C to +85C Industrial | -40C to +125C Extended | -40C to +85C Industrial | -40C to +85C Industrial | -40C to +85C Industrial |
Key Differentiators
- Hardware KeeLoq rolling-code crypto engine on-chip (vs PIC16F636-I/P)
- Extended-temperature -40C to +125C variant available in same package (vs PIC16F639-I/P (industrial -40C to +85C))
- Larger 256-byte EEPROM for rolling-code storage (vs PIC16F631-I/P)
Design Notes
Estimated: At 20MHz and 3.3V VDD the PIC16F639 typically draws around 5mA active, dropping below 1uA in Sleep with the LFINTOSC and Timer1 wake source. Place a 100nF ceramic decoupling capacitor within 5mm of the VDD pin (pin 1 and pin 20, both tied together on the PCB) and a bulk 4.7uF tantalum or ceramic on the same rail. For battery-powered RKE fobs, route the coin-cell negative directly to VSS and use the Programmable Low-Voltage Detect (PLVD) to issue a low-battery warning before brownout.
Keep the ICSP clock and data traces (RB6/RA6-equivalent on PIC16F639 are pin 17/RA6 and pin 18/RA7) short and isolated from the RF transmitter trace. Place the crystal or resonator within 5mm of pins 17 and 18 if used. For surface-mount designs using PIC16F639-I/SO, ensure the exposed lead frame underneath the SOIC is soldered to a grounded copper pour for thermal dissipation and EMI shielding.
Do not assume PIC16F639-I/P is 5V tolerant - absolute maximum VDD is 3.6V per the datasheet. Applying 5V will damage the part. Also note the I/O count: although the die offers 16 GPIO, only 12 are bonded out on the 20-pin PDIP/SSOP/SOIC packages, so check the pinout table before assigning functions. Finally, MCLR (pin 4 / RA3) is input-only and should be pulled high through a 10k resistor with a 100nF cap to VDD for proper reset behavior.
When using the PIC16F639 to drive an ASK/FSK transmitter directly from the EUSART, place a series resistor (typically 1k to 10k) between the MCU TX pin and the transmitter DATA input to limit edge rates and reduce harmonic content. Add a small RC low-pass filter on the TX line if the regulator layout places noisy digital traces adjacent to the antenna. Verify conducted emissions against EN 300 220 or FCC Part 15 with a near-field probe on the prototype before committing to production layout.
Compliance Information
RoHS compliant per Microchip product page. Halogen-free status not explicitly stated in the verified web data; consult Microchip environmental compliance portal for the latest declaration.