PIC18LF25K40-E/SP - 32KB Flash 8-Bit MCU 28-SPDIP | Microchip
MPN: PIC18LF25K40-E/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.15 | $3.15 |
| 10 | $2.84 | $28.40 |
| 100 | $2.55 | $255.00 |
| 500 | $2.27 | $1,135.00 |
| 1,000 | $2 | $2,000.00 |
PIC18LF25K40-E/SP Overview
An 8-bit microcontroller (MCU) is a single-chip computer built around an 8-bit data path, typically used for embedded control where deterministic real-time response, low cost, and low power are more important than raw computational throughput. PIC18F/LF-series MCUs belong to the higher-end 8-bit family from Microchip, sitting above the PIC10/16 base lines and below the 16-bit dsPIC/PIC24 families, and they integrate analog, communication, and Core Independent Peripherals (CIPs) directly on-chip to reduce external component count.
Key features include a 16 MIPS execution speed at 64 MHz, an integrated 10-bit ADC with up to 35 channels, a 5-bit DAC, two comparators, 4 hardware PWM/CCP/CWG channels, hardware Windowed Watchdog Timer (WWDT), CRC/SCAN, Zero-Cross Detect (ZCD), and Peripheral Pin Select (PPS) for flexible signal routing. The XLP technology enables nanoWatt deep-sleep currents suitable for battery-powered or energy-harvesting products, while the LF prefix denotes the 1.8-3.6V VDD operating range targeting low-voltage systems.
The PIC18LF25K40 uses a Harvard RISC architecture with a 16-bit instruction word and 8-bit data path, providing deterministic instruction timing and a single-cycle hardware multiply. Core Independent Peripherals such as CWG (Complementary Waveform Generator), hardware limit timer (HLT) and CRC/SCAN enable autonomous operation without CPU intervention, reducing firmware complexity and improving system reliability.
Typical applications include low-power IoT sensor nodes, battery-powered home automation, industrial control with analog front ends, motor control loops, and any 5V-tolerant design where XLP sleep current is the key selection factor. The 28-SPDIP package is preferred for hand-soldered prototypes, educational platforms, and through-hole industrial modules.
When designing with this MCU, ensure that the LF (low-voltage) variant is used only when VDD stays within 1.8-3.6V; for 5V rails select the PIC18F25K40-I/SP variant. Decoupling and PPS configuration should follow the manufacturer datasheet typical application circuit.
This page synthesizes distributor pricing, drop-in same-package alternatives, and practical design notes not found in the bare manufacturer datasheet.
Drop-in alternatives for PIC18LF25K40-E/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 PIC18LF25K40-E/SP (same form factor and footprint) — differing in Package, ADC, Comparators, Core, Program Memory (Flash).
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F25K40-I/SP
✅ Drop-In✓ In Stock
$1.85 / Unit
View Datasheet →PIC18F25K40-E/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18LF24K40-I/SP
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$1.55 / Unit
View Datasheet →PIC18LF24K40-E/SP
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18LF24K22-I/SP
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18LF23K22-E/SP
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$1.94 / Unit
View Datasheet →PIC18LF25K40-E/SP Maximum Ratings & Electrical Characteristics
| Series | PIC XLP 18K |
| Core | PIC18 (8-bit RISC, Harvard) |
| Program Memory (Flash) | 32 KB (16K x 16) |
| Data SRAM | 2 KB |
| Data EEPROM | 256 B |
| Maximum CPU Speed | 64 MHz (16 MIPS) |
| Operating Voltage (VDD) | 1.8 V to 3.6 V (LF variant) |
| I/O Pins | 25 |
| ADC | 10-bit, up to 35 channels |
| DAC | 5-bit, 1 channel |
| Comparators | 2 |
| PWM / CCP / CWG Channels | 4 (CCP), 4 (PWM), 1 (CWG) |
| Package | 28-SPDIP (Skinny Plastic DIP, 7.62 mm row pitch, through-hole) |
| Operating Temperature | -40 C to +125 C (E = Extended) |
| Mounting Type | Through-Hole |
| XLP Sleep Current | nanoWatt range (see datasheet DC characteristics) |
| RoHS Status | Compliant |
| MSL Level | 1 (unsealed/through-hole, not moisture sensitive) |
| Core Independent Peripherals | CWG, WWDT, CRC/SCAN, HLT, ZCD, Hardware CVD, SMT-PWM |
PIC18LF25K40-E/SP Pin Configuration
| Pin 1 | MCLR — Master Clear (Reset) input, active low; pull-up to VDD required |
| Pin 2 | RA0 — PORTA bit 0, analog-capable (PPS I/O) |
| Pin 3 | RA1 — PORTA bit 1, analog-capable (PPS I/O) |
| Pin 4 | RA2 — PORTA bit 2, analog-capable (PPS I/O) |
| Pin 5 | RA3 — PORTA bit 3, analog-capable (PPS I/O) |
| Pin 6 | RA4 — PORTA bit 4, analog-capable (PPS I/O) |
| Pin 7 | RA5 — PORTA bit 5, analog-capable (PPS I/O) |
| Pin 8 | RA6 — PORTA bit 6, analog-capable (PPS I/O) |
| Pin 9 | RA7 — PORTA bit 7, analog-capable (PPS I/O) |
| Pin 10 | GND — Ground reference |
| Pin 11 | VDD — Positive supply (1.8-3.6V LF) |
| Pin 12 | RB0 — PORTB bit 0, analog-capable (PPS I/O) |
| Pin 13 | RB1 — PORTB bit 1, analog-capable (PPS I/O) |
| Pin 14 | RB2 — PORTB bit 2, analog-capable (PPS I/O) |
| Pin 15 | RB3 — PORTB bit 3, analog-capable (PPS I/O) |
| Pin 16 | RB4 — PORTB bit 4, analog-capable (PPS I/O) |
| Pin 17 | RB5 — PORTB bit 5, analog-capable (PPS I/O) |
| Pin 18 | RB6 — PORTB bit 6, analog-capable (PPS I/O); ICSPCLK on PICkits |
| Pin 19 | RB7 — PORTB bit 7, analog-capable (PPS I/O); ICSPDAT on PICkits |
| Pin 20 | GND — Ground reference |
| Pin 21 | VDD — Positive supply (1.8-3.6V LF) |
| Pin 22 | RC0 — PORTC bit 0, analog-capable (PPS I/O) |
| Pin 23 | RC1 — PORTC bit 1, analog-capable (PPS I/O) |
| Pin 24 | RC2 — PORTC bit 2, analog-capable (PPS I/O) |
| Pin 25 | RC3 — PORTC bit 3, analog-capable (PPS I/O) |
| Pin 26 | RC4 — PORTC bit 4, analog-capable (PPS I/O) |
| Pin 27 | RC5 — PORTC bit 5, analog-capable (PPS I/O) |
| Pin 28 | RC6 — PORTC bit 6, analog-capable (PPS I/O) |
Typical Applications
PIC18LF25K40-E/SP is suitable for 6 applications: Battery-Powered IoT Sensor Node, Industrial Analog Monitoring & Control, Home Automation & Smart Home Devices, Motor Control & PWM Driver Hub, Consumer Electronics Handheld Devices, Educational & Hobby Electronics.
Battery-Powered IoT Sensor Node
The PIC18LF25K40-E/SP is purpose-built for low-voltage 1.8-3.6V battery-powered IoT sensor nodes where XLP nanoWatt sleep current extends operational lifetime beyond 10 years on a coin cell. Its 32 KB Flash and 2 KB SRAM accommodate over-the-air firmware update staging plus interrupt-driven sensor sampling logic without external memory. The 10-bit ADC with up to 35 channels directly digitizes temperature, light, and battery-voltage sensors; the 5-bit DAC and two comparators drive threshold-based wakeup circuits without CPU intervention. Drawing only nanoamps in deep-sleep with RTC running, this MCU converts a single AA alkaline or coin-cell into a multi-year wireless sensor product. PPS provides flexible remapping of UART/SPI/I2C pins to optimize PCB routing. Recommended companions include Microchip MCP9808 temperature sensor, MCP16252 boost regulator, and MRF24WN0MA Wi-Fi module.
Recommended
Industrial Analog Monitoring & Control
The PIC18LF25K40-E/SP integrates a 10-bit ADC with up to 35 channels, a 5-bit DAC, two comparators and a hardware CWG (Complementary Waveform Generator), making it ideal for industrial analog monitoring modules that read 4-20 mA loops, RTDs, or 0-10 V process signals and drive PWM or DAC outputs. The -40 to +125 C extended operating temperature handles outdoor cabinets, factory floors, and motor drive vicinity. CRC/SCAN periodically validates Flash integrity which is critical for unattended industrial installations. Peripheral Pin Select (PPS) routes UART/SPI/I2C signals to almost any I/O pin, allowing single PCB layout reuse across multiple industrial SKUs. The 28-SPDIP through-hole package supports hand-soldered or socket-mounted prototyping for fast iteration. Recommended companions include MCP6024 quad op-amp, MCP2551 CAN transceiver and PICtail RS-485 module.
Recommended
Home Automation & Smart Home Devices
The PIC18LF25K40-E/SP powers smart-home controllers such as dimmers, motorized blinds, occupancy sensors and HVAC controllers thanks to its 32 KB memory and Core Independent Peripherals (CIPs). Zero-Cross Detect (ZCD) enables AC line synchronization for phase-controlled TRIAC dimming without external zero-cross circuits; CWG generates complementary MOSFET drive for H-bridge blinds or blinds motors. Hardware Windowed Watchdog (WWDT) keeps the firmware safe against runaway states - mandatory for unattended appliances. The 1.8-3.6V VDD range supports 3.3V-powered battery-operated sensors (door/window sensors, leak detectors) while a companion DC-DC allows AC-powered thermostat skus. Recommended companions include Microchip MIC826 voltage supervisor, MCP1700 LDO regulator, and TPL9202 zero-cross TRIAC driver.
Recommended
Motor Control & PWM Driver Hub
The PIC18LF25K40-E/SP serves as the central PWM and timer hub for small brushed-DC, BLDC and stepper motor control modules thanks to its dedicated 4 CCP, 4 PWM, 1 CWG and Hardware Limit Timer (HLT). HLT automatically terminates PWM in hardware on overcurrent or over-temperature events without CPU intervention - critical for safety-critical motor drive. CWG generates synchronized complementary signals for half-bridge MOSFET gate drivers eliminating deadtime controller ICs. The 10-bit ADC samples motor current through shunt resistors via on-chip comparators implementing cycle-by-cycle current limiting. For battery-powered 24V robotic platforms the 1.8-3.6V LF range permits direct MCU supply from a buck converter. Recommended companions include Microchip TC4427 gate driver, ACS712 current sensor and L6234 motor driver.
Recommended
Consumer Electronics Handheld Devices
The PIC18LF25K40-E/SP fits handheld consumer products such as remote controls, fitness trackers, e-cigarettes and educational kits thanks to its nanoWatt XLP sleep current, compact 28-SPDIP footprint, and 2 KB SRAM sufficient for small user interfaces. The 10-bit ADC reads battery state-of-charge, button matrix via resistive ladder, and analog joystick inputs; the 5-bit DAC drives piezo buzzers for alerts or simple waveforms. CRC/SCAN prevents accidental firmware lockup - important for fitness bands that see long continuous use. The PIC XLP 18K series delivers typical deep-sleep currents measured in nanoamps allowing 6-month coin-cell operation in a pedometer or BLE beacon. Recommended companions include MCP1640 boost regulator, RN4871 Bluetooth module and MCP73831 Li-ion charger.
Recommended
Educational & Hobby Electronics
The PIC18LF25K40-E/SP is widely used in university microcontroller courses, hobbyist electronics and DIY maker kits thanks to its through-hole 28-SPDIP package that fits breadboards and IC sockets without soldering. Its generous 32 KB Flash comfortably holds the MPLAB Xpress Code Examples and Arduino-style tutorials while 2 KB SRAM supports FreeRTOS or TinyOS teaching ports. The on-chip 10-bit ADC, PWM and comparator peripherals expose students to real mixed-signal embedded design without external ICs. The PICkit 4 and PICkit 5 in-circuit programmers and debuggers integrate seamlessly via ICSP pins RA6/RA7 for stepwise debugging. PIC18(L)F25K40 is also the MCU on the Curiosity HPC development board so the same code ports directly to PCB designs. Recommended companions include PICkit 5 programmer, MPLAB Snap debug tool, and a 28-pin narrow DIP socket.
Recommended
Recommended Products Summary
Engineering reference data for PIC18LF25K40-E/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F25K40-I/SP | PIC18F25K40-E/SP | PIC18LF24K40-I/SP | PIC18LF24K40-E/SP | PIC18LF24K22-I/SP |
|---|---|---|---|---|---|---|
| Package | 28-SPDIP | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Operating Voltage | 1.8-3.6 V (LF) | 4.0-5.5 V (F) | 4.0-5.5 V (F) | 1.8-3.6 V (LF) | 1.8-3.6 V (LF) | 1.8-3.6 V (LF) |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB | 16 KB | 16 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 1 KB | 1 KB | 768 B |
| EEPROM | 256 B | 256 B | 256 B | 256 B | 256 B | 256 B |
| Temperature Grade | E (-40 to +125 C) | I (-40 to +85 C) | E (-40 to +125 C) | I (-40 to +85 C) | E (-40 to +125 C) | I (-40 to +85 C) |
| Core / CPU | PIC18 8-bit, 64 MHz / 16 MIPS | PIC18 8-bit, 64 MHz / 16 MIPS | PIC18 8-bit, 64 MHz / 16 MIPS | PIC18 8-bit, 64 MHz / 16 MIPS | PIC18 8-bit, 64 MHz / 16 MIPS | PIC18 8-bit, 64 MHz / 16 MIPS |
| Unit Price (qty 1, USD) | 3.15 | 3.20 | 3.30 | 2.85 | 2.95 | 2.60 |
Key Differentiators
- XLP nanoWatt technology with LF 1.8-3.6V range (vs PIC18F25K40-I/SP (F variant, 4.0-5.5V))
- Extended -40 to +125 C temperature grade (vs PIC18LF25K40-I/SP (industrial I grade, -40 to +85 C))
- 28-SPDIP through-hole package for hand-soldered prototypes (vs PIC18LF25K40-I/SS (28-SSOP surface mount))
Design Notes
The PIC18LF25K40-E/SP LF variant operates from 1.8-3.6V VDD only. If your system supplies 5V, you must use the PIC18F25K40-I/SP (4.0-5.5V) variant. For LF designs drawing from a 3.3V LDO, ensure the LDO can supply peak transient currents during Flash erase/write operations - typical peak is 30-50 mA per bank during page write, much higher than the 5-15 mA runtime average. Add 100 nF + 10 uF ceramic decoupling at pins 11 and 21 (both VDD pairs), and a ferrite bead if switching noise is present on the rail.
Estimated: The 28-SPDIP package has a theta_JA of approximately 60 C/W in still air (typical for narrow plastic DIP), versus 31.4 C/W for VQFN-20 surface mount. At full 64 MHz CPU and peripheral activity, internal core dissipation is ~150 mW which yields a 9 C temperature rise above ambient. The SPDIP package is preferred for hand-soldered and educational designs where thermal performance is not the limiting factor; for thermally constrained products migrate to the 28-SOIC or 28-VQFN package siblings (PIC18LF25K40-I/SS or PIC18LF25K40-I/ML) to cut theta_JA in half.
1) Never leave MCLR (pin 1) floating - tie to VDD through a 10 kohm pull-up or to a supervisory reset IC. 2) PPS (Peripheral Pin Select) must be unlocked (PPSLOCK = 0x55, 0xAA sequence) before remapping UART/SPI/I2C, otherwise writes are silently ignored. 3) ICSP pins RB6/RB7 are shared with PORTB - the programmer drives these during debug; in-circuit isolation resistors may be needed if the application drives RB6/RB7 strongly. 4) The LF variant does NOT tolerate 5V on any I/O - over-voltage latches the I/O cell. Use the F variant for 5V-tolerant designs.
Place a 100 nF X7R 0402 (or 0603) ceramic decoupling capacitor within 5 mm of each VDD pin (11 and 21) and a bulk 10 uF X5R capacitor on the same supply net. The 28-SPDIP land pattern is 7.62 mm row pitch - use a DIP socket or wave-solder compatible pad. For microcontroller signal integrity, route the 64 MHz external crystal (if used instead of internal HFINTOSC) within 10 mm of OSC1/OSC2 with short symmetric ground return; or use the internal 64 MHz HFINTOSC to eliminate the crystal entirely for compact designs.
Compliance Information
RoHS compliant per Microchip product page; lead-free matte-tin finish on SPDIP leads. AEC-Q100 qualification not applicable to E temperature grade SPDIP; automotive -FCCC- grade F variants (PIC18F25K40-E/SO Q1 etc.) available separately for AEC-Q100 designs. Halogen-free status not explicitly listed in the verified web data.