PIC18F24K40-E/ML - 64MHz 8-bit MCU 16KB Flash 28-QFN | Microchip
MPN: PIC18F24K40-E/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $2.55 | $2.55 |
| 10 | $2.32 | $23.20 |
| 100 | $1.95 | $195.00 |
| 500 | $1.72 | $860.00 |
| 1,000 | $1.55 | $1,550.00 |
PIC18F24K40-E/ML Overview
An 8-bit microcontroller (MCU) is a single-chip computer that integrates a CPU, memory, timers, and I/O peripherals around an 8-bit data path. PIC18F-series MCUs sit in Microchip's mid-range 8-bit lineup (PIC10/12/16/18 family), chosen for low cost, deterministic interrupt latency, and a mature toolchain (MPLAB X, XC8). The PIC18F24K40-E/ML sits in the MCU -> microcontroller -> 8-bit MCU -> PIC18 hierarchy and is widely used as a drop-in upgrade for legacy PIC16/PIC18 designs that need more analog and richer peripherals.
Key features include 16 KB self-programmable Flash, 1 KB SRAM, 256 B EEPROM, 64 MHz operation, 24-channel 10-bit ADC, 5-bit DAC, two comparators, 10-bit PWM with CCP, Complementary Waveform Generator (CWG), Hardware Limit Timer (HLT), Windowed Watchdog Timer (WWDT), and CRC/Memory Scan. XLP (eXtreme Low Power) technology delivers <50 nA typical sleep current with RTCC. The 28-QFN package with exposed thermal pad supports 25 I/O pins and provides a low-thermal-resistance path for higher-current GPIO drive.
Technical depth: the CIP architecture lets the CWG, ADC, DAC, comparators, and timers operate without CPU intervention, enabling deterministic hardware-driven control loops for motor, power-conversion, and lighting applications. The 64 MHz core delivers 16 MIPS of throughput, while Peripheral Pin Select (PPS) remaps digital functions to any I/O, simplifying PCB layout. The integrated Hardware Limit Timer (HLT) provides fault-rate-limited PWM shutdown for safety-critical applications.
Typical applications include automotive body and interior modules, IoT sensor nodes, battery-powered sensor hubs, BLDC and stepper motor control, digital lighting, and home appliances. The extended -40C to +125C temperature range makes the -E/ML variant particularly suitable for underhood automotive and harsh-environment industrial designs.
Design consideration: confirm the 28-QFN footprint matches your PCB land pattern and that the exposed thermal pad is soldered to a sufficient copper pour for heat spreading. Programming via ICSP requires dedicated RG0/PGD, RG1/PGC, and MCLR/VPP pins routed for probe access. Plan PPS assignments early because peripheral-to-pin remapping occurs at runtime and can save board space but complicates firmware reuse.
This page synthesizes distributor pricing, drop-in alternatives, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for PIC18F24K40-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 PIC18F24K40-E/ML (same form factor and footprint) — differing in ADC, Package, DAC, I/O Pins, Core Architecture.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F25K40-E/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F24K40-I/ML
✅ Drop-In✓ In Stock
$1.66 / Unit
View Datasheet →PIC18F24K22-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F24K20-E/ML
✅ Drop-In✓ In Stock
$2.45 / Unit
View Datasheet →PIC18F23K22-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F24K40-E/ML Maximum Ratings & Electrical Characteristics
| Family | PIC18F K40 series |
| Core | PIC18 8-bit RISC |
| CPU Speed | 64 MHz (16 MIPS) |
| Program Memory (Flash) | 16 KB |
| Data SRAM | 1 KB |
| Data EEPROM | 256 B |
| Operating Voltage | 2.3 V to 5.5 V |
| ADC | 10-bit, 24 channels |
| DAC | 5-bit, 1 channel |
| Comparators | 2 |
| PWM Channels | 10-bit PWM, multiple CCP |
| CIP Peripherals | CWG, WWDT, CRC/SCAN, HLT |
| I/O Pins | 25 |
| Package | 28-QFN (6x6 mm) |
| Temperature Grade | -40C to +125C (Extended -E) |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
| MSL Level | 1 |
PIC18F24K40-E/ML Pin Configuration
| Pin 1 | RA5 — Digital I/O / analog input / ICSP programming pin |
| Pin 2 | RA4 — Digital I/O / analog input |
| Pin 3 | RA3 — Digital I/O / analog input |
| Pin 4 | RC5 — Digital I/O / analog input |
| Pin 5 | RC4 — Digital I/O / analog input |
| Pin 6 | RC3 — Digital I/O / analog input |
| Pin 7 | RC2 — Digital I/O / analog input |
| Pin 8 | RC1 — Digital I/O / analog input |
| Pin 9 | RC0 — Digital I/O / analog input |
| Pin 10 | RC6 — Digital I/O / TX/CK (peripheral pin select) |
| Pin 11 | RC7 — Digital I/O / RX/DT (peripheral pin select) |
| Pin 12 | RB7 — Digital I/O / ICSP PGD |
| Pin 13 | RB6 — Digital I/O / ICSP PGC |
| Pin 14 | RB5 — Digital I/O / analog input |
| Pin 15 | RB4 — Digital I/O / analog input |
| Pin 16 | RB3 — Digital I/O / analog input |
| Pin 17 | RB2 — Digital I/O / analog input |
| Pin 18 | RB1 — Digital I/O / analog input |
| Pin 19 | RB0 — Digital I/O / analog input / interrupt-on-change |
| Pin 20 | VDD — Positive supply voltage (2.3V-5.5V) |
| Pin 21 | VSS — Ground reference |
| Pin 22 | RA7 — Digital I/O / analog input / oscillator |
| Pin 23 | RA6 — Digital I/O / analog input / oscillator |
| Pin 24 | RA1 — Digital I/O / analog input / DAC reference |
| Pin 25 | RA0 — Digital I/O / analog input / DAC output |
| Pin 26 | RA2 — Digital I/O / analog input |
| Pin 27 | MCLR — Master clear (reset) / ICSP programming voltage |
| Pin 28 | RE2 — Digital I/O / analog input |
| Pin 29 | EP — Exposed thermal pad - connect to VSS for heat spreading |
Typical Applications
PIC18F24K40-E/ML is suitable for 6 applications: Automotive Body and Interior Modules, Battery-Powered IoT Sensor Hubs, BLDC and Stepper Motor Control, Digital LED Lighting and Signage, Home Appliance Control Boards, Industrial Sensor and Actuator Nodes.
Automotive Body and Interior Modules
The PIC18F24K40-E/ML's extended -40C to +125C temperature grade and AEC-Q100 qualification make it ideal for automotive body controllers, interior lighting, seat control, and HVAC damper actuators. The 64 MHz core delivers 16 MIPS, while the integrated CWG and HLT peripherals provide hardware fault shutdown for motor and LED driver stages. The 24-channel 10-bit ADC reads thermistor, switch, and position-sensor inputs directly. PPS remaps digital functions across the 28-QFN pinout, freeing PCB routing for compact module designs.
Recommended
Battery-Powered IoT Sensor Hubs
The PIC18F24K40-E/ML's XLP technology delivers <50 nA typical sleep current with RTCC and WDT active, enabling years of battery life on coin-cell or 2x AA power. The 24-channel ADC reads temperature, humidity, gas, and motion sensor inputs; the 5-bit DAC and comparators provide threshold-based wake-up triggers. The 16 KB Flash holds small BLE/Zigbee stack bridges or local sensor-fusion firmware, and PPS minimizes board space by remapping UART/I2C/SPI to any I/O. CIP peripherals let the ADC and CWG run autonomously during deep sleep.
Recommended
BLDC and Stepper Motor Control
The PIC18F24K40-E/ML drives small BLDC and stepper motors via the integrated Complementary Waveform Generator (CWG), which generates complementary PWM with dead-band control without CPU intervention. The 10-bit PWM with CCP modules handles speed and torque loops; the Hardware Limit Timer (HLT) provides hardware-rate-limited shutdown on overcurrent faults. The 5-bit DAC and two comparators form a hardware current-limit loop. At 16 MIPS the core handles position decoding, FOC math for low-RPM, or trapezoidal commutation for fans and pumps.
Recommended
Digital LED Lighting and Signage
The PIC18F24K40-E/ML controls addressable LED strings, dimmable drivers, and architectural lighting via its CWG peripheral, which generates high-resolution PWM at hardware rates up to 64 MHz. The 24-channel ADC reads ambient light sensors and potentiometer dimmers; the 5-bit DAC sets constant-current driver references. WWDT and CRC/SCAN provide functional safety for commercial lighting, and PPS lets engineers route PWM outputs to any of the 25 I/O pins, simplifying multi-zone lighting PCBs. XLP sleep current supports battery-powered emergency luminaires.
Recommended
Home Appliance Control Boards
White goods, kitchen appliances, and small HVAC units use the PIC18F24K40-E/ML for user-interface control, sensor reading, and relay/triac switching. The integrated comparators and 10-bit ADC read temperature probes, capacitive touch buttons via CVD, and AC zero-cross signals. The CWG and HLT handle triac firing with hardware safety interlocks. The extended -40C to +125C temperature grade supports oven and dishwasher environments. 16 KB Flash comfortably fits user-interface state machines plus bootloader for field firmware updates.
Recommended
Industrial Sensor and Actuator Nodes
Factory automation edge nodes use the PIC18F24K40-E/ML to read analog sensors (4-20 mA, 0-10 V, RTD, thermocouple) and drive digital outputs to actuators and indicators. The 24-channel 10-bit ADC multiplexes multiple sensor inputs; the 10-bit PWM and CCP modules drive proportional valves and motor speeds. UART, I2C, and SPI peripherals (remappable via PPS) connect to industrial bus transceivers, displays, and EEPROM. The extended temperature grade handles cabinet environments, and WWDT provides functional-safety supervision.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F24K40-E/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F25K40-E/ML | PIC18F24K40-I/ML | PIC18F24K22-I/ML | PIC18F24K20-E/ML | PIC18F23K22-I/ML |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-QFN (6x6 mm) | 28-QFN (6x6 mm) - same | 28-QFN (6x6 mm) - same | 28-QFN - same footprint | 28-QFN - same footprint | 28-QFN - same footprint |
| Flash Memory | 16 KB | 32 KB | 16 KB | 16 KB | 16 KB | 8 KB |
| SRAM | 1 KB | 2 KB | 1 KB | 768 B | 768 B | 512 B |
| CPU Speed | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) |
| Temperature Grade | -40C to +125C (Extended -E) | -40C to +125C (E) | -40C to +85C (Industrial) | -40C to +85C (Industrial) | -40C to +125C (E) | -40C to +85C (Industrial) |
| CIP Peripherals | CWG, WWDT, HLT, CRC/SCAN, CVD | CWG, WWDT, HLT, CRC/SCAN, CVD | CWG, WWDT, HLT, CRC/SCAN, CVD | No CWG, no HLT, no PPS | No CWG, no WWDT, no PPS | No CWG, no HLT, no PPS |
| ADC Channels / Resolution | 24 channels / 10-bit | 24 channels / 10-bit | 24 channels / 10-bit | 17 channels / 10-bit | 13 channels / 10-bit | 17 channels / 10-bit |
Key Differentiators
- Core Independent Peripherals (CIP) - CWG, HLT, CRC/SCAN (vs PIC18F24K22-I/ML)
- Peripheral Pin Select (PPS) - remappable digital functions (vs PIC18F24K20-E/ML)
- Extended -40C to +125C temperature grade (E) (vs PIC18F24K40-I/ML)
- XLP (eXtreme Low Power) - <50 nA sleep current (vs PIC18F24K22-I/ML)
Design Notes
The 28-QFN (6x6 mm) package requires a land pattern with a central thermal pad (EP) that must be soldered to a copper pour connected to VSS. Without this connection, thermal dissipation suffers and the device can hit thermal shutdown under heavy GPIO load. Use an array of thermal vias under the EP - 0.3 mm drill, 0.5 mm pitch - to spread heat into inner PCB layers. Keep digital traces away from the analog ADC inputs (RA0-RA7, RB0-RB7, RC0-RC7) to minimize coupling noise; use a ground guard ring around sensitive analog signals.
Place a 100 nF decoupling capacitor as close as possible to the VDD pin (pin 20) with a wide, short trace to VSS. Add a bulk 1 uF to 10 uF capacitor on the VDD rail near the MCU. For ADC accuracy, add a small ferrite bead or 10 ohm resistor between the MCU VDD and the AV analog supply if noise is observed. Estimated: with 64 MHz operation and all peripherals active, peak current can reach 15 mA; XLP sleep mode reduces this to <50 nA typical. Plan power-rail sequencing if the MCU shares supplies with motor drivers.
Do not leave the MCLR pin floating - always pull it to VDD through a 10 kohm resistor (or tie directly if not used) to prevent spurious resets. The ICSP pins RG0/PGD and RG1/PGC must be reserved for in-circuit programming access; do not load them with low-impedance peripherals. Programming voltage on MCLR/VPP must reach 8V-9V during ICSP - ensure your MCLR pull-down network does not divide this voltage below spec. Finally, Peripheral Pin Select (PPS) remapping must be unlocked via the PPSLOCK register sequence before configuration; forgetting this sequence is the most common firmware-startup bug.
PPS allows digital peripherals (UART, I2C, SPI, PWM, CWG) to be remapped to most I/O pins, giving flexibility in PCB routing. Group high-speed signals (SPI SCK, PWM outputs) close together and away from analog inputs. Route the 10-bit ADC traces in a star pattern from a single quiet ground point to minimize crosstalk. For motor-control applications using CWG, keep the complementary PWM outputs on adjacent pins to maintain matched trace impedance and reduce shoot-through from layout imbalance.
Compliance Information
AEC-Q100 qualified under the -E extended temperature grade. RoHS compliant per Microchip product page. Lead-free and halogen-free per package materials declaration.