PIC18F25K40-E/ML - 32KB Flash 8-bit MCU QFN-28 | Microchip
MPN: PIC18F25K40-E/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.4 | $2.40 |
| 10 | $2.16 | $21.60 |
| 100 | $1.9 | $190.00 |
| 500 | $1.68 | $840.00 |
| 1,000 | $1.42 | $1,420.00 |
PIC18F25K40-E/ML Overview
An 8-bit microcontroller (MCU) is a programmable system-on-chip that integrates a CPU core, Flash program memory, RAM, peripherals, and I/O into a single device. MCUs sit in the embedded computing hierarchy between simple logic ICs and 32-bit application processors, serving deterministic, low-power, real-time control tasks such as motor drive, sensor conditioning, and human-machine interface. The PIC18 family is Microchip's mid-range 8-bit platform, positioned above the baseline PIC10/12/16 devices and below the dsPIC and PIC32 families, and is commonly used in cost-sensitive industrial and consumer designs.
Key features of the PIC18F25K40 include a 10-bit ADC with up to 24 channels, a 5-bit DAC, two comparators, configurable logic cells (CLC), Complementary Waveform Generator (CWG), Windowed Watchdog Timer (WWDT), and a CRC/SCAN memory scanner. eXtreme Low Power (XLP) technology and nanoWatt XLP peripherals provide low sleep currents suitable for battery-powered products. The 28-QFN footprint integrates ground/thermal bond pads underneath, lowering thermal resistance for higher ambient temperatures.
The device uses the standard PIC18 enhanced Harvard architecture with a 16-bit instruction word and 8-bit data path, providing deterministic instruction timing and small footprint code. Core Independent Peripherals (CIPs) such as CWG, CLC, and the hardware CRC/SCAN can execute logic, signal generation, and memory validation without CPU involvement, offloading the core and lowering average power.
Typical applications include IoT sensor nodes, white goods and small appliances, HVAC control boards, battery management units, lighting controllers, and general-purpose embedded control where 5V tolerance and low sleep current are important.
When designing with this part, confirm that your toolchain supports the PIC18 K40 family (MPLAB X IDE with XC8 compiler) and that the QFN-6x6 EP land pattern matches your PCB thermal and solder process. The exposed pad must be soldered to the board for electrical grounding and thermal dissipation.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found on a typical manufacturer product page.
Drop-in alternatives for PIC18F25K40-E/ML — 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 PIC18F25K40-E/ML (same form factor and footprint) — differing in ADC, Package, Program Memory (Flash), Operating Temperature.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
No drop-in alternatives available for this product.
Request AlternativesPIC18F25K40-E/ML Maximum Ratings & Electrical Characteristics
| Core | PIC18 8-bit RISC |
| Program Memory (Flash) | 32 KB |
| Data RAM | 2 KB |
| Data EEPROM | 256 B |
| Maximum CPU Frequency | 64 MHz |
| Supply Voltage (Vdd) | 2.3 V to 5.5 V |
| Operating Temperature | -40 C to +125 C (Extended, -E) |
| I/O Pins | 25 |
| ADC | 10-bit, up to 24 channels |
| DAC | 5-bit, 1 channel |
| Comparators | 2 |
| PWM Outputs | Yes (CCP/MCCP) |
| Core Independent Peripherals | CLC, CWG, CRC/SCAN, WWDT |
| Package | 28-QFN (6x6 mm) with EP |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
| Lead-Free | Yes |
PIC18F25K40-E/ML Pin Configuration
| Pin 1 | RA2 — Port A bit 2 / analog input |
| Pin 2 | RA3 — Port A bit 3 / analog input |
| Pin 3 | RA4 — Port A bit 4 / analog input |
| Pin 4 | RA5 — Port A bit 5 / analog input |
| Pin 5 | RA6 — Port A bit 6 / oscillator |
| Pin 6 | RA7 — Port A bit 7 / oscillator |
| Pin 7 | VSS — Ground reference |
| Pin 8 | VDD — Positive supply voltage |
| Pin 9 | RB0 — Port B bit 0 / interrupt-on-change |
| Pin 10 | RB1 — Port B bit 1 / interrupt-on-change |
| Pin 11 | RB2 — Port B bit 2 / interrupt-on-change |
| Pin 12 | RB3 — Port B bit 3 / interrupt-on-change |
| Pin 13 | RB4 — Port B bit 4 / interrupt-on-change |
| Pin 14 | RB5 — Port B bit 5 / interrupt-on-change |
| Pin 15 | RB6 — Port B bit 6 / ICSCLK |
| Pin 16 | RB7 — Port B bit 7 / ICSDA |
| Pin 17 | RC0 — Port C bit 0 / analog input |
| Pin 18 | RC1 — Port C bit 1 / analog input |
| Pin 19 | RC2 — Port C bit 2 / analog input |
| Pin 20 | RC3 — Port C bit 3 / analog input |
| Pin 21 | RC4 — Port C bit 4 / analog input |
| Pin 22 | RC5 — Port C bit 5 / analog input |
| Pin 23 | RC6 — Port C bit 6 / analog input |
| Pin 24 | RC7 — Port C bit 7 / analog input |
| Pin 25 | RE3 — Port E bit 3 (MCLR on some K40 variants) |
| Pin 26 | RA0 — Port A bit 0 / analog input |
| Pin 27 | RA1 — Port A bit 1 / analog input |
| Pin 28 | VDD — Positive supply voltage (second VDD pin) |
Typical Applications
PIC18F25K40-E/ML is suitable for 6 applications: IoT Sensor Node / Battery-Powered Wireless End Node, White Goods and Small Appliance Control, HVAC Control Board (Thermostat, Fan Controller), LED Lighting Controller and Driver, Industrial Sensor Conditioning and Transmitter, Automotive Body Electronics (Non-Safety).
IoT Sensor Node / Battery-Powered Wireless End Node
The PIC18F25K40's nanoWatt XLP sleep current (typical 30-50 nA in sleep with RTCC running) and 2.3V-5.5V supply make it ideal for IoT sensor nodes that spend most of their life in deep sleep and wake periodically to read sensors. The 10-bit ADC with up to 24 channels handles multiple analog sensors (temperature, light, humidity) without external multiplexing, and the CLC peripheral lets hardware threshold comparisons trigger a CPU interrupt without firmware polling - cutting average current by an order of magnitude versus polled designs. Compared to a 32-bit ARM Cortex-M0+ at the same price, the PIC18F25K40 trades MIPS for deterministic timing and lower sleep current. Typical pairings: an RN2483 LoRa modem or an NRF24L01 2.4 GHz radio on SPI, with the PIC18 sleeping between transmissions and waking via the CLC edge-triggered output.
Recommended
White Goods and Small Appliance Control
The PIC18F25K40's 5V tolerance, extended -40C to +125C temperature range (E suffix), and motor-control peripherals (CWG, MCCP for PWM) suit white-goods controllers like coffee machines, dishwashers, and countertop blenders. The 28-QFN (6x6) footprint fits tight enclosures, and the CWG peripheral generates complementary PWM with hardware dead-band control for TRIAC or MOSFET-driven heater elements without firmware jitter. The CRC/SCAN hardware block validates Flash memory at boot for Class B functional-safety compliance (IEC 60335-1), an increasingly common requirement for white goods. The 10-bit ADC handles NTC thermistor sensing, water-level probes, and motor current monitoring, while the 5-bit DAC drives set-point indicators or audio feedback tones.
Recommended
HVAC Control Board (Thermostat, Fan Controller)
In HVAC thermostats and fan-speed controllers, the PIC18F25K40's combination of 32KB Flash, 2KB RAM, and rich timer resources drives closed-loop PID temperature control without a DSP. The two comparators handle zero-cross detection for TRIAC-fired line-voltage loads, and the CWG outputs complementary PWM with dead-band control for brushless DC fan drivers. XLP nanoWatt technology keeps the standby thermostat quiescent current under 100 uA, helping meet ENERGY STAR standby budgets. The 5-bit DAC can drive an analog setpoint display or be repurposed as a reference for ratiometric sensor measurements, while the 24-channel ADC scans multiple temperature zones and humidity sensors.
Recommended
LED Lighting Controller and Driver
The PIC18F25K40 drives multi-channel LED lighting controllers, especially tunable-white and RGBW fixtures that need smooth logarithmic dimming. The CWG peripheral generates high-resolution PWM with hardware dead-band, eliminating shoot-through in half-bridge LED drivers and minimizing flicker. The 10-bit ADC reads ambient light sensors and potentiometers for closed-loop brightness control, while the CLC peripheral implements hardware linear-to-logarithmic dimming curves without CPU overhead, freeing the core for DMX-512 or DALI protocol handling. Compared to dedicated LED driver ICs, the PIC18F25K40 adds protocol flexibility at the cost of needing external MOSFETs and current-sense amplifiers.
Recommended
Industrial Sensor Conditioning and Transmitter
In 4-20 mA loop-powered industrial transmitters, the PIC18F25K40's low sleep current and 5V tolerance let it run from a current-loop-derived supply while driving a HART modem or analog output. The 10-bit ADC with hardware averaging (ADC2 with accumulation) reads bridge sensors, RTDs, or thermocouples with sufficient resolution for process-control applications, and the on-chip DAC generates the analog 4-20 mA setpoint via an external op-amp loop. The Windowed Watchdog Timer (WWDT) is mandatory for SIL-rated industrial transmitters, and the 32KB Flash accommodates Modbus or HART protocol libraries plus calibration constants stored in EEPROM. The CRC/SCAN peripheral validates program memory at startup per IEC 61508 SIL recommendations.
Recommended
Automotive Body Electronics (Non-Safety)
For non-safety automotive body modules (HVAC controls, seat controllers, mirror adjusters, interior lighting), the PIC18F25K40's extended temperature range and 5V tolerance handle the 12V battery environment with simple LDO regulation. The CWG peripheral drives small DC motors and solenoids with complementary PWM and dead-band protection, while the 24-channel ADC reads multiple position feedback signals. Note that the -E temperature grade supports -40C to +125C ambient operation but the part is not AEC-Q100 qualified; for AEC-Q100 automotive applications Microchip recommends the PIC18F25K40-I/ML or -E/ML with explicit automotive-grade part numbers and full PPAP documentation. The CRC/SCAN peripheral supports functional-safety diagnostics required by automotive OEMs.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F25K40-E/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F25K40-I/ML | PIC18LF25K40-I/ML | PIC18F26K40-E/ML | PIC18F24K40-E/ML | PIC18F25K22-I/ML |
|---|---|---|---|---|---|---|
| Package | 28-QFN (6x6 mm) | 28-QFN (6x6) - same | 28-QFN (6x6) - same | 28-QFN (6x6) - same | 28-QFN (6x6) - same | 28-QFN (6x6) - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 32 KB | 32 KB | 32 KB | 64 KB | 16 KB | 32 KB |
| RAM | 2 KB | 2 KB | 2 KB | 2 KB | 1 KB | 2 KB |
| Supply Voltage | 2.3V to 5.5V | 2.3V to 5.5V | 2.0V to 3.6V | 2.3V to 5.5V | 2.3V to 5.5V | 2.3V to 5.5V |
| Core Independent Peripherals | CLC, CWG, CRC/SCAN, WWDT | CLC, CWG, CRC/SCAN, WWDT | CLC, CWG, CRC/SCAN, WWDT | CLC, CWG, CRC/SCAN, WWDT | CLC, CWG, CRC/SCAN, WWDT | None (K22 family predates CIPs) |
| Operating Temperature | -40C to +125C (E) | -40C to +85C (I) | -40C to +85C (I) | -40C to +125C (E) | -40C to +125C (E) | -40C to +85C (I) |
| Unit Price (qty 1, USD) | 2.40 | approx 2.30 | approx 2.45 | approx 2.85 | approx 2.10 | approx 2.50 |
Key Differentiators
- Core Independent Peripherals (CIPs) including CLC, CWG, and CRC/SCAN in 8-bit MCU (vs PIC18F25K22-I/ML)
- nanoWatt XLP technology with 30-50 nA typical sleep current (vs PIC18F25K22-I/ML)
- Pin-compatible flash density scaling within the K40 family (vs PIC18F24K40-E/ML (16KB) and PIC18F26K40-E/ML (64KB))
Design Notes
Estimated: the 28-QFN (6x6) package has a typical theta_JA of around 35-40 C/W on a 4-layer JEDEC test board with the exposed pad soldered. At maximum CPU activity (64 MHz, all peripherals on, VDD 5.0V), the part dissipates roughly 15-20 mW, so junction rise is well under 1 C. The exposed pad must be soldered to a continuous ground copper pour with thermal vias to the inner ground plane for both electrical grounding and thermal dissipation - skipping the EP solder connection can raise junction temperature by 15-20 C in still air and degrade ADC accuracy from internal ground bounce.
Place a 100 nF ceramic decoupling capacitor within 3 mm of each VDD pin (pins 8 and 28) and a bulk 10 uF tantalum or ceramic on the supply trace. Keep ADC analog traces (RA0-RA5, RC0-RC7) away from PWM switching traces and from the CWG output pins; route AVdd separately from digital Vdd if the board has noisy switching converters. The ICSP pins (RB6/RB7) should be brought to a 6-pin header for in-circuit programming without disturbing the rest of the layout.
The PIC18F25K40 has two VDD pins (8 and 28) and two VSS pins - both pairs must be connected. Failing to connect both VDD pins can cause intermittent brown-out resets or ADC reference errors because internal analog circuits share the VDD bond wires. Also verify that the MCLR/RE3 pin configuration matches your reset scheme (internal weak pull-up vs external pull-up); the K40 default is enabled weak pull-up, which may not provide sufficient noise immunity in industrial environments with long cable harnesses.
To achieve the lowest sleep current, disable all unused peripherals via the PMD (Peripheral Module Disable) registers before entering sleep, and switch all I/O to inputs with no floating pins. The PIC18F25K40 datasheet shows typical sleep currents of 30-50 nA with RTCC running and no peripherals active, which is critical for battery-powered IoT nodes. Note that any floating input pin can draw 1-5 uA of leakage; configure all unused pins as outputs driving low, or enable the internal weak pull-ups and let the pin settle to a defined state.
Compliance Information
RoHS and REACH compliant per Microchip product page. Not AEC-Q100 qualified - select automotive-grade part numbers from Microchip for AEC-Q100 applications. Halogen-free status not specified in retrieved data.