PIC18LF25K40-I/SP - 8-bit XLP MCU 32KB Flash 28-SPDIP | Microchip
MPN: PIC18LF25K40-I/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.77 | $2.77 |
| 10 | $2.5 | $25.00 |
| 100 | $2.14 | $214.00 |
| 500 | $1.93 | $965.00 |
| 1,000 | $1.74 | $1,740.00 |
PIC18LF25K40-I/SP Overview
An 8-bit microcontroller (MCU) is a programmable integrated circuit combining a CPU, memory (Flash/RAM/EEPROM), and peripherals on a single die. The PIC18LF25K40 belongs to the 8-bit MCU -> microcontroller -> embedded controller -> integrated circuit taxonomy, and serves as a general-purpose compute and control element in embedded systems. The "LF" prefix denotes the low-voltage (1.8-3.6V) variant of the K40 family, distinguishing it from the 5V-capable PIC18F25K40.
Key features include a C compiler-friendly 8-bit PIC18 CPU with hardware multiply, 25 digital I/O pins, a 10-bit ADC with computation (ADCC) and automated averaging, a 5-bit DAC, two comparators with selectable reference, CWG (Complementary Waveform Generator), 16-bit PWM, multiple EUSART/SPI/I2C peripherals, and a Cyclic Redundancy Check (CRC/SCAN) module for memory integrity. The peripheral pin select (PPS) feature allows flexible remapping of digital peripherals to any I/O pin, simplifying PCB routing in dense designs.
The architecture uses a Harvard bus with separate program Flash (16K x 16) and data RAM paths, enabling single-cycle instruction execution at 64 MHz (15.6 ns per instruction). The XLP technology provides deep sleep currents below 50 nA typical and active currents in the microamp range, enabling multi-year battery life in IoT sensor nodes, remote controls, and wearables.
Typical applications include low-power IoT sensor nodes, consumer electronics human-interface devices, HVAC and building automation controllers, battery-powered industrial sensors, and small home appliances. The wide peripheral set, plus the 28-SPDIP through-hole footprint, makes it well suited for hobbyist, prototype, and legacy-replacement designs that prefer socketed or hand-solderable packages.
When designing with this device, ensure the supply voltage stays within 1.8 V to 3.6 V (LF variant); use the PPS feature to map peripherals only to PPS-capable pins. A 0.1 uF decoupling capacitor placed within 5 mm of each VDD/VSS pair is recommended to maintain ADC SNR. For sleep current optimization, disable unused peripherals via PMD registers before entering Sleep.
This page synthesizes distributor pricing, drop-in same-family alternatives, and practical design notes not found in the manufacturer datasheet alone.
Drop-in alternatives for PIC18LF25K40-I/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-I/SP (same form factor and footprint) — differing in Package, ADC, MSL Level, Operating Temperature, Communication.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18LF25K40-E/SP
✅ Drop-In✓ In Stock
$2 / Unit
View Datasheet →PIC18F25K40-I/SP
✅ Drop-In✓ In Stock
$1.85 / Unit
View Datasheet →PIC18LF24K40-I/SP
✅ Drop-In✓ In Stock
$1.55 / Unit
View Datasheet →PIC18LF26K40-I/SP
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$2.55 / Unit
View Datasheet →PIC18LF25K22-I/SP
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18LF25K40-I/SP Maximum Ratings & Electrical Characteristics
| Core | PIC18 8-bit RISC |
| Instruction Set | 8-bit PIC18 (C compiler friendly) |
| Maximum CPU Frequency | 64 MHz |
| Program Memory (Flash) | 32 KB (16K x 16) |
| Data RAM | 2 KB |
| Data EEPROM | 256 bytes |
| Operating Voltage Range | 1.8 V to 3.6 V |
| I/O Pins | 25 |
| ADC | 10-bit ADC2 (with computation) |
| DAC | 5-bit DAC |
| Comparators | 2 |
| PWM Channels | 16-bit PWM + CCP + CWG |
| Timers | 9 |
| Communication | EUSART, SPI, I2C |
| CRC / SCAN Module | Yes |
| Peripheral Pin Select (PPS) | Yes |
| XLP (eXtreme Low Power) Technology | Yes |
| Watchdog Timer | WWDT with window |
| Package | 28-pin SPDIP (300 mil, 7.62 mm) |
| Mounting Type | Through-Hole |
| Operating Temperature | -40C to +85C (Industrial, "I") |
| MSL Level | 1 (n/a for through-hole) |
| RoHS Status | Compliant |
| Lead-Free / Halogen-Free | Yes (per Microchip product page) |
PIC18LF25K40-I/SP Pin Configuration
| Pin 1 | RA3/AN3/VREF+/T0CKI/CLC1IN0/RP13 — Bidirectional I/O with analog input, VREF+, Timer0 clock, CLC input, PPS remappable |
| Pin 2 | RA2/AN2/VREF-/T5CKI/T3CKI/CCP3/CLC2IN0/RP11 — Bidirectional I/O with analog input, VREF-, timer clock, CCP3, CLC input, PPS remappable |
| Pin 3 | RA1/AN1/C1IN1-/C2IN1-/OPA1IN-/DAC1OUT/IOC1/ISRC/RP10 — Bidirectional I/O with analog, comparator input, op-amp, DAC output, PPS remappable |
| Pin 4 | RA0/AN0/C1IN0+/C2IN0+/OPA1OUT/IOC0/RP0 — Bidirectional I/O with analog, comparator, op-amp output, PPS remappable |
| Pin 5 | RA5/MCLR/VPP/ICSPCLK — Master Clear (reset) input or VPP programming voltage; weak pull-up enabled |
| Pin 6 | RA4/AN4/T1G/T3G/SOSCO/CLKR/C1OUT/RP8 — Bidirectional I/O with analog, Timer1/3 gate, secondary oscillator, PPS remappable |
| Pin 7 | RA7/OSC1/CLKIN/ICSPDAT — Crystal oscillator input or external clock; ICSP data |
| Pin 8 | RA6/OSC2/CLKOUT/ICSPCLK — Crystal oscillator output or CLKOUT; ICSP clock |
| Pin 9 | VSS — Ground reference |
| Pin 10 | VDD — Positive supply voltage (1.8 V to 3.6 V for LF variant) |
| Pin 11 | RB5/AN11/CPS5/CCP5/C1IN3-/C2IN3-/CLC3/RP5 — Bidirectional I/O with analog, mTouch, CCP5, comparator, PPS remappable |
| Pin 12 | RB4/AN10/CPS4/SDA2/CLC2/RP4 — Bidirectional I/O with analog, mTouch, I2C2 SDA, PPS remappable |
| Pin 13 | RB3/AN9/CPS3/SCL11/CCP2/C1IN2-/C2IN2/RP3 — Bidirectional I/O with analog, mTouch, I2C1 SCL, CCP2, PPS remappable |
| Pin 14 | RB2/AN8/CPS2/SDA1/C1IN1+/C2IN1+/RP2 — Bidirectional I/O with analog, mTouch, I2C1 SDA, comparator, PPS remappable |
| Pin 15 | RB1/AN7/CPS1/CCP4/SCK1/CLC1OUT/RP1 — Bidirectional I/O with analog, mTouch, CCP4, SPI clock, CLC output, PPS remappable |
| Pin 16 | RB0/AN6/CPS0/CCP1/INT0/FLT0/RP0 — Bidirectional I/O with analog, mTouch, CCP1, external interrupt, PWM fault, PPS remappable |
| Pin 17 | RB7/AN14/CPS7/EUSART2 CK/DAC2 OUT/RP7 — Bidirectional I/O with analog, mTouch, EUSART2 clock, DAC2, PPS remappable |
| Pin 18 | RB6/AN12/CPS6/EUSART2 TX/SCK2/C2OUT/RP6 — Bidirectional I/O with analog, mTouch, EUSART2 TX, SPI clock, PPS remappable |
| Pin 19 | VDD — Positive supply voltage (1.8 V to 3.6 V for LF variant) |
| Pin 20 | VSS — Ground reference |
| Pin 21 | RC7/AN19/CPS11/RX1/DT1/CCP7/RP19 — Bidirectional I/O with analog, mTouch, EUSART1 RX, CCP7, PPS remappable |
| Pin 22 | RC6/AN18/CPS10/TX1/CK1/CCP6/RP18 — Bidirectional I/O with analog, mTouch, EUSART1 TX, CCP6, PPS remappable |
| Pin 23 | RC5/AN17/CPS9/SDO1/RP8 — Bidirectional I/O with analog, mTouch, SPI SDO, PPS remappable |
| Pin 24 | RC4/AN16/CPS8/SDI1/RP9 — Bidirectional I/O with analog, mTouch, SPI SDI, PPS remappable |
| Pin 25 | RC3/AN15/CPS15/SCL2/CK2/RP17 — Bidirectional I/O with analog, mTouch, I2C2 SCL, PPS remappable |
| Pin 26 | RC2/AN14/CPS14/SDA2/CCP9/PWM3ERPS2/RP16 — Bidirectional I/O with analog, mTouch, I2C2 SDA, CCP9, PPS remappable |
| Pin 27 | RC1/AN13/CPS13/CCP8/SCK2/RP15 — Bidirectional I/O with analog, mTouch, CCP8, SPI clock, PPS remappable |
| Pin 28 | RC0/AN12/CPS12/PWM6/RP12 — Bidirectional I/O with analog, mTouch, PWM6, PPS remappable |
Typical Applications
PIC18LF25K40-I/SP is suitable for 6 applications: Battery-Powered IoT Sensor Nodes, Consumer HMI and Remote Controls, HVAC and Building Automation Controllers, Industrial Sensor Signal Conditioning, Battery Charger and Power Management Front-End, Educational and Hobbyist Embedded Boards.
Battery-Powered IoT Sensor Nodes
The PIC18LF25K40-I/SP fits battery-powered IoT sensor nodes because its XLP Sleep current is below 50 nA typical, and the 1.8-3.6 V LF supply matches a CR2032 or 2xAA alkaline pack without a boost converter. The 10-bit ADC2 with computation (ADCC) provides hardware-averaged readings directly to Sleep, reducing firmware wake time and total energy per measurement. EUSART/SPI/I2C plus PPS let a single MCU connect to a sensor, an external EEPROM, and a sub-GHz or BLE module. Compared with a switching regulator front end, the LF linear core keeps quiescent current in the microamp range, enabling multi-year coin-cell life.
Recommended
Consumer HMI and Remote Controls
The PIC18LF25K40-I/SP suits consumer human-interface devices (HIDs) such as IR remote controls, e-ink displays, and small appliances because it offers 25 I/O to drive key matrices, LEDs, and low-cost LCDs while retaining the XLP sleep envelope needed for AAA-powered remotes. The 16-bit PWM plus CCP and CWG (Complementary Waveform Generator) handle backlight dimming or buzzer tones without external timer ICs. With 32 KB Flash, the device accommodates USB HID stacks, vendor-specific IR protocols, and OTA-friendly bootloaders. The 28-SPDIP package is hand-solderable, ideal for prototype through-hole HID boards.
Recommended
HVAC and Building Automation Controllers
The PIC18LF25K40-I/SP is a fit for HVAC and building-automation peripherals such as thermostat sub-boards, damper actuators, and smart-valve controllers because it integrates CRC/SCAN for memory integrity monitoring in long-life installations and a 5-bit DAC plus comparators for loop-error monitoring. The 10-bit ADC with computation supports ratiometric thermistor/NTC bridges without external op-amps, and the EUSART handles RS-485 link layers through a transceiver. Running at 1.8-3.6 V from a 3.3 V LDO downstream of the 24 VAC HVAC bus, the LF variant keeps idle loss low. The 28-SPDIP package supports socketed field-replacement modules.
Recommended
Industrial Sensor Signal Conditioning
The PIC18LF25K40-I/SP fits industrial 4-20 mA loop-powered sensor signal conditioning because its LF 1.8-3.6 V operation tolerates the low headroom of loop-derived supplies, and the on-chip 10-bit ADC2 with computation provides oversampling and averaging at the silicon level. The 16-bit PWM can synthesize a precision 4-20 mA loop output with the help of an external op-amp, eliminating a dedicated DAC. The CWG module generates deadband-controlled complementary drive for H-bridge sensor excitation, while PPS allows pin reassignment to keep the analog pins isolated. Industrial temperature grading and the 28-SPDIP package ease through-hole factory-floor designs.
Recommended
Battery Charger and Power Management Front-End
The PIC18LF25K40-I/SP is well suited as a battery-charger and power-management front-end controller for Li-ion / NiMH packs because the 10-bit ADC2 monitors cell voltage and current with hardware averaging, and the on-chip comparators trigger over-current / under-voltage cutoffs without external analog ICs. The 16-bit PWM drives a synchronous buck or boost switch, while the CWG adds programmable deadtime for the high-side / low-side pair. LF 1.8-3.6 V operation matches single-cell Li-ion directly, and PPS routes PWM outputs to spare pins during PCB respins. The 256-byte EEPROM stores cycle-count and fault logs in non-volatile memory.
Recommended
Educational and Hobbyist Embedded Boards
The PIC18LF25K40-I/SP is a strong choice for educational and hobbyist boards (Arduino-like clones, PIC training kits, breadboard-friendly prototypes) because the 28-SPDIP 300-mil package drops directly into a standard 28-pin DIP socket or ZIF socket for easy swapping. 32 KB Flash plus 2 KB RAM is enough for full XC8 projects with USB CDC or bootloader, while PPS and the rich peripheral set let students experiment with PWM, ADC, I2C and SPI on the same chip. The LF 1.8-3.6 V range lets beginners power the board from a single 3.3 V supply or two AA cells without level shifting, and the ICSP pins on /SP expose in-circuit programming via a PICkit or Snap debugger.
Recommended
Recommended Products Summary
Engineering reference data for PIC18LF25K40-I/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18LF25K40-E/SP | PIC18LF25K40-I/SO | PIC18F25K40-I/SP | PIC18LF24K40-I/SP | PIC18LF25K22-I/SP |
|---|---|---|---|---|---|---|
| Package | 28-SPDIP (300 mil) | 28-SPDIP - same | 28-SOIC wide - different footprint | 28-SPDIP - same | 28-SPDIP - same | 28-SPDIP - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Program Memory | 32 KB | 32 KB | 32 KB | 32 KB | 16 KB | 32 KB |
| Data RAM | 2 KB | 2 KB | 2 KB | 2 KB | 2 KB | 1 KB |
| Data EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes |
| Operating Voltage | 1.8 V to 3.6 V (LF) | 1.8 V to 3.6 V (LF) | 1.8 V to 3.6 V (LF) | 2.3 V to 5.5 V (F) | 1.8 V to 3.6 V (LF) | 1.8 V to 3.6 V (LF) |
| Max CPU Frequency | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz |
| I/O Pins | 25 | 25 | 25 | 25 | 25 | 24 |
| ADC | 10-bit ADC2 (computation) | 10-bit ADC2 (computation) | 10-bit ADC2 (computation) | 10-bit ADC2 (computation) | 10-bit ADC2 (computation) | 10-bit ADC (no computation) |
| PPS (Peripheral Pin Select) | Yes | Yes | Yes | Yes | Yes | No |
| Operating Temperature | -40C to +85C | -40C to +125C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
| Unit Price (qty 1, USD) | 2.77 | 2.95 | 2.77 | 2.77 | 2.55 | 3.10 |
Key Differentiators
- Lowest power LF variant of K40 family in 28-SPDIP (vs PIC18F25K40-I/SP)
- Full PPS flexibility across 25 I/O pins (vs PIC18LF25K22-I/SP)
- ADC with computation (ADCC) hardware averaging (vs PIC18LF24K40-I/SP)
Design Notes
The PIC18LF25K40-I/SP is an LF (low-voltage) variant with a 1.8 V to 3.6 V supply range. Decouple VDD pins (pin 10, 19) with a 100 nF ceramic placed within 5 mm of each VDD/VSS pair and a bulk 1 uF to 10 uF on the main rail. For battery-powered designs, route the unregulated battery through a low-Iq LDO such as MCP1700; the LF core draws under 50 nA in Sleep, so the LDO Iq dominates standby budget - choose an LDO with Iq below 1.6 uA to preserve multi-year coin-cell life.
Place the 28-SPDIP socketed footprint with pin 1 marker aligned to the upper-left for a standard 300-mil DIP socket. Keep crystal traces short and guard the analog pins (RA0-RA4) with a ground ring; assign them as analog-only (ANSEL) before any digital function. Route the ICSP pins (RA6/RA7) to a 6-pin header compatible with PICkit/Snap and reserve them as digital-only (no analog) to avoid loading the programming clock. Peripheral Pin Select (PPS) lets you remap UART/PWM/SPI, so place those peripheral targets on any spare I/O pin without re-spinning the PCB.
Do not assume PIC18LF25K40-I/SP is 5 V tolerant - the LF variant maxes at 3.6 V on VDD and most I/O; driving a 5 V rail into an LF pin can latch-up. Use the non-LF PIC18F25K40 if your board needs 5 V tolerance. Also remember that PPS mapping must be configured at runtime in code: a peripheral will not function until its RPx assignment is set in the appropriate PPS register. Finally, leaving the on-board ADC enabled in Sleep can raise current by 1-2 uA; disable via PMD before entering Sleep if you want full XLP performance.
Estimated: based on datasheet pinout, route PPS inputs only to pins marked RPn (RP0 through RP19) on this 28-SPDIP - non-RPn pins cannot be assigned a PPS input even though they are GPIO. Keep SPI bus traces under 50 mm and add 4.7 kohm pull-ups on SDA/SCL to 3.3 V. The 16-bit PWM and CWG outputs can be routed to any RPn pin; place the gate-driver FETs within 10 mm of the PWM output pin to minimize ringing.
Compliance Information
RoHS and REACH compliant per Microchip product page; lead-free and halogen-free per Microchip material specs. AEC-Q100 not applicable (consumer/industrial grade MCU). The E/SP extended-temp variant is recommended for harsh-environment designs but is not AEC-Q100 qualified.