PIC18LF25K40-I/SO - 32KB Flash 8-bit MCU, 28-SOIC | Microchip
MPN: PIC18LF25K40-I/SO ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.65 | $2.65 |
| 10 | $2.38 | $23.80 |
| 100 | $2.12 | $212.00 |
| 500 | $1.89 | $945.00 |
| 1,000 | $1.65 | $1,650.00 |
PIC18LF25K40-I/SO Overview
Background: An 8-bit microcontroller (MCU) is a single-chip computer optimized for embedded control tasks such as sensor reading, actuator driving, and human-interface handling. The PIC18 family sits at the top of Microchip's 8-bit portfolio, offering an enhanced instruction set, hardware multiply, and large linear memory addressing compared to baseline PIC16 parts. Within the PIC18 taxonomy, the K-series combines the legacy PIC18 core with XLP energy-saving peripherals aimed at battery-powered designs, while the LF sub-family specifically targets sub-3.3 V rails.
Key features of the PIC18LF25K40-I/SO include: 64 MHz maximum CPU clock (16 MIPS), 32 KB self-programmable Flash with 100K endurance cycles, 2 KB SRAM, 256 B EEPROM, up to 25 I/O pins, a 12-bit ADC with up to 24 channels, two comparators, two I2C/SPI/EUSART peripherals, one 8-bit DAC and one 5-bit DAC, a Complementary Waveform Generator (CWG), and Zero-Cross Detect. The integrated 32 MHz HFINTOSC eliminates the external crystal in many designs, while XLP modes drop quiescent current into the nanoamp range for sleep-mode duty-cycled applications.
Typical applications span consumer white goods, low-cost IoT sensor nodes, battery chargers, motor control loops, LED drivers, and human-interface boards. The wide operating range and rich analog/digital peripheral set make it well suited for mixed-signal designs that previously required an external op-amp or ADC.
When designing with this device, pay attention to the LF voltage ceiling (3.6 V absolute maximum) - the non-L PIC18F25K40 must be substituted for any rail above 3.6 V. Decoupling VDD/VSS with at least 100 nF per pair and following the datasheet's analog-ground layout guideline preserves ADC accuracy.
This page synthesizes distributor pricing, drop-in alternatives within the PIC18 K40/LF family, and practical design notes that go beyond what the manufacturer datasheet provides.
Drop-in alternatives for PIC18LF25K40-I/SO — 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/SO (same form factor and footprint) — differing in Package, Operating Temperature, ADC, Program Memory (Flash), DAC.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F25K40-I/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18LF24K40-I/SO
✅ Drop-In✓ In Stock
$0.99 / Unit
View Datasheet →PIC18LF25K40-I/SP
✅ Drop-In✓ In Stock
$1.74 / Unit
View Datasheet →PIC18LF25K40-E/SO
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18LF25K42-I/SO
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$1.62 / Unit
View Datasheet →PIC18F25Q43-I/SO
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$1.21 / Unit
View Datasheet →PIC18LF25K40-I/SO Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC18 8-bit RISC |
| Maximum CPU Frequency | 64 MHz (16 MIPS) |
| Program Memory (Flash) | 32 KB |
| Data SRAM | 2 KB |
| Data EEPROM | 256 B |
| Operating Voltage Range | 1.8 V to 3.6 V (LF variant) |
| I/O Pins | Up to 25 |
| ADC | 12-bit, up to 24 channels |
| DAC | 1 x 8-bit and 1 x 5-bit |
| Comparators | 2 |
| EUSART | 1 |
| I2C / SPI | 2 I2C, 2 SPI (MSSP) |
| Timers | Multiple 8-/16-bit with PWM |
| Internal Oscillator | 32 MHz HFINTOSC |
| Package | 28-pin SOIC (SO) |
| Operating Temperature | -40C to +85C (Industrial, "I") |
| XLP Technology | Yes (eXtreme Low Power) |
| Programming Method | ICSP / In-Circuit Serial Programming |
| RoHS Status | Compliant |
PIC18LF25K40-I/SO Pin Configuration
| Pin 1 | RA0/AN0/C1IN0+/ICSPDAT — PORTA bit 0 / analog input 0 / comparator input / ICSP data |
| Pin 2 | RA1/AN1/C1IN1-/ICSPCLK — PORTA bit 1 / analog input 1 / comparator input / ICSP clock |
| Pin 3 | RA2/AN2/C1IN0-/VREF- — PORTA bit 2 / analog input 2 / VREF- |
| Pin 4 | RA3/AN3/C1IN1+/VREF+ — PORTA bit 3 / analog input 3 / VREF+ |
| Pin 5 | RA4/AN4/C2IN0-/T0CKI — PORTA bit 4 / analog input 4 / T0 clock input |
| Pin 6 | RA5/AN5/C2IN1-/SS2 — PORTA bit 5 / analog input 5 / SPI2 slave select |
| Pin 7 | RA6/OSC2 — PORTA bit 6 / crystal output |
| Pin 8 | RA7/OSC1/CLKI — PORTA bit 7 / crystal input / external clock |
| Pin 9 | VDD — Positive supply (1.8 V to 3.6 V) |
| Pin 10 | VSS — Ground reference |
| Pin 11 | RB0/AN12/INT0 — PORTB bit 0 / analog input 12 / external interrupt 0 |
| Pin 12 | RB1/AN10/C2IN3-/INT1 — PORTB bit 1 / analog input 10 / external interrupt 1 |
| Pin 13 | RB2/AN8 — PORTB bit 2 / analog input 8 |
| Pin 14 | RB3/AN9/C1IN2-/C2IN2-/CCP2 — PORTB bit 3 / analog input 9 / CCP2 |
| Pin 15 | RB4/AN11/C2IN1+ — PORTB bit 4 / analog input 11 |
| Pin 16 | RB5/AN13/C1IN3-/CCP3 — PORTB bit 5 / analog input 13 / CCP3 |
| Pin 17 | RB6/ICSPCLK/ICDCLK — PORTB bit 6 / ICSP clock / ICD clock |
| Pin 18 | RB7/ICSPDAT/ICDDAT — PORTB bit 7 / ICSP data / ICD data |
| Pin 19 | RC0/SOSC1 — PORTC bit 0 / secondary oscillator |
| Pin 20 | RC1/SOSC0 — PORTC bit 1 / secondary oscillator |
| Pin 21 | RC2/AN14/C1IN2+ — PORTC bit 2 / analog input 14 |
| Pin 22 | RC3/AN15/C1IN3+/SCL1 — PORTC bit 3 / analog input 15 / I2C1 clock |
| Pin 23 | RC4/AN16/C2IN2+/SDA1 — PORTC bit 4 / I2C1 data |
| Pin 24 | RC5/AN17/C2IN3+ — PORTC bit 5 / analog input 17 |
| Pin 25 | RC6/AN18/TX1/CK1 — PORTC bit 6 / EUSART TX |
| Pin 26 | RC7/AN19/RX1/DT1 — PORTC bit 7 / EUSART RX |
| Pin 27 | RE3/MCLR — PORTE bit 3 / master clear reset (active low) |
| Pin 28 | VDD — Positive supply (1.8 V to 3.6 V, second pin) |
Typical Applications
PIC18LF25K40-I/SO is suitable for 6 applications: Battery-Powered IoT Sensor Node, Consumer Appliance Control Board, LED Lighting and Dimming Controller, Automotive Body Electronics (Sub-12V Subsystem), Industrial Sensor Hub / Data Logger, USB Human Interface Device (Companion MCU).
Battery-Powered IoT Sensor Node
The PIC18LF25K40-I/SO is a strong fit for battery-powered IoT sensor nodes thanks to its 1.8 V to 3.6 V operating range and Microchip's XLP technology, which drops sleep current into the nanoamp range. The integrated 12-bit ADC with up to 24 channels reads multiple analog sensors (temperature, light, gas) without an external ADC, and the 32 KB Flash accommodates OTA-friendly firmware with command-line parsers. A typical implementation uses two AA cells feeding the LF device directly, waking from sleep on a timer interrupt every few seconds to sample and transmit. The 32 MHz HFINTOSC removes the need for an external crystal, shrinking the BOM. Watch the brown-out reset threshold - LF parts need BOR configured to match the cell end-of-life voltage to avoid spurious resets.
Recommended
Consumer Appliance Control Board
White-goods appliance control boards (washing machines, dishwashers, coffee makers) typically combine a low-cost MCU with a power triac/driver stage. The PIC18LF25K40-I/SO fits this role because its 25 I/O pins handle seven-segment displays, keypads, status LEDs, and triac firing pulses without external mux logic. The Complementary Waveform Generator (CWG) produces hardware-timed triac triggers with automatic dead-band insertion, eliminating software jitter on zero-cross switching. Operating from a 3.3 V rail keeps the design efficient and lets the MCU share its supply with a low-cost LDO. Note that the LF 3.6 V ceiling means optocouplers are required if the MCU drives 5 V mains-isolated peripherals.
Recommended
LED Lighting and Dimming Controller
The PIC18LF25K40-I/SO works well as the central controller in dimmable luminaires and RGBW lighting fixtures. Its 8-bit and 5-bit DACs generate analog dimming signals while PWM-driven timers produce high-resolution LED current control. The EUSART and I2C peripherals support DMX-512, DALI, or 0-10 V dimming interfaces after external transceiver conditioning. Because lighting controllers typically sit on a constant-current driver stage with 3.3 V logic, the LF voltage range is well matched. Engineers should leverage the CWG peripheral for synchronized multi-channel PWM and exploit the 32 MHz HFINTOSC to eliminate an external crystal in cost-sensitive fixtures.
Recommended
Automotive Body Electronics (Sub-12V Subsystem)
While the PIC18LF25K40-I/SO is not AEC-Q100 qualified, it remains useful for non-critical automotive body subsystems operating from a 3.3 V post-regulator on the 12 V bus. The 32 KB Flash is ample for body-control firmware such as seat-position memory, mirror-folding logic, and ambient-light sensor hubs. The EUSART links to LIN transceivers for in-vehicle networking when paired with an external LIN PHY. Designers should always add TVS protection on VDD and exposed I/O pins because automotive transients can exceed the LF absolute maximum of 3.6 V. For AEC-Q100 applications, migrate to PIC18F25K40 with extended temperature grade.
Recommended
Industrial Sensor Hub / Data Logger
Industrial sensor hubs aggregate signals from thermocouples, RTDs, strain gauges, and 4-20 mA loops. The PIC18LF25K40-I/SO's 12-bit ADC with 24 channels and two comparators can digitize up to 24 analog inputs, with on-chip EEPROM storing calibration constants that survive power cycles. The 256 B EEPROM is enough for per-channel offset/gain factors and user-tunable parameters. A typical design uses RS-485 via the EUSART (with external transceiver) for multi-drop communication with a PLC. The wide -40C to +85C industrial temperature range covers most factory-floor enclosures. Use the MSSP peripherals for SPI-based ADC expansion if more than 24 channels are needed.
Recommended
USB Human Interface Device (Companion MCU)
Many USB peripherals (HID keyboards, mice, custom input devices) pair a USB transceiver MCU with a low-cost companion for button matrix scanning and LED control. While the PIC18LF25K40-I/SO lacks native USB, it can serve as the scanning companion sitting on a 3.3 V rail, scanning keys and forwarding events over I2C/SPI to a USB-capable host MCU such as the PIC18F24K50 or PIC18F14K50. The 25 I/O pins easily drive a 5x5 button matrix and several indicator LEDs. The XLP sleep modes keep the standby current negligible in battery-powered input devices such as wireless presenters or game controllers.
Recommended
Recommended Products Summary
Engineering reference data for PIC18LF25K40-I/SO — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F25K40-I/SO | PIC18LF24K40-I/SO | PIC18LF25K40-E/SO | PIC18LF25K42-I/SO | PIC18F25Q43-I/SO |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-SOIC | 28-SOIC - same | 28-SOIC - same | 28-SOIC - same | 28-SOIC - same | 28-SOIC - same |
| Operating Voltage Range | 1.8 V to 3.6 V | 2.3 V to 5.5 V | 1.8 V to 3.6 V | 1.8 V to 3.6 V | 1.8 V to 3.6 V | 1.8 V to 5.5 V |
| Flash Memory | 32 KB | 32 KB | 16 KB | 32 KB | 32 KB | 32 KB |
| SRAM | 2 KB | 2 KB | 2 KB | 2 KB | 2 KB | 2 KB |
| EEPROM | 256 B | 256 B | 256 B | 256 B | 256 B | 256 B |
| Maximum CPU Frequency | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz |
| Operating Temperature | -40C to +85C (I) | -40C to +85C | -40C to +85C | -40C to +125C (E) | -40C to +85C | -40C to +85C |
| XLP Technology | Yes | Yes | Yes | Yes | Yes | Yes |
Key Differentiators
- XLP low-power technology in the LF sub-family (vs PIC18F25K40-I/SO)
- 32 KB Flash vs 16 KB in the lower-memory variant (vs PIC18LF24K40-I/SO)
- Industrial temperature range option in the same die (vs PIC18LF25K40-E/SO)
Design Notes
Decouple VDD with a 100 nF ceramic capacitor placed within 5 mm of the VDD pins (pin 9 and pin 28 on the 28-SOIC). For designs with heavy ADC use, add a 10 uF bulk capacitor plus ferrite bead between the analog and digital VDD rails. The LF variant operates from 1.8 V to 3.6 V - ensure the LDO headroom stays below 3.6 V at maximum input including transients.
Do not substitute PIC18LF25K40-I/SO in a 5 V design - its absolute maximum VDD is 3.6 V. Conversely, PIC18F25K40-I/SO can replace the LF variant only when the rail stays within the LF range. When migrating firmware from K22 to K40, verify that register names for the new analog peripherals are updated; the CWG and ZCD modules on K40 are new and not present on K22.
Keep analog input traces short and route them away from the PWM-driven switching traces to minimize ADC crosstalk. Place a ground pour under the SOIC and stitch it to VDEV with multiple vias. The MCLR pin (pin 27) requires a 10 kohm pull-up to VDD for normal operation; do not leave it floating. ICSP pins RB6/RB7 must be accessible for in-circuit programming and debugging.
Compliance Information
RoHS and REACH compliant per Microchip product page. Not AEC-Q100 qualified - this part is intended for industrial and consumer applications, not automotive safety-critical. For AEC-Q100 designs use AEC-Q100-qualified Microchip PIC18 variants.