PIC18LF25K42-E/SP - 8-bit 64MHz 32KB Flash XLP MCU | Microchip
MPN: PIC18LF25K42-E/SP ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.85 | $2.85 |
| 10 | $2.57 | $25.70 |
| 100 | $2.21 | $221.00 |
| 500 | $1.95 | $975.00 |
| 1,000 | $1.72 | $1,720.00 |
PIC18LF25K42-E/SP Overview
What is a PIC18 microcontroller? PIC18 is Microchip's 8-bit enhanced Harvard RISC architecture - one of the longest-running MCU families in the industry. PIC18F/LF devices pair a small instruction set with rich peripheral integration and have a hypernym hierarchy of microcontroller -> MCU -> embedded controller -> semiconductor. The 'LF' prefix denotes the low-voltage (1.8-3.6V) variant while the 'F' denotes the standard (2.3-5.5V) variant, so PIC18LF25K42 and PIC18F25K42 share the same silicon die and pinout but differ only in operating voltage range.
Key differentiating features include 25 direct-driven I/O pins, four 16-bit timers, six PWM channels, a 12-bit ADC2 with up to 35 analog channels, two comparators, two DACs (5-bit and 12-bit), DMA controller, Zero-Cross-Detect (ZCD), complementary waveform generator (CWG), and peripheral pin select (PPS) for flexible signal mapping. Core-independent peripherals such as CLC, CWG, and hardware limit timer (HLT) offload tasks from the CPU.
The architecture combines an 8-bit data path with a 16-bit instruction word, supporting MIPS throughput up to 16 MIPS at 64MHz. The instruction set is largely orthogonal with hardware multiply and a hardware stack. Vectored interrupts with peripheral interrupt prioritization reduce latency for time-critical events, while the direct memory access (DMA) controller moves data between peripherals and memory without CPU intervention, ideal for low-power ADC-to-RAM logging and UART-to-Flash buffering.
Typical applications include battery-powered IoT sensor nodes, portable medical and consumer devices, industrial sensor hubs, low-power wireless modules, and home appliances where extended battery life and rich peripherals matter. The XLP nanoWatt sleep modes and IDLE/DOZE/PMD (peripheral module disable) features make the part especially suited for energy-harvesting and always-on designs.
A key design trade-off: the 28-pin SPDIP footprint favors through-hole prototype and legacy designs but for high-volume SMD production, prefer the SPDIP sister part PIC18LF25K42-E/SO. Designers must configure PPS to map peripheral I/O onto the available pins, and must verify that the application's interrupt and DMA requirements are within the 2KB SRAM budget.
This page synthesizes distributor pricing, drop-in PIC18 alternatives, and practical design notes not found in the manufacturer datasheet, giving engineers and buyers a single reference for selection, sourcing, and replacement decisions.
Drop-in alternatives for PIC18LF25K42-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 PIC18LF25K42-E/SP (same form factor and footprint) — differing in ADC, Package, MSL Level, Operating Temperature, I/O Pins.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F25K42-I/SP
✅ Drop-In✓ In Stock
$2.51 / Unit
View Datasheet →PIC18LF24K42-E/SP
✅ Drop-In✓ In Stock
$1.38 / Unit
View Datasheet →PIC18LF25K40-I/SP
✅ Drop-In✓ In Stock
$1.74 / Unit
View Datasheet →PIC18LF23K22-E/SP
✅ Drop-In✓ In Stock
$1.94 / Unit
View Datasheet →PIC18LF25K22-E/SP
✅ Drop-In✓ In Stock
$1.85 / Unit
View Datasheet →PIC18LF25K42-E/SP Maximum Ratings & Electrical Characteristics
| Core | PIC18 8-bit RISC |
| Program Memory | 32 KB Flash (16K x 16) |
| Data Memory (RAM) | 2 KB |
| EEPROM | 256 B |
| Supply Voltage (Vcc/VDD) | 1.8 V to 3.6 V |
| I/O Pins | 25 |
| ADC | 12-bit ADC2 |
| DAC | 5-bit and 12-bit |
| Comparators | 2 |
| PWM Channels | 6 |
| Timers | 4 x 16-bit |
| Communication | UART, SPI, I2C |
| DMA Controller | Yes |
| Peripheral Pin Select (PPS) | Yes |
| Operating Temperature | -40C to +125C (E grade) |
| Package | 28-pin SPDIP (0.300", 7.62mm) |
| Mounting Type | Through-Hole |
| MSL Level | 1 (not moisture-sensitive for through-hole) |
| RoHS Status | Compliant |
| XLP Low Power | Yes (nanoWatt) |
PIC18LF25K42-E/SP Pin Configuration
| Pin 1 | RA0 — Digital I/O / analog input AN0 |
| Pin 2 | RA1 — Digital I/O / analog input AN1 |
| Pin 3 | RA2 — Digital I/O / analog input AN2 |
| Pin 4 | RA3 — Digital I/O / analog input AN3 / VREF+ |
| Pin 5 | RA4 — Digital I/O / analog input AN4 / DAC1OUT |
| Pin 6 | RA5 — Digital I/O / analog input AN5 |
| Pin 7 | RA6 — Digital I/O / analog input AN6 / OSC2 |
| Pin 8 | RA7 — Digital I/O / analog input AN7 / OSC1 |
| Pin 9 | RB0 — Digital I/O / analog input AN8 / ZCD |
| Pin 10 | RB1 — Digital I/O / analog input AN9 |
| Pin 11 | VDD — Positive supply voltage |
| Pin 12 | VSS — Ground reference |
| Pin 13 | RB2 — Digital I/O / analog input AN10 / CWG1FLT |
| Pin 14 | RB3 — Digital I/O / analog input AN11 |
| Pin 15 | RB4 — Digital I/O / analog input AN12 |
| Pin 16 | RB5 — Digital I/O / analog input AN13 |
| Pin 17 | RB6 — Digital I/O / analog input AN14 / ICDCLK |
| Pin 18 | RB7 — Digital I/O / analog input AN15 / ICData |
| Pin 19 | RC0 — Digital I/O / analog input AN16 |
| Pin 20 | RC1 — Digital I/O / analog input AN17 |
| Pin 21 | RC2 — Digital I/O / analog input AN18 |
| Pin 22 | RC3 — Digital I/O / analog input AN19 / SCL1 |
| Pin 23 | RC4 — Digital I/O / analog input AN20 / SDA1 |
| Pin 24 | RC5 — Digital I/O / analog input AN21 |
| Pin 25 | RC6 — Digital I/O / analog input AN22 / TX1 |
| Pin 26 | RC7 — Digital I/O / analog input AN23 / RX1 |
| Pin 27 | VDD — Positive supply voltage |
| Pin 28 | VSS — Ground reference |
Typical Applications
PIC18LF25K42-E/SP is suitable for 6 applications: Battery-Powered IoT Sensor Nodes, Portable Medical Devices, Industrial Sensor Hubs, Home Appliance Control Boards, Low-Power Wireless Modules, Consumer Electronics and Toys.
Battery-Powered IoT Sensor Nodes
The PIC18LF25K42-E/SP fits battery-powered IoT sensor nodes thanks to its XLP nanoWatt technology with sub-microamp sleep current and wide 1.8V-3.6V VDD that interfaces directly to single-cell Li-Ion or 2x AA batteries. Its 12-bit ADC2 with 35 analog channels supports multiple sensors (temperature, humidity, light, gas) multiplexed into a single chip, while the 6 PWM channels can dim indicator LEDs or drive haptics. The DMA controller moves ADC samples to RAM without waking the CPU, enabling years of life on small batteries.
Recommended
Portable Medical Devices
Portable medical and health-monitoring devices such as pulse oximeters, glucose meters, and digital thermometers benefit from the PIC18LF25K42-E/SP's low-voltage 1.8V-3.6V operation, 12-bit ADC2 resolution for accurate biosignal acquisition, and extended -40C to +125C E-grade temperature range that supports sterilization and storage. The 32 KB Flash stores calibration tables and BLE stack libraries, while the 256-byte EEPROM stores patient-specific data and unit serial numbers non-volatilely. The DAC outputs allow direct drive of audio alerts without external components.
Recommended
Industrial Sensor Hubs
Industrial sensor hubs with 4-20mA loop interfaces, Modbus RTU, and field-sensor aggregation map well to the PIC18LF25K42-E/SP's UART, SPI, and I2C peripherals plus DMA-driven high-speed data buffering. The 12-bit ADC2 with hardware averaging and the 5-bit DAC enable sensor conditioning on-chip. The wide 1.8V-3.6V supply simplifies operation from regulated 24V-to-3.3V industrial rails, while the -40C to +125C E-grade tolerates outdoor and factory-floor environments. PPS allows remapping of peripherals to available pins across PCB revisions.
Recommended
Home Appliance Control Boards
Home appliance control boards (washing machines, dishwashers, induction cookers, smart thermostats) are classic fits for the PIC18LF25K42-E/SP. The CWG (complementary waveform generator) directly drives power-converter half-bridges and motor inverters, while the 6 PWM channels handle triac dimming, motor speed control, and BLDC fan commutation. Zero-Cross-Detect (ZCD) and the 12-bit DAC enable variable-frequency drive control loops. The 32 KB Flash supports IEC 60730 safety-class B firmware libraries.
Recommended
Low-Power Wireless Modules
Low-power wireless sensor modules (LoRa, Sub-GHz, BLE, Zigbee) benefit from the PIC18LF25K42-E/SP's sub-microamp sleep current, DMA-driven SPI/UART transfers to the radio, and PPS that maps the radio IRQ to any available pin. The MCU can sleep while the radio is receiving, waking only on an external interrupt for autonomous event handling. The 2 KB SRAM accommodates LoRaWAN stack fragments, and the 32 KB Flash holds the full application plus over-the-air firmware update bootloaders.
Recommended
Consumer Electronics and Toys
Cost-sensitive consumer electronics and electronic toys benefit from the PIC18LF25K42-E/SP's sub-$1.72 (k=016) pricing, small 28-SPDIP through-hole package ideal for hand-soldered prototypes, and integrated features (PWM, ADC, comparators) that eliminate external op-amps and timers. The 12-bit DAC generates audio tones for sound effects; the comparator pairs form touch/proximity sensing; and the DMA + UART bridge support LED animation chips like WS2811. The wide operating range suits battery or USB-powered operation.
Recommended
Recommended Products Summary
Engineering reference data for PIC18LF25K42-E/SP — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F25K42-I/SP | PIC18LF24K42-E/SP | PIC18LF25K40-I/SP | PIC18LF23K22-E/SP | PIC18LF25K22-E/SP |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-pin SPDIP | 28-pin SPDIP - same | 28-pin SPDIP - same | 28-pin SPDIP - same | 28-pin SPDIP - same | 28-pin SPDIP - same |
| Program Memory (Flash) | 32 KB | 32 KB | 16 KB | 32 KB | 8 KB | 32 KB |
| Data Memory (RAM) | 2 KB | 2 KB | 1 KB | 2 KB | 512 B | 1.5 KB |
| Operating Voltage | 1.8V to 3.6V | 2.3V to 5.5V | 1.8V to 3.6V | 1.8V to 3.6V | 1.8V to 3.6V | 1.8V to 3.6V |
| Maximum Clock Speed | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz |
| Operating Temperature | -40C to +125C (E) | -40C to +85C (I) | -40C to +125C (E) | -40C to +85C (I) | -40C to +125C (E) | -40C to +125C (E) |
| DMA Controller | Yes | Yes | Yes | No | No | No |
| 12-bit DAC2 | Yes | Yes | Yes | No | No | No |
Key Differentiators
- Wider 1.8V-3.6V operating voltage vs PIC18F25K42's 2.3V-5.5V (vs PIC18F25K42-I/SP)
- Extended -40C to +125C E-grade vs I-grade -40C to +85C (vs PIC18F25K42-I/SP)
- DMA controller + 12-bit DAC2 absent in K40/K22/K24 predecessors (vs PIC18LF25K40-I/SP)
Design Notes
Decouple VDD/VSS pins with a 100nF ceramic capacitor placed as close as possible to pin 11 and a bulk 1uF or larger at the board power entry. The PIC18LF25K42-E/SP has two VDD pins (11 and 27) and two VSS pins (12 and 28) - both pairs must be decoupled. Without proper decoupling, ADC2 readings exhibit noise and CWG/PWM outputs show jitter at high switching frequencies.
The PPS (peripheral pin select) feature requires explicit configuration in code; peripherals such as UART, SPI, and PWM outputs do not appear on fixed pins by default. Developers new to K42 family must set the PPS registers before using peripherals. Always enable the peripheral output by writing to the corresponding PPS output register (e.g., RC6PPS for TX1 on RC6), otherwise peripherals will not function.
Keep the analog signal traces (ANx pins) away from digital switching traces and PWM outputs to minimize ADC2 noise coupling. Use a separate ground plane or analog ground island for AVSS if high-precision ADC2 readings (>10-bit effective) are required. Place the external VREF+ decoupling capacitor (100nF) close to pin 4 (RA3) if used as the ADC reference.
Compliance Information
RoHS and REACH compliant per Microchip product page. E-grade (-40C to +125C) supports industrial use but is NOT AEC-Q100 qualified - for automotive designs, Microchip recommends PIC18F25K42 AEC-Q100 qualified variants.