PIC18F45K42-I/MV - 8-bit MCU, 64MHz, 32KB Flash, 40-UQFN | Microchip
MPN: PIC18F45K42-I/MV ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $1.78 | $1.78 |
| 10 | $1.62 | $16.20 |
| 100 | $1.45 | $145.00 |
| 500 | $1.31 | $655.00 |
| 1,000 | $1.18 | $1,180.00 |
PIC18F45K42-I/MV Overview
A microcontroller (MCU) is a single-chip computer integrating CPU core, program memory (Flash), data memory (SRAM/EEPROM) and programmable peripherals. The PIC18 family uses a Harvard architecture with separate program and data buses, enabling simultaneous instruction fetch and operand access. Within the broader taxonomy, this part sits at: microcontroller -> 8-bit MCU -> PIC18 family -> PIC18FxxK42 sub-family -> 40-pin variants. Compared with 32-bit Cortex-M MCUs, 8-bit PIC18 devices excel at deterministic interrupt latency, low BOM cost and easy C/assembly development, which is why they remain popular in appliance, automotive body and industrial-sensor designs.
Key features of the PIC18F45K42-I/MV include: 36 configurable I/O pins, 1x UART/USART, 2x SPI, 2x I2C, hardware DMA, 12-bit ADC2 with up to 35 channels, 5-bit DAC, 2 analog comparators, peripheral pin select (PPS) for flexible routing, and the zero-cross detection module. It supports Core Independent Peripherals (CIPs) such as the CWG, NCO, SMT, CCP and PWM, allowing complex timing and waveform tasks without CPU intervention - a major differentiator over legacy PIC16 designs.
The architecture is built around a RISC CPU with a 16-bit instruction word, hardware multiply/divide, and a vectored interrupt controller. The ADC2 module uses post-conversion averaging and automatic threshold comparison, offloading sensor-signal processing from the core. The integrated DMA controller moves data between peripherals and RAM without CPU cycles, reducing active-mode current and freeing the CPU for system-level logic. Device configuration is handled through Flash Configuration Words and Device ID, while the MAP region allows end-of-line calibration values to be stored in a protected area.
Typical applications include industrial sensor nodes, low-cost IoT edge devices, home appliance controllers, automotive body and lighting modules, USB-to-UART bridges (using the MSSP/SPI and UART), motor control (PWM + comparator + CWG), and battery-powered metering using XLP sleep modes down to sub-microamp currents. The 40-UQFN package is ideal for space-constrained PCB designs where the 28-pin DIP/PDIP variants are too large but more than 14 pins of GPIO are still required.
When designing with this MCU, remember that the 40-UQFN package requires PCB thermal pad soldering for proper electrical and thermal performance. Use MPLAB X IDE with the free XC8 compiler for development, and consider the PIC18F46K42 for higher flash density if 32 KB becomes insufficient during prototyping.
Drop-in alternatives for PIC18F45K42-I/MV — 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 PIC18F45K42-I/MV (same form factor and footprint) — differing in ADC, Comparators, DAC, DMA, I/O Pins.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F46K42-I/MV
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F45K40-I/MV
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F45K42-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F45K42-E/MV
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18F45K42-I/P
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$1.68 / Unit
View Datasheet →PIC18F45K42-I/MV Maximum Ratings & Electrical Characteristics
| Core | PIC18 8-bit RISC |
| Maximum CPU Frequency | 64 MHz |
| Program Memory (Flash) | 32 KB (16K x 16) |
| Data SRAM | 2 KB (2048 bytes) |
| Data EEPROM | 256 B |
| Package | 40-UQFN (5x5 mm) with exposed pad (MV) |
| Pin Count | 40 |
| I/O Pins | 36 |
| Supply Voltage (VDD) | 2.3 V to 5.5 V |
| Operating Temperature | -40C to +85C (industrial) |
| ADC | 12-bit ADC2, up to 35 channels |
| DAC | 5-bit DAC + 8-bit DAC reference |
| Comparators | 2 analog comparators |
| Communication | UART/USART, 2x SPI, 2x I2C |
| PWM Channels | Multiple PWM outputs (CCP/PWM/SMT/CWG) |
| DMA | Yes (hardware DMA controller) |
| Vector Interrupts | Yes |
| MAP / DIA Memory | Yes (Memory Access Partition + Device Information Area) |
| Low-Power Mode | XLP (eXtreme Low Power) sleep modes |
| Mounting Type | Surface Mount |
PIC18F45K42-I/MV Pin Configuration
| Pin 1 | RA5 — Port A bit 5 / GPIO |
| Pin 2 | RA4 — Port A bit 4 / GPIO |
| Pin 3 | RA3 — Port A bit 3 / GPIO |
| Pin 4 | RA2 — Port A bit 2 / GPIO |
| Pin 5 | RA1 — Port A bit 1 / GPIO |
| Pin 6 | RA0 — Port A bit 0 / GPIO |
| Pin 7 | VSS — Ground |
| Pin 8 | RA7 — Port A bit 7 / GPIO |
| Pin 9 | RA6 — Port A bit 6 / GPIO |
| Pin 10 | RC0 — Port C bit 0 / GPIO |
| Pin 11 | RC1 — Port C bit 1 / GPIO |
| Pin 12 | RC2 — Port C bit 2 / GPIO |
| Pin 13 | RC3 — Port C bit 3 / GPIO |
| Pin 14 | RC4 — Port C bit 4 / GPIO |
| Pin 15 | RC5 — Port C bit 5 / GPIO |
| Pin 16 | RC6 — Port C bit 6 / GPIO |
| Pin 17 | RC7 — Port C bit 7 / GPIO |
| Pin 18 | RB0 — Port B bit 0 / GPIO |
| Pin 19 | RB1 — Port B bit 1 / GPIO |
| Pin 20 | RB2 — Port B bit 2 / GPIO |
| Pin 21 | RB3 — Port B bit 3 / GPIO |
| Pin 22 | RB4 — Port B bit 4 / GPIO |
| Pin 23 | RB5 — Port B bit 5 / GPIO |
| Pin 24 | RB6 — Port B bit 6 / GPIO |
| Pin 25 | RB7 — Port B bit 7 / GPIO |
| Pin 26 | VSS — Ground |
| Pin 27 | VDD — Positive supply voltage |
| Pin 28 | RD0 — Port D bit 0 / GPIO |
| Pin 29 | RD1 — Port D bit 1 / GPIO |
| Pin 30 | RD2 — Port D bit 2 / GPIO |
| Pin 31 | RD3 — Port D bit 3 / GPIO |
| Pin 32 | RD4 — Port D bit 4 / GPIO |
| Pin 33 | RD5 — Port D bit 5 / GPIO |
| Pin 34 | RD6 — Port D bit 6 / GPIO |
| Pin 35 | RD7 — Port D bit 7 / GPIO |
| Pin 36 | RE0 — Port E bit 0 / GPIO |
| Pin 37 | RE1 — Port E bit 1 / GPIO |
| Pin 38 | RE2 — Port E bit 2 / GPIO |
| Pin 39 | RE3 — Port E bit 3 / GPIO |
| Pin 40 | VDD — Positive supply voltage |
| Pin 41 | EP — Exposed thermal pad - must be soldered to PCB ground pad |
Typical Applications
PIC18F45K42-I/MV is suitable for 6 applications: Industrial Sensor Node / IoT Edge, Home Appliance Control (Washing Machines, Dishwashers, Ovens), Automotive Body & Lighting Modules, USB-to-UART Bridge / Communication Gateway, Low-Cost Motor Control (PWM + Comparator + CWG), Battery-Powered Metering (Gas, Electric, Water).
Industrial Sensor Node / IoT Edge
The PIC18F45K42-I/MV is a strong fit for industrial 4-20 mA sensor nodes and IoT edge devices. Its 12-bit ADC2 with computation engine offloads threshold detection and averaging from the CPU, while hardware DMA moves ADC samples into RAM without waking the core. With XLP sleep currents in the sub-microamp range, a battery-powered sensor can run for years on a single cell. The 32 KB Flash holds application code plus calibration tables, while 2 KB SRAM accommodates small protocol buffers (Modbus RTU, MQTT-SN over UART/SPI).
Recommended
Home Appliance Control (Washing Machines, Dishwashers, Ovens)
In home appliances, the PIC18F45K42-I/MV drives brushed and small BLDC motors using its PWM, CWG (Complementary Waveform Generator) and analog comparators for current sensing. The Vector Interrupt Controller lets multiple subsystems (keypad scan, motor commutation, sensor sampling) preempt each other deterministically, which is critical for safe motor control. 36 GPIO pins easily handle user-interface key matrices, LED indicators, triac/relay drivers and the AC-zero-cross detector module. Industrial temperature grade suits under-cabinet and laundry-room thermal environments.
Recommended
Automotive Body & Lighting Modules
The PIC18F45K42-I/MV is well suited to automotive body-control modules such as interior lighting, mirror controllers and seat-position memory. The Peripheral Pin Select feature lets designers route UART, SPI and I2C peripherals to any GPIO, simplifying PCB layout when I/O assignments change late in development. The 5-bit DAC and comparators drive LIN-bus or PWM dimming channels for LED strings. Designers requiring -40C to +125C should select the PIC18F45K42-E/MV variant, which uses the same 40-UQFN footprint.
Recommended
USB-to-UART Bridge / Communication Gateway
Bridging legacy UART peripherals (RS-232/RS-485 sensors, GPS modules, GSM modems) to USB hosts is a classic use for the PIC18F45K42-I/MV. The integrated UART plus DMA lets the MCU shovel bytes into SRAM while the USB stack enumerates as a CDC device. With 32 KB Flash there is room for a small command parser, and the 2 KB SRAM buffer handles bursts up to several hundred bytes. The peripheral pin select feature means the same firmware can route UART to either the 40-UQFN pin set or the 28-pin SPDIP family.
Recommended
Low-Cost Motor Control (PWM + Comparator + CWG)
The PIC18F45K42-I/MV drives small brushed DC, stepper and even BLDC motors with the on-chip PWM, CWG (Complementary Waveform Generator) and dual comparators. The CWG module generates hardware dead-band control for half-bridges, freeing the CPU from CPU-intensive commutation. The comparators can sense back-EMF or shunt current with no external op-amp, while the DMA moves ADC samples into the PWM duty register for closed-loop torque control. With 64 MHz CPU and 32 KB Flash, field-oriented control (FOC) algorithms fit comfortably.
Recommended
Battery-Powered Metering (Gas, Electric, Water)
With XLP sleep modes and a 12-bit ADC2 capable of low-frequency noise rejection, the PIC18F45K42-I/MV is ideal for battery-powered metering endpoints. The DMA controller wakes the CPU only when a measurement sequence is complete, keeping average current below 10 uA in typical duty-cycled metering profiles. The 256-byte EEPROM supports tamper-resistant calibration storage, while the 32 KB Flash holds metering firmware plus optional secure firmware update code. The exposed-pad 40-UQFN aids thermal dissipation in enclosed utility meters.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F45K42-I/MV — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F46K42-I/MV | PIC18F45K40-I/MV | PIC18F45K42-I/ML | PIC18F45K42-E/MV | PIC18F45K42-I/P |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 40-UQFN (5x5 mm) MV | 40-UQFN (5x5 mm) - same | 40-UQFN (5x5 mm) - same | 40-UQFN (5x5 mm) - same | 40-UQFN (5x5 mm) - same | 40-PDIP - different physical package, same pin function |
| Flash | 32 KB | 64 KB | 32 KB | 32 KB | 32 KB | 32 KB |
| SRAM | 2 KB | 4 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 |
| Temperature Grade | -40C to +85C (industrial) | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +125C (extended) | -40C to +85C |
| ADC | 12-bit ADC2 | 12-bit ADC2 | 10-bit ADC | 12-bit ADC2 | 12-bit ADC2 | 12-bit ADC2 |
Key Differentiators
- 12-bit ADC2 with computation engine (vs PIC18F45K40-I/MV)
- 32 KB Flash with full ADC2 + DMA + PPS feature set (vs PIC18F46K42-I/MV)
- 40-UQFN exposed-pad footprint for compact designs (vs PIC18F45K42-I/P (PDIP))
Design Notes
The 40-UQFN package exposes a center thermal pad (EP, pin 41) that must be soldered to a PCB ground pad. Per the Microchip QFN landing-pattern application note, this pad carries the chip's main ground reference and provides the primary heat-dissipation path. A PCB thermal pad of at least 25 mm^2 with 6 thermal vias (0.3 mm drill, 1.0 mm pitch) is recommended for designs dissipating >100 mW continuously.
Place a 100 nF decoupling capacitor as close as possible to each VDD pin (pin 27 and pin 40), plus a 10 uF bulk capacitor near the MCU. Keep the VDD trace width at least 0.5 mm to handle transient inrush during ADC2 sampling. Route the analog AVdd/AVss pins (if any on this package) away from digital switching traces; on the 40-UQFN MV variant VDD and AVdd share pins, so a ferrite bead plus pi-filter is recommended for noise-sensitive ADC measurements.
Do not assume pin functions are fixed: PIC18FxxK42 uses Peripheral Pin Select (PPS), so UART/SPI/I2C peripheral outputs must be remapped via the PPS registers before use. Forgetting this yields a silent peripheral that appears to be misconfigured. Also verify the Configuration Words (CONFIG1L through CONFIG5L) for oscillator, watchdog and code-protect settings; wrong FOSC bits are a common no-startup cause on K42 prototypes.
Compliance Information
RoHS and lead-free status confirmed via Microchip product page. AEC-Q100 not claimed for the -I industrial grade; -E extended grade is suitable for non-safety automotive body modules but does not carry formal AEC-Q100 qualification.