PIC18F2321T-I/ML - 8KB Flash 8-bit MCU, 28-QFN | Microchip
MPN: PIC18F2321T-I/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.65 | $4.65 |
| 10 | $4.21 | $42.10 |
| 100 | $3.74 | $374.00 |
| 500 | $3.32 | $1,660.00 |
| 1,000 | $2.96 | $2,960.00 |
PIC18F2321T-I/ML Overview
A microcontroller (MCU) is a single-chip computer that combines a CPU, non-volatile program memory (Flash/ROM), volatile working memory (RAM), and programmable peripherals on one die. PIC microcontrollers from Microchip use a Harvard RISC architecture with a small, fixed instruction set (77 single-word instructions on this device) that simplifies software development, shortens interrupt latency, and yields deterministic execution. Within the broader taxonomy, the PIC18F2321 sits in the hierarchy: MCU -> 8-bit MCU -> PIC18 enhanced family -> nanoWatt power-managed variants. nanoWatt technology adds multiple low-power sleep modes that drop supply current to the microamp range, enabling battery-powered designs.
Key differentiating features of this device include 8 KB of self-programmable Flash (in-circuit serial programming via ICSP), 256 bytes of EEPROM data memory, an internal oscillator block, brown-out reset (BOR), a 10-bit ADC with 10 channels, dual analog comparators, a Capture/Compare/PWM (CCP) module, and nanoWatt sleep modes that typically idle below 1 uA. The PIC18 instruction set is backwards-compatible with PIC16 code while adding prioritized interrupts, hardware multiply, and an 8-bit-wide data path with 16-bit instruction words.
Architecturally, the PIC18F2321 uses a 14-bit instruction word fetched from Flash and executed by an 8-bit ALU in one instruction cycle (4 Fosc). The internal oscillator trims to +/-1% across voltage and temperature, removing the need for an external crystal in cost-sensitive applications. Peripherals map onto the same peripheral bus used across the PIC18F family, allowing easy code migration to the 40-pin (PIC18F4321) or 44-pin (PIC18F4520-class) siblings with little or no code change.
Typical applications include industrial sensor interfaces, low-cost motor control loops, small appliance controllers, USB-to-UART bridges when paired with a USB transceiver, consumer white goods, and battery-powered data loggers. The combination of nanoWatt modes and 10-bit ADC accuracy makes it well suited to portable instrumentation and remote sensor nodes.
When designing with this part, choose your oscillator source early - the internal RC oscillator saves BOM cost but is less accurate than an external crystal for timing-critical UART or USB communications. Always populate the ICSP connector footprint even in production designs, as it enables in-field firmware updates and simplifies prototype bring-up. This page synthesizes distributor pricing, drop-in package-matched alternatives, and practical design notes not found in the manufacturer datasheet.
Drop-in alternatives for PIC18F2321T-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 PIC18F2321T-I/ML (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:
PIC18F2321-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F2221T-I/ML
✅ Drop-In✓ In Stock
$2.62 / Unit
View Datasheet →PIC18F2420T-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F2520T-I/ML
✅ Drop-In✓ In Stock
$4.62 / Unit
View Datasheet →PIC18F23K22T-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F26K20T-I/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F2321T-I/ML Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC18 (8-bit Harvard RISC) |
| Program Memory (Flash) | 8 KB (4K x 16 instructions) |
| Data Memory (RAM) | 512 bytes |
| Data EEPROM | 256 bytes |
| Maximum CPU Speed | 40 MHz (10 MIPS) |
| Instruction Execution Time | 100 ns @ 40 MHz |
| Instruction Set Size | 77 single-word instructions |
| Operating Voltage (Vdd) | 2.0 V to 5.5 V |
| Digital I/O Pins | 25 |
| ADC | 10-bit, 10 channels |
| Communication Interfaces | 1x I2C, 1x SPI, 1x USART (Enhanced) |
| Analog Comparators | 2 |
| CCP Module | 1 (Capture/Compare/PWM) |
| Timers | 4 (Timer0/1/2/3) |
| Brown-Out Reset | Yes (BOR) |
| Internal Oscillator | Yes (31 kHz - 8 MHz, software selectable) |
| Operating Temperature Range | -40C to +85C (Industrial, 'I' suffix) |
| Package | 28-QFN (ML) 6x6 mm with Exposed Pad |
| Mounting Type | Surface Mount |
| MSL Level | 1 (unlimited) |
| RoHS Status | Compliant |
| Lead-Free / Halogen-Free | Yes |
PIC18F2321T-I/ML Pin Configuration
| Pin 1 | MCLR — Master Clear (reset) input, active low |
| Pin 2 | RA0/AN0 — PORTA bit 0 / ADC input channel 0 |
| Pin 3 | RA1/AN1 — PORTA bit 1 / ADC input channel 1 |
| Pin 4 | RA2/AN2/VREF- — PORTA bit 2 / ADC input channel 2 / ADC negative reference |
| Pin 5 | RA3/AN3/VREF+ — PORTA bit 3 / ADC input channel 3 / ADC positive reference |
| Pin 6 | RA4/T0CKI — PORTA bit 4 / Timer0 clock input |
| Pin 7 | RA5/AN4/SS — PORTA bit 5 / ADC input channel 4 / SPI Slave Select |
| Pin 8 | VSS — Ground reference |
| Pin 9 | OSC1/RA7 — Oscillator input / PORTA bit 7 |
| Pin 10 | OSC2/RA6 — Oscillator output / PORTA bit 6 |
| Pin 11 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / Timer1 clock |
| Pin 12 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2 |
| Pin 13 | RC2/CCP1 — PORTC bit 2 / CCP1 PWM output |
| Pin 14 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I2C clock |
| Pin 15 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I2C data |
| Pin 16 | RC5/SDO — PORTC bit 5 / SPI data out |
| Pin 17 | RC6/TX/CK — PORTC bit 6 / USART TX / USART clock |
| Pin 18 | RC7/RX/DT — PORTC bit 7 / USART RX / USART data |
| Pin 19 | VSS — Ground reference |
| Pin 20 | VDD — Positive supply voltage |
| Pin 21 | RB0/INT0/AN12 — PORTB bit 0 / External interrupt 0 / ADC input channel 12 |
| Pin 22 | RB1/INT1/AN10 — PORTB bit 1 / External interrupt 1 / ADC input channel 10 |
| Pin 23 | RB2/INT2/AN8 — PORTB bit 2 / External interrupt 2 / ADC input channel 8 |
| Pin 24 | RB3/AN9/CCP2 — PORTB bit 3 / ADC input channel 9 / CCP2 |
| Pin 25 | RB4/AN11 — PORTB bit 4 / ADC input channel 11 |
| Pin 26 | RB5/AN13 — PORTB bit 5 / ADC input channel 13 |
| Pin 27 | RB6/PGC — PORTB bit 6 / ICSP clock |
| Pin 28 | RB7/PGD — PORTB bit 7 / ICSP data |
| Pin 29 | EP — Exposed thermal pad - must be soldered to ground copper pour |
Typical Applications
PIC18F2321T-I/ML is suitable for 6 applications: Industrial Sensor Interface Module, Low-Cost Motor Control Board, Battery-Powered Data Logger, Small Appliance Control Board, USB-to-UART Bridge Module, Consumer White Goods Remote Control.
Industrial Sensor Interface Module
The PIC18F2321T-I/ML is well suited to industrial sensor interface modules that aggregate analog and digital signals from factory equipment. Its 10-channel 10-bit ADC handles multiple sensor inputs (temperature via thermistor, pressure via strain gauge, flow via pulse, and 4-20 mA loopback), while the I2C bus talks to digital sensors such as accelerometers and EEPROMs. The USART links the module to a PLC or gateway, the Enhanced CCP module drives alarm or indicator PWM outputs, and brown-out reset protects against the voltage transients common on 24V industrial rails. The industrial -40C to +85C temperature range covers unheated cabinets and outdoor enclosures.
Recommended
Low-Cost Motor Control Board
For brushed DC motor and small stepper control, the PIC18F2321T-I/ML delivers enough MIPS to run closed-loop PID without external DSP. The Enhanced CCP module generates 20 kHz PWM at 10-bit resolution for H-bridge drive signals, the analog comparators implement cycle-by-cycle current limiting without ADC intervention, and the 10-bit ADC reads back tacho-generator voltage for speed regulation. The 77 single-word instruction set keeps the PID loop deterministic, while nanoWatt sleep modes allow battery-backed idle when the motor is stopped. This combination delivers a fully featured BLDC or stepper controller for fans, pumps, and small appliances at sub-$3 BOM.
Recommended
Battery-Powered Data Logger
The PIC18F2321T-I/ML excels in battery-powered data loggers where sleep-mode current is critical. nanoWatt technology drops quiescent current below 1 uA in sleep mode, allowing years of operation from a single CR2032 cell when wake-ups are infrequent. The 256-byte EEPROM buffers calibration and metadata, while 8 KB Flash stores the application plus a small FAT library. The 10-bit ADC samples battery voltage and analog sensors every few seconds, the I2C bus interfaces to a real-time clock and external flash, and the internal oscillator eliminates the external crystal cost and quiescent current. Industrial -40C to +85C operation handles outdoor and automotive deployments.
Recommended
Small Appliance Control Board
Coffee machines, toaster ovens, washing machines, and other small appliances use the PIC18F2321T-I/ML as their primary control MCU. It reads user inputs from buttons and rotary encoders via the 10-bit ADC, drives triac-gated heater elements through the CCP PWM module, monitors NTC thermistors for closed-loop temperature control, and provides buzzer and LED feedback through GPIO. The internal oscillator and 28-QFN package enable a tiny 30x30 mm PCB, while the -40C to +85C industrial grade handles the thermal environment of a toaster or oven chassis. ICSP allows the appliance maker to update firmware in-line during production.
Recommended
USB-to-UART Bridge Module
When paired with a USB-to-UART bridge IC such as the MCP2200 or MCP2221, the PIC18F2321T-I/ML forms a configurable USB peripheral that exposes its USART and GPIO to a host PC. This architecture is common in legacy firmware-flashing jigs, test fixtures, and field-service tools. The PIC18F2321 acts as the application-side processor while the USB IC handles enumeration and protocol translation; the PIC18F2321 also handles ICSP emulation, fault logging, and 10-bit ADC monitoring of test points. The 28-QFN allows the entire bridge module to fit in a USB connector shell.
Recommended
Consumer White Goods Remote Control
Remote controls for ceiling fans, garage doors, and motorized blinds use the PIC18F2321T-I/ML for keypad scanning, IR or RF transmit, and battery monitoring. nanoWatt sleep draws sub-microamp current so the AAA battery lasts years; the 10-bit ADC monitors battery voltage and ambient light for adaptive backlight control; the USART or MSSP drives a 433 MHz ASK/FSK transmitter module. The 77 single-word instruction set simplifies deterministic IR protocol encoding, and the internal oscillator eliminates external crystal cost in a price-sensitive consumer market.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F2321T-I/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F2321-I/ML | PIC18F2221T-I/ML | PIC18F2420T-I/ML | PIC18F23K22T-I/ML |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-QFN (ML) 6x6 mm | 28-QFN (ML) 6x6 mm - same | 28-QFN (ML) 6x6 mm - same | 28-QFN (ML) 6x6 mm - same | 28-QFN (ML) 6x6 mm - same |
| Program Memory (Flash) | 8 KB | 8 KB | 4 KB | 16 KB | 8 KB |
| RAM | 512 bytes | 512 bytes | 256 bytes | 768 bytes | 512 bytes |
| EEPROM | 256 bytes | 256 bytes | 128 bytes | 256 bytes | 256 bytes |
| Maximum CPU Speed | 40 MHz (10 MIPS) | 40 MHz (10 MIPS) | 40 MHz (10 MIPS) | 40 MHz (10 MIPS) | 64 MHz (16 MIPS) |
| ADC | 10-bit, 10 channels | 10-bit, 10 channels | 10-bit, 10 channels | 10-bit, 11 channels | 10-bit, 14 channels |
| Operating Temperature Range | -40C to +85C (Industrial) | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
| Communication Interfaces | 1x I2C, 1x SPI, 1x USART | 1x I2C, 1x SPI, 1x USART | 1x I2C, 1x SPI, 1x USART | 1x I2C, 1x SPI, 1x USART | 2x I2C, 1x SPI, 1x USART |
| Internal Oscillator | Yes | Yes | Yes | Yes | Yes (XLP nanoWatt) |
Key Differentiators
- Larger Flash memory than the older PIC18F2221 (vs PIC18F2221T-I/ML)
- Mature, low-cost family with broadest tool support (vs Newer PIC18F23K22)
- Pin compatibility with the entire PIC18F2xxx family (vs PIC18F14K50)
Design Notes
The 28-QFN package has a large center exposed thermal pad (EP) that must be soldered to a ground copper pour for electrical and thermal performance. Place at least 6 thermal vias (0.3 mm drill, 0.6 mm pad) in the EP landing area to sink heat into inner ground planes. Keep high-speed traces (USART, SPI clock) away from the analog AVdd/VREF pins to minimize crosstalk.
Decouple VDD with a 100 nF ceramic capacitor placed within 5 mm of the supply pin, and add a bulk 10 uF tantalum or aluminum electrolytic if switching loads are present. The PIC18F2321 supports an AVdd pin for clean ADC supply - if the application has digital and analog loads, isolate AVdd with a ferrite bead and 10 uF + 100 nF local decoupling. Brown-out reset (BOR) should be enabled in configuration bits to protect against the voltage sags that occur during motor inrush.
Do not confuse PIC18F2321 (28-pin) with PIC18F4321 (40-pin) - the additional pins expose extra I/O and peripherals not available on the 28-pin device. Also note that the 'T' suffix denotes Tape & Reel, not a temperature grade; 'I' = Industrial -40C to +85C, 'E' = Extended -40C to +125C. Programming via ICSP requires a 4-wire header (MCLR/VPP, PGD, PGC, VSS) - leave this footprint on the PCB for in-field firmware updates.
When using the internal oscillator at 8 MHz for UART communications, baud rate error can exceed 2 percent at high bitrates, which causes framing errors on remote devices. For reliable UART above 38400 baud, switch to a 10 MHz or 20 MHz external crystal. The PIC18F2321 supports primary oscillator modes HS, XT, and LP via the configuration bits - consult the family datasheet's oscillator section for capacitor selection guidelines.
Compliance Information
RoHS compliant and lead-free per Microchip PIC18F2321 product page. Not AEC-Q100 qualified; for automotive applications, Microchip recommends PIC18F2xK22 family which carries AEC-Q100 Grade 1 (-40C to +125C) qualification.