PIC18F4321-E/ML - 8-Bit MCU, 8KB Flash, 25MHz, 44-QFN | Microchip
MPN: PIC18F4321-E/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $6.23 | $6.23 |
| 10 | $5.85 | $58.50 |
| 100 | $5.21 | $521.00 |
| 500 | $4.65 | $2,325.00 |
| 1,000 | $4.1 | $4,100.00 |
PIC18F4321-E/ML Overview
An 8-bit microcontroller (MCU) is a single-chip computer that integrates a CPU, program memory (Flash/ROM), data memory (RAM), and peripheral set on one die. The PIC18F family uses an enhanced Harvard RISC architecture with 16-bit opcodes and 8-bit data path, executing one instruction every four oscillator cycles. Within the broader taxonomy, PIC18F sits above PIC16F and below PIC24/dsPIC as the high-performance tier of Microchip's 8-bit portfolio.
Key features include 13 channels of 10-bit ADC (up to 100 ksps), two analog comparators, two CCP modules supporting capture/compare/PWM, an EUSART, MSSP configurable for SPI or I2C (master/slave), a 36-pin I/O port set, and nanoWatt power management with multiple idle/sleep modes. The 77 single-word instruction set and C-compiler-friendly architecture simplify code migration from PIC16 and PIC12 devices, while self-programming and ICD support enable in-circuit firmware updates and debugging.
The architecture combines a 16-bit wide instruction bus with an 8-bit data bus, achieving 10 MIPS at 40 MHz while consuming as little as a few microamps in sleep mode. The 10-bit successive-approximation ADC with 13 input channels supports up to 100 ksps conversion rate, sufficient for sensor monitoring, battery management, and motor-control feedback loops. The internal RC oscillator eliminates the need for an external crystal in cost-sensitive designs.
Typical applications include industrial control (sensor hubs, PLC I/O modules, motor drivers), automotive body and HVAC subsystems, consumer appliance control panels, battery management systems, and USB-to-UART bridge devices. The wide 4.2V-5.5V supply range and 25 MHz performance make it well suited for 5V logic systems where lower-voltage ARM Cortex-M0 parts are not appropriate.
When designing with this MCU, allocate at least one timer to a free-running tick for RTOS or cooperative scheduling, and configure the ADC acquisition time based on source impedance (typ. 15-20 us for 10 kohm sources). For low-power designs, place the device in Sleep or Idle mode between sensor reads and use the EUSART wake-up feature for asynchronous command processing.
This page synthesizes distributor pricing across DigiKey and Mouser, drop-in PIC18F4321 family alternatives sharing the 44-QFN footprint, and practical design notes for low-power embedded development that are not consolidated on the manufacturer datasheet.
Drop-in alternatives for PIC18F4321-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 PIC18F4321-E/ML (same form factor and footprint) — differing in Package, ADC, Maximum CPU Speed, Serial Interfaces, I/O Pins.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F4321-I/ML
✅ Drop-In✓ In Stock
$1.22 / Unit
View Datasheet →PIC18F4321-E/P
✅ Drop-In✓ In Stock
$3.61 / Unit
View Datasheet →PIC18F4321T-E/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F4320-E/ML
✅ Drop-In✓ In Stock
$4.1 / Unit
View Datasheet →PIC18F4221-I/ML
✅ Drop-In✓ In Stock
$3.5 / Unit
View Datasheet →PIC18F4321-E/ML Maximum Ratings & Electrical Characteristics
| Core | PIC18F RISC 8-bit |
| Program Memory (Flash) | 8 KB (4K x 16) |
| Data Memory (SRAM) | 512 bytes |
| Data EEPROM | 256 bytes |
| Maximum CPU Speed | 25 MIPS (40 MHz oscillator) |
| Instruction Set | 77 single-word instructions (16-bit opcode) |
| Supply Voltage (VDD) | 4.2 V to 5.5 V |
| I/O Pins | 36 |
| ADC | 10-bit, 13 channels, up to 100 ksps |
| Comparators | 2 analog comparators |
| CCP/PWM Modules | 2 |
| Serial Interfaces | EUSART + MSSP (SPI/I2C) |
| Operating Temperature | -40C to +125C (E grade, extended) |
| Package | 44-pin QFN (8x8 mm) with exposed pad |
| Package Code | HVQCCN (per JEDEC) |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
| Power-Saving Modes | nanoWatt technology (Run, Idle, Sleep) |
PIC18F4321-E/ML Pin Configuration
| Pin 1 | RA0/AN0 — PORTA bit 0 / ADC input 0 |
| Pin 2 | RA1/AN1 — PORTA bit 1 / ADC input 1 |
| Pin 3 | RA2/AN2/VREF- — PORTA bit 2 / ADC input 2 / ADC negative reference |
| Pin 4 | RA3/AN3/VREF+ — PORTA bit 3 / ADC input 3 / ADC positive reference |
| Pin 5 | RA4/T0CKI — PORTA bit 4 / Timer0 clock input |
| Pin 6 | RA5/AN4/SS/HLVDIN — PORTA bit 5 / ADC input 4 / SPI slave select / High/Low-Voltage detect input |
| Pin 7 | RE0/RD/AN5 — PORTE bit 0 / Read control for parallel port / ADC input 5 |
| Pin 8 | RE1/WR/AN6 — PORTE bit 1 / Write control for parallel port / ADC input 6 |
| Pin 9 | RE2/CS/AN7 — PORTE bit 2 / Chip select for parallel port / ADC input 7 |
| Pin 10 | VDD — Positive digital supply (4.2V-5.5V) |
| Pin 11 | VSS — Digital ground |
| Pin 12 | OSC1/CLKI/RA7 — Oscillator crystal input / external clock input / PORTA bit 7 |
| Pin 13 | OSC2/CLKO/RA6 — Oscillator crystal output / clock output / PORTA bit 6 |
| Pin 14 | RC0/T1OSO/T13CKI — PORTC bit 0 / Timer1 oscillator output / Timer1/Timer3 clock input |
| Pin 15 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2 module |
| Pin 16 | RC2/CCP1 — PORTC bit 2 / CCP1 module (PWM/Capture/Compare) |
| Pin 17 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Pin 18 | RC4/SDI/SDA — PORTC bit 4 / SPI data input / I2C data |
| Pin 19 | RC5/SDO — PORTC bit 5 / SPI data output |
| Pin 20 | RC6/TX/CK — PORTC bit 6 / EUSART TX / EUSART clock |
| Pin 21 | RC7/RX/DT — PORTC bit 7 / EUSART RX / EUSART data |
| Pin 22 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port bit 0 |
| Pin 23 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port bit 1 |
| Pin 24 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port bit 2 |
| Pin 25 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port bit 3 |
| Pin 26 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port bit 4 |
| Pin 27 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port bit 5 |
| Pin 28 | RD6/PSP6 — PORTD bit 6 / Parallel Slave Port bit 6 |
| Pin 29 | RD7/PSP7 — PORTD bit 7 / Parallel Slave Port bit 7 |
| Pin 30 | VSS — Digital ground |
| Pin 31 | VDD — Positive digital supply (4.2V-5.5V) |
| Pin 32 | RB0/INT0/FLT0 — PORTB bit 0 / External interrupt 0 / PWM fault input |
| Pin 33 | RB1/INT1 — PORTB bit 1 / External interrupt 1 |
| Pin 34 | RB2/INT2 — PORTB bit 2 / External interrupt 2 |
| Pin 35 | RB3/INT3/CCP2 — PORTB bit 3 / External interrupt 3 / alternate CCP2 |
| Pin 36 | RB4/KBI0 — PORTB bit 4 / Interrupt-on-change bit 0 |
| Pin 37 | RB5/KBI1 — PORTB bit 5 / Interrupt-on-change bit 1 |
| Pin 38 | RB6/KBI2/PGC — PORTB bit 6 / Interrupt-on-change bit 2 / ICSP clock |
| Pin 39 | RB7/KBI3/PGD — PORTB bit 7 / Interrupt-on-change bit 3 / ICSP data |
| Pin 40 | MCLR/VPP/RE3 — Master clear reset / programming voltage / PORTE bit 3 |
| Pin 41 | AVDD — Positive analog supply |
| Pin 42 | AVSS — Analog ground |
| Pin 43 | AN8 — ADC input 8 |
| Pin 44 | AN9 — ADC input 9 |
Typical Applications
PIC18F4321-E/ML is suitable for 6 applications: Industrial Sensor Hub / Data Acquisition, Automotive Body and HVAC Control Modules, Battery Management System Slave Controller, Consumer Appliance Control Panel, USB-to-UART Bridge Device, Smart Sensor Node with nanoWatt Sleep.
Industrial Sensor Hub / Data Acquisition
The PIC18F4321-E/ML fits industrial sensor-hub designs because its 13-channel 10-bit ADC supports multi-sensor scanning at up to 100 ksps aggregate rate, while the 8 KB Flash holds Modbus RTU and 4-20 mA loop-handling stacks. Placed on the RS-485 node with an EUSART running at 115.2 kbps and the MSSP port driving an I2C sensor cluster, the PIC18F4321-E/ML replaces both the MCU and external ADC in legacy 5V systems. The -40C to +125C extended temperature range lets the same BOM survive factory-floor and outdoor-cabinet deployments. Estimated power budget: 11 mA active at 25 MIPS / 5V, dropping to under 10 uA in Sleep between acquisition bursts.
Recommended
Automotive Body and HVAC Control Modules
The PIC18F4321-E/ML's -40C to +125C extended temperature range and 44-QFN (8x8 mm) footprint suit it for body-control modules driving HVAC blend doors, seat heaters, and lighting PWM channels. The two CCP modules provide two independent PWM outputs at up to 25 kHz, sufficient for brushless-DC fan control and LED dimming, while the EUSART handles LIN-bus communication with HVAC master controllers. Place the part on a 5V regulated rail derived from the 12V battery bus; the wide 4.2V-5.5V VDD tolerance tolerates load-dump transients up to 40V at the input of the pre-regulator. For AEC-Q100 automotive qualification, use the PIC18F4321T-E/ML tape-and-reel variant.
Recommended
Battery Management System Slave Controller
The PIC18F4321-E/ML serves as a battery-cell monitor slave in multi-cell Li-ion or lead-acid packs, where its 13-channel 10-bit ADC reads individual cell voltages through an external analog multiplexer while the MSSP (I2C) link cascades to a master BMS controller. The 256-byte EEPROM stores cell-calibration constants and lifetime cycle counters that survive firmware updates, while the 8 KB Flash holds cell-balancing and protection logic. Power dissipation: ~9 mA active at 5V during ADC scan, dropping to under 5 uA in Sleep between scans. The exposed-pad QFN package keeps thermal resistance below 30 C/W when soldered to a 1-square-inch copper pour.
Recommended
Consumer Appliance Control Panel
The PIC18F4321-E/ML drives washing-machine, dishwasher, and microwave user-interface panels, where its 36 I/O pins scan 4x4 key matrices and 7-segment or LCD displays simultaneously while the EUSART communicates with the main appliance controller. The two CCP/PWM channels drive buzzer tones and triac-based load control, and the nanoWatt power-saving modes keep standby consumption below 50 uA to meet Energy Star requirements. The 44-QFN (8x8 mm) footprint fits inside compact UI sub-modules where a DIP package would be too tall. Typical firmware size: 5-6 KB Flash including the display driver and safety-state machine.
Recommended
USB-to-UART Bridge Device
The PIC18F4321-E/ML implements a USB-to-UART bridge when paired with an external USB transceiver (such as the MCP2200 or FT232R alternative), using its EUSART for the UART side at programmable baud rates up to 115.2 kbps and bit-banged GPIO for USB signaling at 12 Mbps. The 25 MIPS throughput keeps USB protocol overhead under 20% CPU utilization, leaving the remaining bandwidth for command parsing and flow control. The exposed-pad QFN package provides sufficient thermal dissipation for the continuous 15 mA active current draw. Compatible with Windows, Linux, and macOS CDC-ACM drivers when programmed as a Communications Device Class device.
Recommended
Smart Sensor Node with nanoWatt Sleep
The PIC18F4321-E/ML anchors battery-powered wireless sensor nodes where its nanoWatt technology drops supply current below 1 uA in Sleep mode, waking only on timer overflow or external interrupt to read a sensor and transmit via the EUSART-connected radio module. The 256-byte EEPROM stores calibration data and 16-bit node ID, while the 512-byte RAM buffers a single measurement packet. Placed between a 3.6V primary LiSOCl2 cell and a low-power sub-GHz transceiver (such as the MRF89XA), the PIC18F4321-E/ML achieves 5-10 year battery life at 1 measurement per hour. The exposed-pad QFN keeps the node footprint under 1 square centimeter.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F4321-E/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F4321-I/ML | PIC18F4321-E/P | PIC18F4321T-E/ML | PIC18F4320-E/ML | PIC18F4221-I/ML |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-QFN (8x8) | 44-QFN (8x8) - same | 44-QFN (8x8) - same | 44-QFN (8x8) - same | 44-QFN (8x8) - same | 44-QFN (8x8) - same |
| Flash Memory | 8 KB | 8 KB | 8 KB | 8 KB | 8 KB | 4 KB |
| RAM | 512 B | 512 B | 512 B | 512 B | 256 B | 512 B |
| EEPROM | 256 B | 256 B | 256 B | 256 B | 256 B | 256 B |
| Temperature Grade | -40C to +125C (E) | -40C to +85C (I) | -40C to +125C (E) | -40C to +125C (E) | -40C to +125C (E) | -40C to +85C (I) |
| I/O Pins | 36 | 36 | 36 | 36 | 36 | 36 |
| ADC Channels | 13 (10-bit) | 13 (10-bit) | 13 (10-bit) | 13 (10-bit) | 13 (10-bit) | 13 (10-bit) |
| CCP/PWM Modules | 2 | 2 | 2 | 2 | 2 | 2 |
| Max CPU Speed | 25 MIPS (40 MHz) | 25 MIPS (40 MHz) | 25 MIPS (40 MHz) | 25 MIPS (40 MHz) | 25 MIPS (40 MHz) | 25 MIPS (40 MHz) |
Key Differentiators
- Lower-temperature drop-in at lower cost (vs PIC18F4321-I/ML)
- Tape-and-reel variant for SMT production (vs PIC18F4321T-E/ML)
- Lower-RAM family member for cost-sensitive designs (vs PIC18F4320-E/ML)
- Half-Flash sibling for compact firmware (vs PIC18F4221-I/ML)
Design Notes
The 44-QFN exposed thermal pad (EP) on the PIC18F4321-E/ML MUST be soldered to a ground-plane copper pour of at least 1 square inch (6.45 cm^2) for reliable thermal and electrical performance. Per Microchip AN1254, floating or undersized EP pads can cause the part to operate outside its thermal envelope at high ambient temperatures. Use an array of 0.3 mm thermal vias in the EP land to conduct heat to inner ground planes. The 44-QFN (8x8 mm) footprint requires NSMD (Non-Solder Mask Defined) pads for best solder joint reliability.
Estimated: At 25 MIPS CPU activity from a 5.0V supply, the PIC18F4321-E/ML draws approximately 11 mA active current (~55 mW). In Sleep mode with WDT disabled, supply current drops below 1 uA (5 uW), per the PIC18F4321 family datasheet (DS39689B). Place a 100 nF decoupling capacitor within 5 mm of each VDD/VSS pair (pins 10/11 and 30/31), and a 10 uF bulk capacitor at the board input. For noise-sensitive ADC applications, add a ferrite bead between digital VDD and analog AVDD, with separate 100 nF decoupling on AVDD (pin 41).
Do not confuse the PIC18F4321-E/ML (44-QFN package, ML suffix) with the PIC18F4321-E/PT (44-TQFP package, PT suffix). Although both share identical silicon and -E temperature grade, the PCB land patterns differ - they cannot be soldered onto each other's footprints. Additionally, the MCLR pin (pin 40) must NOT be left floating - either tie it to VDD through a 10 kohm resistor for normal operation or to the ICSP programmer for in-circuit debugging. Leaving MCLR floating causes intermittent resets and unreliable startup.
When using the MSSP module in SPI master mode at clock rates above 5 MHz, keep SCK (pin 17) and SDO (pin 19) traces under 50 mm total length and add a 33 ohm series resistor at the source end of SCK to dampen reflections. For I2C operation, select 4.7 kohm pull-ups on SCL (pin 17) and SDA (pin 18) for 100 kHz Standard mode, or 2.2 kohm for 400 kHz Fast mode. The ADC acquisition time must be configured via the ADCON3 register based on source impedance: 15-20 us acquisition for 10 kohm sources, increasing to 30 us for 50 kohm sources.
Compliance Information
RoHS compliant per Microchip product page. Lead-free (Pb-free) reflow-compatible. The -E temperature grade is industrial/automotive-environment rated but is NOT AEC-Q100 qualified - for AEC-Q100 applications, use the PIC18F4321T-E/ML or contact Microchip for the -V automotive-grade variant.