PIC18F45K22-E/P - 8-bit MCU, 32KB Flash, 40MHz, PDIP-40 | Microchip
MPN: PIC18F45K22-E/P ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.58 | $4.58 |
| 10 | $4.12 | $41.20 |
| 100 | $3.55 | $355.00 |
| 500 | $3.1 | $1,550.00 |
| 1,000 | $2.78 | $2,780.00 |
PIC18F45K22-E/P Overview
A PIC18 microcontroller is a member of Microchip's 8-bit enhanced Harvard-architecture MCU family, sitting between PIC16 (baseline/mid-range) and PIC24/dsPIC (16-bit) families. Within the broader taxonomy, PIC18 belongs to microcontrollers -> integrated circuits -> semiconductors. The 'K' family designation refers to parts with nanoWatt XLP ultra-low-power peripherals including low-power sleep modes (deep sleep, doze, idle), making the PIC18F45K22 a strong fit for battery- or energy-harvesting applications that still require mid-range processing throughput.
Key features of the PIC18F45K22-E/P include: 32KB Flash program memory with self-programmability, 256 bytes of EEPROM data memory, 1536 bytes SRAM, two Enhanced USART modules, two MSSP (SPI/I2C) modules, two 10-bit PWM modules with up to 14-bit resolution, and 30 analog input channels via the 12-bit ADC. The 'E' temperature grade suffix indicates the extended industrial temperature range of -40C to +125C, suitable for industrial and automotive under-hood environments. The 'P' package suffix specifies the 40-pin PDIP through-hole package for prototyping, breadboarding, and legacy manufacturing lines.
Architecturally, the PIC18F45K22 uses a RISC instruction set with 16-bit instructions and an 8-bit data path, featuring hardware multiplier and 31-level hardware stack. The integrated nanoWatt XLP technology provides sleep currents below 100 nA typical, while active current consumption at 1 MHz is approximately 220 uA/MHz.
Typical applications include industrial sensor interfaces, building automation controllers, low-power wireless sensor nodes, HVAC control panels, and battery-powered data loggers. The wide temperature range and XLP technology make it suitable for remote telemetry units and IoT edge devices operating from coin-cell or energy-harvested power sources.
Design consideration: when migrating from PDIP to surface-mount QFN/TQFP variants (e.g., PIC18F45K22-E/ML or PIC18F45K22-E/MV), verify peripheral pin-out mapping because QFN/TQFP pin assignments differ from PDIP. The 'E/P' combination specifically denotes extended temperature, PDIP-40 packaging.
This page synthesizes distributor pricing, drop-in replacement options, and practical design notes not found in a single manufacturer datasheet, with alternatives sourced from the verified Microchip PIC18F45K22 family and validated cross-references.
Drop-in alternatives for PIC18F45K22-E/P — 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 PIC18F45K22-E/P (same form factor and footprint) — differing in Package, ADC, Program Memory (Flash), Timers, Mounting Type.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F45K22-I/P
✅ Drop-In✓ In Stock
$2.1 / Unit
View Datasheet →PIC18F44K22-E/P
✅ Drop-In✓ In Stock
$2.32 / Unit
View Datasheet →PIC18F45K22-E/P Maximum Ratings & Electrical Characteristics
| Architecture | 8-bit PIC18 (Harvard RISC) |
| Program Memory (Flash) | 32 KB |
| Data Memory (SRAM) | 1536 bytes |
| EEPROM Data Memory | 256 bytes |
| Maximum Clock Speed | 40 MHz (64 MHz instruction) |
| Supply Voltage (VDD) | 4.2 V to 5.5 V |
| I/O Pins | 36 |
| ADC Resolution | 12-bit |
| ADC Channels | Up to 30 analog inputs |
| PWM Modules | Two CCP/ECCP modules, up to 14-bit resolution |
| Communication Peripherals | 2x Enhanced USART, 2x MSSP (SPI/I2C) |
| Timers | Four 16-bit timers, one 8-bit timer |
| Operating Temperature Range | -40C to +125C (Extended 'E' grade) |
| Package | PDIP-40 (P) |
| Low-Power Technology | nanoWatt XLP |
| RoHS Status | Compliant |
| Mounting Type | Through-Hole (DIP) |
PIC18F45K22-E/P Pin Configuration
| Pin 1 | MCLR/VPP/RE3 — Master Clear (reset) input / RE3 digital input |
| Pin 2 | RA0/AN0/C1INA — PORTA bit 0 / ADC input 0 / comparator input |
| Pin 3 | RA1/AN1/C2INA — PORTA bit 1 / ADC input 1 |
| Pin 4 | RA2/AN2/VREF- — PORTA bit 2 / ADC input 2 / negative reference |
| Pin 5 | RA3/AN3/VREF+ — PORTA bit 3 / ADC input 3 / positive reference |
| Pin 6 | RA4/T0CKI/C1OUT — PORTA bit 4 / Timer0 clock input |
| Pin 7 | RA5/AN4/SS1/C2OUT — PORTA bit 5 / ADC input 4 / SPI slave select |
| Pin 8 | RE0/AN5 — PORTE bit 0 / ADC input 5 |
| Pin 9 | RE1/AN6 — PORTE bit 1 / ADC input 6 |
| Pin 10 | RE2/AN7 — PORTE bit 2 / ADC input 7 |
| Pin 11 | VDD — Positive supply voltage |
| Pin 12 | VSS — Ground |
| Pin 13 | OSC1/CLKI/RA7 — Crystal oscillator input / external clock |
| Pin 14 | OSC2/CLKO/RA6 — Crystal oscillator output / clock output |
| Pin 15 | RC0/SOSCO — PORTC bit 0 / secondary oscillator output |
| Pin 16 | RC1/SOSCI — PORTC bit 1 / secondary oscillator input |
| Pin 17 | RC2/CCP1 — PORTC bit 2 / CCP1 PWM output |
| Pin 18 | RC3/SCL1/SCK1 — PORTC bit 3 / I2C clock / SPI clock |
| Pin 19 | RD0/PSP0/AN8 — PORTD bit 0 / ADC input 8 |
| Pin 20 | RD1/PSP1/AN9 — PORTD bit 1 / ADC input 9 |
| Pin 21 | RD2/PSP2/AN10 — PORTD bit 2 / ADC input 10 |
| Pin 22 | RD3/PSP3/AN11 — PORTD bit 3 / ADC input 11 |
| Pin 23 | RC4/SDA1/SDI1 — PORTC bit 4 / I2C data / SPI data in |
| Pin 24 | RC5/SDO1 — PORTC bit 5 / SPI data out |
| Pin 25 | RC6/TX1/CK1 — PORTC bit 6 / USART1 TX / clock |
| Pin 26 | RC7/RX1/DT1 — PORTC bit 7 / USART1 RX / data |
| Pin 27 | RD4/PSP4/AN12 — PORTD bit 4 / ADC input 12 |
| Pin 28 | RD5/PSP5/AN13 — PORTD bit 5 / ADC input 13 |
| Pin 29 | RD6/PSP6/AN14 — PORTD bit 6 / ADC input 14 |
| Pin 30 | RD7/PSP7/AN15 — PORTD bit 7 / ADC input 15 |
| Pin 31 | VSS — Ground |
| Pin 32 | VDD — Positive supply voltage |
| Pin 33 | RB0/AN12/INT0 — PORTB bit 0 / external interrupt 0 |
| Pin 34 | RB1/AN8/INT1 — PORTB bit 1 / external interrupt 1 |
| Pin 35 | RB2/AN9/INT2 — PORTB bit 2 / external interrupt 2 |
| Pin 36 | RB3/AN10/INT3 — PORTB bit 3 / external interrupt 3 |
| Pin 37 | RB4/AN11 — PORTB bit 4 |
| Pin 38 | RB5/AN13 — PORTB bit 5 |
| Pin 39 | RB6/PGC/ICSPCLK — PORTB bit 6 / ICSP clock / programming |
| Pin 40 | RB7/PGD/ICSPDAT — PORTB bit 7 / ICSP data / programming |
Typical Applications
PIC18F45K22-E/P is suitable for 6 applications: Industrial Sensor Interface Module, Building Automation Controller, Battery-Powered Data Logger, Automotive Under-Dash Module, Low-Power Wireless Sensor Node, HVAC Control Panel.
Industrial Sensor Interface Module
The PIC18F45K22-E/P is well suited for industrial sensor interface modules that aggregate 4-20 mA analog inputs, RTD thermocouples, and digital switch signals into a unified data stream. Its 12-bit ADC with up to 30 analog channels provides 4096-step resolution per measurement, while the 32 KB Flash comfortably holds protocol stacks for Modbus RTU, CAN, or RS-485 firmware plus application logic. The extended -40C to +125C temperature grade ensures operation in unconditioned factory cabinets, and the 36 I/O pins handle multiple sensor channels plus an RS-485 transceiver. At 40 MHz the device achieves 10 MIPS throughput, sufficient for 1 kHz control loop updates.
Recommended
Building Automation Controller
For building automation controllers handling HVAC, lighting, and access control, the PIC18F45K22-E/P provides the right balance of memory, peripherals, and cost. The two Enhanced USARTs support simultaneous Modbus master and slave communication to field devices, while the MSSP modules drive I2C sensors and SPI displays. Its nanoWatt XLP sleep currents below 100 nA typical allow battery-backed wireless sensor nodes that run for years on a single lithium cell. The PDIP-40 package simplifies prototyping on perforated boards before transitioning to surface-mount for production, and the extended temperature grade handles equipment-room environments.
Recommended
Battery-Powered Data Logger
Battery-powered data loggers benefit from the PIC18F45K22-E/P's nanoWatt XLP technology and 256 bytes of on-chip EEPROM for non-volatile parameter storage. The deep-sleep current draws under 100 nA typical, allowing multi-year operation on two AA alkaline cells when wake intervals are minutes apart. The 32 KB Flash stores logging firmware and lookup tables, while the 1536 bytes SRAM buffers sensor samples between writes. The 12-bit ADC digitizes analog channels at up to 100 ksps, and the CCP modules generate precise wake-up timing using the low-power Timer1 oscillator. Extended temperature grade supports outdoor environmental monitoring.
Recommended
Automotive Under-Dash Module
The PIC18F45K22-E/P's extended -40C to +125C temperature rating qualifies it for under-dash automotive modules such as body controllers, climate interfaces, and accessory multiplexers. The 36 I/O pins drive multiple relays, read button matrices, and interface with LIN or CAN transceivers. The 32 KB Flash accommodates AUTOSAR-lite or proprietary automotive stacks, while the 12-bit ADC reads battery voltage and analog sensor channels with 4.2-5.5V supply tolerance matching 5V regulated vehicle rails. For AEC-Q100-qualified automotive designs, Microchip recommends PIC18F 'Q' or 'K42' variants instead, as this part is not formally automotive-qualified.
Recommended
Low-Power Wireless Sensor Node
Low-power wireless sensor nodes based on PIC18F45K22-E/P leverage the nanoWatt XLP technology to minimize sleep current between transmissions. A typical design pairs the MCU with a sub-GHz transceiver (e.g., MRF89XA) over SPI, waking periodically to read sensors and transmit readings before returning to deep sleep. The 1536 bytes SRAM holds a packet buffer plus sensor history, while the 256-byte EEPROM retains calibration constants and node IDs across power cycles. The MSSP/SPI interface runs the wireless module, the Enhanced USART runs a debug console, and the ADC reads environmental sensors.
Recommended
HVAC Control Panel
HVAC control panels integrate temperature, humidity, and pressure sensing with relay-driven fan, compressor, and damper control - a workload well matched to the PIC18F45K22-E/P. The 12-bit ADC with 30 channels reads multiple analog sensors simultaneously, while the two CCP/ECCP modules generate the PWM outputs that drive variable-speed fans and dampers. The Enhanced USARTs interface with Wi-Fi or Modbus modules for building management integration. With 32 KB Flash the device stores the user-interface state machine, scheduling logic, and fault diagnostics without external memory.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F45K22-E/P — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F45K22-I/P | PIC18F44K22-E/P | PIC18F45K22-E/ML | PIC18F43K22-E/PT |
|---|---|---|---|---|---|
| Package | PDIP-40 | PDIP-40 (same) | PDIP-40 (same) | QFN-44 (different) | TQFP-44 (different) |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Program Memory (Flash) | 32 KB | 32 KB | 16 KB | 32 KB | 8 KB |
| RAM | 1536 bytes | 1536 bytes | 1536 bytes | 1536 bytes | 1024 bytes |
| Maximum Clock Speed | 40 MHz | 40 MHz | 40 MHz | 40 MHz | 40 MHz |
| Operating Voltage | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V |
| Temperature Grade | Extended -40C to +125C | Industrial -40C to +85C | Extended -40C to +125C | Extended -40C to +125C | Extended -40C to +125C |
| I/O Pins | 36 | 36 | 36 | 36 | 36 |
Key Differentiators
- Extended -40C to +125C temperature grade on through-hole PDIP package (vs PIC18F45K22-I/P)
- Highest Flash density in the K22 DIP-40 family (vs PIC18F44K22-E/P)
- Through-hole PDIP-40 simplifies prototyping and hand assembly (vs PIC18F45K22-E/ML (QFN-44))
Design Notes
Estimated: At 40 MHz, 5V operation with all peripherals active, the PIC18F45K22-E/P typically draws ~12 mA. Add a 100 nF decoupling capacitor adjacent to each VDD/VSS pair (pins 11/12 and 31/32) and a bulk 10 uF tantalum at the board supply input. For battery applications, configure the nanoWatt XLP sleep modes (Sleep, Deep Sleep, Doze) to drop idle current below 100 nA typical.
Do not confuse the PIC18F45K22 (4.2-5.5V) with the PIC18LF45K22 (1.8-3.6V) - applying 5V to an LF part will damage it. The 'F' (Flash) suffix denotes 5V operation; 'LF' denotes 3.3V operation. Also note that migrating from the legacy PIC18F452 to PIC18F45K22 requires firmware updates because the K22 family has different register mappings and added peripherals like the ECCP and CWG modules.
For the 40-pin PDIP footprint use a 0.6 inch row spacing with 0.1 inch pin pitch (2.54 mm). Keep traces to OSC1/OSC2 short and surround them with a ground pour to reduce EMI. Place the ICSP programming header (MCLR, PGC, PGD, VDD, VSS) at the board edge for production programming access. The MCLR pin requires a 10 kohm pull-up to VDD and a 100 nF capacitor to ground for in-circuit programming reliability.
Compliance Information
RoHS and REACH compliant per Microchip product declaration. Not AEC-Q100 qualified; choose PIC18F 'Q' or 'K42' variants for automotive applications requiring formal qualification. Lead-free (Pb-free) reflow-compatible per Microchip packaging specifications.