Microchip Technology

PIC18F2321-I/ML - 8-Bit PIC MCU, 40MHz, 8KB Flash 28-QFN | Microchip

MPN: PIC18F2321-I/ML ✓ Active
In Stock Ships in 1-3 business days
28-VQFN (6x6 mm) with exposed pad Package 40 MHz (10 MIPS) Speed 8 KB (4K x 16) Flash Memory
From $3.17 USD / Unit
MOQ: 1 |
Price updated: 2026-09-26
Volume Pricing
Qty Unit Price Extended
1 $4.95 $4.95
10 $4.45 $44.50
100 $3.96 $396.00
500 $3.56 $1,780.00
1,000 $3.17 $3,170.00
ℹ️ All prices are in USD

PIC18F2321-I/ML Overview

The Microchip Technology PIC18F2321-I/ML is a high-performance 8-bit CMOS Flash microcontroller in the PIC18F family, delivering 10 MIPS throughput at a 40 MHz clock (100 ns instruction cycle) from a 28-pin QFN package (6x6 mm). It integrates 8 KB of Flash program memory (4K x 16 words), 512 bytes of RAM, and 256 bytes of EEPROM, alongside the enhanced PIC18 instruction set of only 77 single-word instructions.

An 8-bit microcontroller (MCU) is a small computer-on-a-chip built around an 8-bit data bus, executing instructions at a CPU register width of 8 bits. The PIC18F2321 belongs to the broader PIC18 family (Microchip PIC) within the hierarchy: 8-bit MCU -> microcontroller -> embedded controller -> semiconductor IC. Its RISC-based Harvard architecture, 16-bit instruction word, and 8-bit data path make it easier to learn than 32-bit Cortex-M parts while still offering on-chip peripherals for real-time control.

Key features include a 10-bit ADC with up to 10 channels, a configurable Enhanced Capture/Compare/PWM (ECCP) module, two analog comparators, a hardware USART with LIN support, an SPI/I2C MSSP module, and nanoWatt Technology for power-managed sleep modes. The 28-VQFN (6x6 mm) package with exposed pad provides a low thermal resistance footprint suited to compact PCB designs.

The PIC18F2321 uses a 16-bit-wide Flash program memory interface with a modified Harvard architecture, an 8-level hardware stack, and a self-programmable Flash region for in-field firmware updates. Its instruction decoder supports byte and bit-level operations, table reads/writes, and a hardware multiply (8x8 in one cycle), enabling efficient C and assembly code generation.

Typical applications include consumer appliances, industrial control loops, sensor conditioning, low-end motor control, USB-to-serial bridges (paired with external transceivers), and automotive body modules. The 40 MHz speed, dual timers, and ECCP PWM make the part especially well suited to closed-loop PID tasks where deterministic interrupt latency is required.

When designing with this device, ensure VDD decoupling is placed within 5 mm of the supply pins and that the exposed thermal pad is soldered to a continuous copper pour for proper thermal and electrical grounding. Note the -I/ML suffix indicates the -40C to +85C industrial temperature range and the QFN packaging.

This page synthesizes current distributor stock and pricing, drop-in package-compatible alternatives from the PIC18 family, and practical design notes not covered in the brief manufacturer datasheet summary.

Drop-in alternatives for PIC18F2321-I/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 PIC18F2321-I/ML (same form factor and footprint) — differing in Package, ADC, Operating Temperature, Maximum CPU Speed, Program Memory (Flash).

Microchip Technology
Package: 28-pin QFN (6 x 6 mm)
ADC: 10-bit, up to 7 channels
Operating Temperature: -40 C to +85 C (Industrial)
Microchip Technology
Package: 28-pin QFN-EP (6x6 mm), ML suffix
ADC: 10-bit, 10 channels
Operating Temperature: -40C to +125C (-E extended grade)
Microchip Technology
Package: 28-QFN (ML) 6x6 mm with Exposed Pad
ADC: 10-bit, 10 channels
Program Memory (Flash): 8 KB (4K x 16 instructions)

Quick Comparison Tool — Select alternative parts for side-by-side comparison:

No drop-in alternatives available for this product.

Request Alternatives

PIC18F2321-I/ML Maximum Ratings & Electrical Characteristics

Product Family PIC18F
Core PIC 8-bit RISC
Program Memory Size 8 KB (4K x 16) Flash
RAM 512 bytes
EEPROM 256 bytes
Maximum CPU Speed 40 MHz (10 MIPS)
Instruction Set Size 77 single-word instructions
ADC 10-bit, up to 10 channels
Capture/Compare/PWM 1x ECCP module
Comparators 2 analog comparators
Communication EUSART (LIN), MSSP (SPI/I2C)
Timers Multiple 8/16-bit timers
Package 28-VQFN (6x6 mm) with exposed pad
Operating Temperature -40C to +85C (industrial, -I)
Mounting Type Surface Mount
RoHS Compliant
Lead-Free Yes

PIC18F2321-I/ML Pin Configuration

QFN-28 Package Pinout Diagram QFN-28 5x5mm, P0.5mm, EP 3.1x3.1mm, JEDEC MO-220. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 QFN-28
Pin 1 RA2/AN2 — Port A bit 2 / Analog input 2 (also C2OUT reference)
Pin 2 RA3/AN3/VREF+ — Port A bit 3 / Analog input 3 / ADC positive reference
Pin 3 RA4/AN4/T0CKI — Port A bit 4 / Analog input 4 / Timer0 clock input
Pin 4 RA5/AN5/SS — Port A bit 5 / Analog input 5 / SPI slave select
Pin 5 VSS — Ground reference
Pin 6 RA7/OSC1 — Port A bit 7 / Crystal oscillator input
Pin 7 RA6/OSC2 — Port A bit 6 / Crystal oscillator output
Pin 8 RC0/T1CKI — Port C bit 0 / Timer1 clock input
Pin 9 RC1/CCP2 — Port C bit 1 / CCP2 PWM output
Pin 10 RC2/CCP1 — Port C bit 2 / ECCP PWM output
Pin 11 RC3/SCK/SCL — Port C bit 3 / SPI clock / I2C clock
Pin 12 RC4/SDI/SDA — Port C bit 4 / SPI data in / I2C data
Pin 13 RC5/SDO — Port C bit 5 / SPI data out
Pin 14 RC6/TX/CK — Port C bit 6 / EUSART TX / clock
Pin 15 RC7/RX/DT — Port C bit 7 / EUSART RX / data
Pin 16 VSS — Ground reference
Pin 17 VDD — Positive supply
Pin 18 RB0/INT0/AN12 — Port B bit 0 / External interrupt 0 / Analog input 12
Pin 19 RB1/INT1/AN10 — Port B bit 1 / External interrupt 1 / Analog input 10
Pin 20 RB2/INT2/AN8 — Port B bit 2 / External interrupt 2 / Analog input 8
Pin 21 RB3/AN9 — Port B bit 3 / Analog input 9
Pin 22 RB4/AN11 — Port B bit 4 / Analog input 11
Pin 23 RB5/CCP3/AN13 — Port B bit 5 / CCP3 / Analog input 13
Pin 24 RB6/PGC — Port B bit 6 / ICD clock (programming/debug)
Pin 25 RB7/PGD — Port B bit 7 / ICD data (programming/debug)
Pin 26 MCLR/VPP/RE3 — Master clear / programming voltage / Port E bit 3
Pin 27 RA0/AN0 — Port A bit 0 / Analog input 0
Pin 28 RA1/AN1 — Port A bit 1 / Analog input 1

Typical Applications

PIC18F2321-I/ML is suitable for 6 applications: Industrial Sensor Conditioning and Control, Low-End BLDC and Stepper Motor Drive, Consumer Appliance HMI Boards, Automotive Body and Lighting Modules, Medical Monitoring Subsystems, USB-to-Serial Bridge and Smart Dongles.

🏭

Industrial Sensor Conditioning and Control

The PIC18F2321-I/ML fits industrial sensor applications because it provides 10-bit ADC resolution with up to 10 input channels, 512 B RAM, and 40 MHz (10 MIPS) throughput to filter and linearize analog signals. Its nanoWatt sleep modes drop quiescent current for battery-backed sensor nodes. The 28-VQFN's exposed thermal pad supports continuous operation at ambient up to 85C. Typical front-end: signal amplifier -> ADC -> on-chip ECAN-free comms via EUSART -> host PLC. Power dissipation remains under 0.25 W at 40 MHz, fitting tightly spaced sensor modules without forced cooling.

⚡

Low-End BLDC and Stepper Motor Drive

The PIC18F2321-I/ML's ECCP (Enhanced Capture/Compare/PWM) module and 8/16-bit timers provide independent PWM channels with programmable dead-band, suiting BLDC and stepper commutation loops. At 40 MHz, the control loop updates in under 200 us with deterministic jitter under 1 us. Pairing with gate drivers like MCP15xx (external) yields a compact 4-layer drive stage. The 8 KB Flash accommodates state-machine commutation tables plus sensor-fusion routines. Designers should configure the PWM fault pin to the ECCP shutdown input for hardware-level overcurrent protection.

📱

Consumer Appliance HMI Boards

Consumer HMI boards benefit from the PIC18F2321-I/ML's 28-VQFN (6x6 mm) footprint, which keeps PCB real-estate minimal while delivering 77-instruction simplicity for compact display, keypad, and LED-driver firmware. Its 10-bit ADC reads potentiometers and thermistors at sufficient resolution for HVAC and appliance duty cycles. UART MSSP simplifies connection to Wi-Fi/BLE modules for IoT-ready SKUs. Software stacks fit in 8 KB Flash, leaving calibration tables in EEPROM for user preferences that survive power loss.

🚗

Automotive Body and Lighting Modules

In automotive body controllers (door modules, lighting drivers, mirror controllers), the PIC18F2321 operates reliably across -40C to +85C and supports LIN bus via the on-chip EUSART, allowing peer-to-peer communication with the vehicle BCM at 19.2 kbps. The 28-VQFN package withstands automotive vibration profiles when the exposed pad is properly soldered. ECCP PWM dims LED strings with 10-bit resolution. For higher-reliability automotive (AEC-Q100) requirements, prefer PIC18F-K42 family parts, but PIC18F2321 is widely used in non-safety body domains and aftermarket modules.

💊

Medical Monitoring Subsystems

Low-tier medical monitoring subsystems (blood-pressure cuffs, glucose meters, portable spirometers) leverage the PIC18F2321-I/ML's 10-bit ADC, low-power nanoWatt sleep modes (< 1 uA typical), and small 28-QFN footprint. With a single Li-primary cell, sleep-mode current of < 1 uA extends multi-year battery life; active measurement acquires 10-bit samples at hundreds of Hz. PIC18 instruction set fits control code within 8 KB Flash, leaving room for calibration and lookup tables. Note: FDA medical device validation still requires ISO 13485 design controls at the system level, independent of MCU choice.

🧩

USB-to-Serial Bridge and Smart Dongles

The PIC18F2321-I/ML forms the MCU core of USB-to-serial bridges when paired with an external USB transceiver (MCP2200 or FTDI equivalent); the on-chip EUSART streams data up to 115.2 kbps in standard baud modes. Smart dongles for diagnostics, asset tracking, and wireless provisioning benefit from the 28-QFN's 6x6 mm footprint allowing 'USB-stick' form factors. The 8 KB Flash supports command parsers, vendor request handlers, and field-upgrade bootloaders, while EEPROM stores configuration parameters (serial number, baud default) that survive reflash.

What is the program memory size of PIC18F2321-I/ML?
The PIC18F2321-I/ML has 8 KB of Flash program memory (4K x 16 words). According to the Microchip datasheet for the PIC18F2321 family, Flash is organized as 16-bit words, giving 4,096 instruction addresses. This size is well-suited to small control loops, sensor processing, and embedded communication stacks where C code fits comfortably.
What does the -I/ML suffix mean on PIC18F2321?
The -I suffix indicates the -40C to +85C industrial temperature range, and the /ML suffix designates the 28-pin QFN package (6x6 mm) with exposed thermal pad. A -E suffix would extend the range to -40C to +125C (extended), and a /SO would denote a 28-pin SOIC. Always verify the full ordering code on the Microchip product page before ordering to avoid mismatching.
What is the maximum clock speed of PIC18F2321?
The PIC18F2321 runs at up to 40 MHz oscillator frequency, delivering 10 MIPS throughput via a 4-clock-per-instruction pipeline. This equates to a 100 ns instruction cycle. According to the manufacturer datasheet, the device supports external crystal, resonator, or internal oscillator configurations for flexible clocking.
Where to buy PIC18F2321-I/ML online?
The PIC18F2321-I/ML is in stock at DigiKey (lead time: ships today per listing), Mouser, and Octopart-listed distributors including Heisener (22,944 pieces reported) and Bonchip. Prices as of 2026-09-26 start around $4.95 per unit at qty-1. XAIPART provides an alternative source for OEM and engineering quantities via online catalog.
What is the price of PIC18F2321-I/ML?
PIC18F2321-I/ML pricing as of 2026-09-26: approximately $4.95 at qty-1, $4.45 at qty-10, $3.96 at qty-100, $3.56 at qty-500, and $3.17 at qty-1000. Bulk pricing reflects typical Microchip channel discounts. For real-time distributor quotes, DigiKey, Mouser, and Octopart listings provide live inventory feeds.
What is the lead time for PIC18F2321-I/ML?
DigiKey reports 'ships today' for the PIC18F2321-I/ML with stock immediately available. Heisener lists 22,944 pieces in stock with delivery of 4-7 business days (expedited shipping option). Microchip direct order for production volumes typically requires 6-12 weeks for non-stocked part numbers.
Is PIC18F2321-I/ML in stock at major distributors?
Yes, as of 2026-09-26 the PIC18F2321-I/ML is in stock at DigiKey, Mouser, and at least 11 distributors per Octopart's inventory aggregator. Heisener reported 22,944 pieces. The part is in active production status per the Microchip product page, so multi-source availability is expected to remain stable.
What is the best drop-in replacement for PIC18F2321-I/ML?
The drop-in replacement for PIC18F2321-I/ML is PIC18LF2321-I/ML, the low-voltage F-variant for VDD 2.0V-5.5V operation in the same 28-VQFN (ML) package. Per Microchip's migration guide, F and LF parts share pinout and peripheral set; LF drops top VDD from 5.5V to 3.6V. For identical 5V operation, PIC18F2321-I/ML is itself the direct replacement.
Can PIC18F2321-I/SO replace PIC18F2321-I/ML?
No. The PIC18F2321-I/SO uses a 28-pin SOIC package and is NOT pin-compatible with the 28-VQFN (ML) variant despite identical silicon. Switching between them requires PCB redesign because the SOIC land pattern differs from the QFN pad geometry. The /ML and /SO are alternate package options, not drop-in replacements.
PIC18F2321 vs PIC18F2221 - which is better for motor control?
The PIC18F2321 and PIC18F2221 share identical 28-VQFN package and peripheral set; PIC18F2221 has half the Flash (4 KB vs 8 KB) and half the RAM (256 B vs 512 B). For small BLDC or stepper motor control, PIC18F2321's larger memory allows more sophisticated commutation tables and sensor fusion code. Choose PIC18F2221 only when cost is paramount and algorithm fits in 4 KB.
When should I choose PIC18F2321-I/ML over PIC18F1320?
Choose PIC18F2321-I/ML when you need 8 KB Flash, 512 B RAM, the ECCP PWM module, and higher 40 MHz CPU speed. The PIC18F1320 is an earlier-generation 8-bit MCU with less memory and a different peripheral set. For new designs needing 10 MIPS throughput and 10-bit ADC with multiple channels, the PIC18F2321 is the better platform.
Is PIC18F2321-I/ML suitable for industrial control?
Yes. The PIC18F2321-I/ML's -40C to +85C industrial temperature range, 10 MIPS performance, 10-bit ADC, hardware PWM, and nanoWatt sleep modes make it well-suited to industrial control loops, sensor conditioning, and low-end motor drives. For harsh environments beyond 85C, choose PIC18F2321-E/ML (-40C to +125C extended) instead.
Where to download PIC18F2321-I/ML datasheet PDF?
The PIC18F2321-I/ML datasheet is available on Microchip's official product page at https://www.microchip.com/en-us/product/PIC18F2321. The same document is mirrored on distributor sites like DigiKey and Octopart. Microchip's product page also provides errata, application notes (TB documents), and MPLAB X IDE configuration bits examples for in-system programming.
What are the key specifications of PIC18F2321-I/ML engineers should know?
PIC18F2321-I/ML headline specifications: 8-bit PIC core, 40 MHz (10 MIPS), 8 KB Flash, 512 B RAM, 256 B EEPROM, 10-bit ADC with up to 10 channels, 1x ECCP PWM, 2 comparators, EUSART (LIN-capable), MSSP (SPI/I2C), nanoWatt sleep modes, industrial -40C to +85C range, 28-VQFN (6x6 mm) package with exposed pad. These specs collectively define a mid-density 8-bit MCU for sensor and motor control.

Engineering reference data for PIC18F2321-I/ML — comparison, design guidance, and compliance information.

Selection Guide

Choose PIC18F2321-I/ML when your embedded design requires 8 KB Flash, 512 B RAM, and 10 MIPS throughput on a 5V supply. Pick PIC18LF2321-I/ML instead when you need 2.0V-5.5V operation for battery-powered applications at the cost of maximum VDD. Choose PIC18F2221-I/ML if your firmware fits in 4 KB and you need the same PIC18F peripherals at lower cost. For temperature environments up to +125C (automotive, industrial), select PIC18F2321-E/ML, the extended-temperature variant. All five PIC18F2321-family parts share the 28-VQFN (ML) footprint, enabling a single PCB layout across variants. Avoid the PIC18F1320 unless your legacy code base requires it - its 20 MHz CPU speed is half the F2321 throughput.

Comparison with Alternatives

Parameter This Product PIC18LF2321-I/ML PIC18F2321-E/ML PIC18F2221-I/ML PIC18F2321T-I/ML PIC18F1320-I/ML
Brand Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology Microchip Technology
Package 28-VQFN (ML, 6x6 mm) 28-VQFN (ML, 6x6 mm) - same 28-VQFN (ML, 6x6 mm) - same 28-VQFN (ML, 6x6 mm) - same 28-VQFN (ML, 6x6 mm) - same 28-VQFN (ML, 6x6 mm) - same
Flash 8 KB 8 KB 8 KB 4 KB 8 KB 8 KB
RAM 512 B 512 B 512 B 256 B 512 B 256 B
Max CPU Speed 40 MHz 40 MHz 40 MHz 40 MHz 40 MHz 20 MHz
Operating Temperature -40C to +85C -40C to +85C -40C to +125C -40C to +85C -40C to +85C -40C to +85C
Operating Voltage 4.2V to 5.5V 2.0V to 5.5V 4.2V to 5.5V 4.2V to 5.5V 4.2V to 5.5V 2.0V to 5.5V
ADC 10-bit 10-bit 10-bit 10-bit 10-bit 10-bit

Key Differentiators

  • Standard 4.2-5.5V operation with clear migration path to LF variant (vs PIC18LF2321-I/ML)
  • Doubled Flash and RAM density over PIC18F2221 (vs PIC18F2221-I/ML)
  • 2x maximum CPU speed over PIC18F1320 (vs PIC18F1320-I/ML)

Design Notes

A common pitfall when designing with the PIC18F2321-I/ML is missing the obligatory 100 nF ceramic decoupling capacitor within 5 mm of each VDD/VSS pair. The exposed thermal pad MUST be soldered to a contiguous ground plane for both thermal relief and electrical reference, otherwise erratic reset behavior may occur under sustained load. Configuration bits (CONFIG1H through CONFIG3H) must be explicitly set in the source code; leaving them at default may enable the internal RC oscillator when an external crystal is fitted, causing timing errors.

At maximum 40 MHz CPU clock and all peripherals active, the PIC18F2321-I/ML dissipates approximately 250 mW; the 28-VQFN thermal pad junction-to-ambient is approximately 30 C/W with a 1 oz copper 4-layer board. Estimated: at 25C ambient, junction rise is ~7.5C. The package is rated for 85C industrial operation; a small copper pour tied to ground extending from the exposed pad helps keep junction temperature within safe limits during transient peaks.

Place the ICSP (In-Circuit Serial Programming) header footprint at the board edge to allow easy debugger (PICkit 3/4 or MPLAB ICD 4) access without removing the chip. Route RB6/PGC and RB7/PGD to the header with series 100 ohm resistors near the MCU for debug isolation. Keep analog traces (RAx/ANx) short and away from PWM/digital switching lines to minimize ADC coupling. The 6x6 mm QFN land pattern requires 0.4 mm pitch QFN routing; use via-in-pad with filled and plated-over pads for solid thermal ground.

Compliance Information

RoHS
Compliant
REACH
Compliant
AEC-Q100
Not Qualified
Lead Free
Yes
Halogen Free
Unknown
Conflict Minerals
Compliant

RoHS compliant per Microchip product page. Not AEC-Q100 qualified; for AEC-Q100 automotive MCU applications, choose PIC18F-K42 family or PIC18F-Q43 family parts.

Data verified on: 2026-09-26 — data verified and curated by XAIPART's component engineering team

Related Searches

PIC18F2321-I/ML PIC18F2321 datasheet Microchip PIC18F2321 8-bit PIC 28 QFN MCU PIC18F2321-I/ML pinout PIC18F2321 motor control application PIC18F2321 vs PIC18LF2321 PIC18F2321 drop-in replacement PIC18F2321-I/ML price buy PIC18F2321 ISP programming PIC18F2321 XC8 MPLAB X example PIC18F2321 industrial sensor application

Related Components & Terms

Microchip Technology PIC18F2321-I/ML PIC18F2321 PIC18LF2321-I/ML PIC18F2321-E/ML PIC18F2221-I/ML PIC18F2321T-I/ML PIC18F1320-I/ML PIC18 family 8-bit microcontroller MCU Flash memory EEPROM ECCP EUSART LIN bus nanoWatt Technology 28-VQFN QFN package ROHS MPLAB X XC8 compiler ICD 4 PICkit 4
Quick Quote RFQ
Fill in complete details — our sales team will respond within 24 hours
Part Number Manufacturer Package QTY Target Price Extended
Total: $0.00 USD
✓
Quote submitted!

We will respond to your email within 24 hours

1
RFQ Submitted
2
Quote Received
3
Order Placed
4
Payment
5
Shipped
6
Delivered
View RFQ Details