PIC18LF2321T-I/SO - 8KB Flash 40MHz 8-bit MCU | Microchip
MPN: PIC18LF2321T-I/SO ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $4.83 | $4.83 |
| 10 | $4.4 | $44.00 |
| 100 | $3.92 | $392.00 |
| 500 | $3.55 | $1,775.00 |
| 1,000 | $3.18 | $3,180.00 |
PIC18LF2321T-I/SO Overview
A microcontroller (MCU) is a single-chip computer containing a CPU core, program memory, RAM, peripherals, and I/O. Within the broader taxonomy, the PIC18LF2321 belongs to the 8-bit microcontroller family, which sits under the wider category of microcontrollers (MCU) within the embedded computing hierarchy: 8-bit MCU -> 16-bit MCU -> 32-bit MCU -> microprocessor -> embedded processor -> semiconductor. PIC18 devices are the mid-tier Microchip family, upgradeable from PIC16 and migration-targetable to PIC24 / dsPIC for higher performance, while remaining pin-compatible in many footprints.
Key features include nanoWatt Technology with multiple power-managed operating modes (RUN, IDLE, SLEEP), a 10-bit ADC with up to 13 channels, two analog comparators, one Enhanced USART (EUSART) supporting RS-232/RS-485 and LIN, one MSSP port configurable for SPI or I2C (master/slave), two 8-bit timers plus three 16-bit timers, and a 10-bit PWM module with up to four channels. The device is upwards compatible with PIC16C5X, PIC12CXXX, PIC16CXX, and PIC17CXX code, providing a software migration path to existing designs.
Typical applications include industrial sensor nodes, white-goods and appliance control panels, automotive body and comfort modules (non-safety), battery-powered handheld instruments, USB-to-UART bridges, and low-cost user-interface boards requiring capacitive touch via the mTouch peripheral. When designing with this MCU, ensure the MCLR pull-up, ICSP clock and data lines, and the Vcap bulk-decoupling capacitor are routed per Microchip PIC18F2321 datasheet guidelines; the LF variant tolerates the wide 2.0-5.5 V supply but requires Vdd rise to be monotonic for proper brown-out reset behavior. This page consolidates distributor pricing, drop-in SOIC-28 alternatives, and practical design notes that complement the Microchip datasheet.
Drop-in alternatives for PIC18LF2321T-I/SO — 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 PIC18LF2321T-I/SO (same form factor and footprint) — differing in Package, Timers, ADC, Operating Temperature, Core Architecture.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18LF2321-I/SO
✅ Drop-In✓ In Stock
$2.4 / Unit
View Datasheet →PIC18F2321T-I/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18LF2320T-I/SO
✅ Drop-In✓ In Stock
$3.75 / Unit
View Datasheet →PIC18F2320T-I/SO
✅ Drop-In✓ In Stock
$4.1 / Unit
View Datasheet →PIC18LF2420-I/SO
✅ Drop-In✓ In Stock
$2.71 / Unit
View Datasheet →PIC18LF2321T-I/SO Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC18 (8-bit) |
| Program Memory Size | 8 KB (4K x 16) Flash |
| RAM Size | 512 bytes |
| EEPROM Size | 256 bytes |
| Maximum CPU Speed | 40 MHz (10 MIPS) |
| Supply Voltage (Vdd) | 2.0 V to 5.5 V |
| I/O Pins | 25 |
| ADC | 10-bit, up to 13 channels |
| Timers | 2 x 8-bit, 3 x 16-bit |
| PWM Channels | Up to 4 (10-bit) |
| Communication | 1 x EUSART (LIN/RS-485), 1 x MSSP (SPI/I2C) |
| Analog Comparators | 2 |
| Package | 28-pin SOIC (7.50 mm / 0.295 inch wide) |
| Operating Temperature | -40C to +85C (Industrial) |
| Instruction Set | 77 single-word instructions |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
| Lead-Free | Yes |
PIC18LF2321T-I/SO Pin Configuration
| Pin 1 | MCLR/VPP/RE3 — Master Clear (reset) input or programming voltage / PORTE bit 3 |
| Pin 2 | RA0/AN0 — PORTA bit 0 / analog input 0 |
| Pin 3 | RA1/AN1 — PORTA bit 1 / analog input 1 |
| Pin 4 | RA2/AN2/VREF- — PORTA bit 2 / analog input 2 / ADC negative reference |
| Pin 5 | RA3/AN3/VREF+ — PORTA bit 3 / analog input 3 / ADC positive reference |
| Pin 6 | RA4/T0CKI/C1OUT — PORTA bit 4 / Timer0 clock input / comparator 1 output |
| Pin 7 | RA5/AN4/SS/HLVDIN/C2OUT — PORTA bit 5 / analog input 4 / SPI slave select / HLVD input / comparator 2 output |
| Pin 8 | GND — Ground reference |
| Pin 9 | OSC1/CLKI/RA7 — External oscillator input / PORTA bit 7 |
| Pin 10 | OSC2/CLKO/RA6 — External oscillator output / PORTA bit 6 |
| Pin 11 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| Pin 12 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2 PWM |
| Pin 13 | RC2/CCP1 — PORTC bit 2 / CCP1 PWM / capture/compare |
| 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 / EUSART TX / clock |
| Pin 18 | RC7/RX/DT — PORTC bit 7 / EUSART RX / data |
| Pin 19 | GND — Ground reference |
| Pin 20 | VDD — Positive supply voltage (2.0 V to 5.5 V) |
| Pin 21 | RB0/AN12/INT0 — PORTB bit 0 / analog input 12 / external interrupt 0 |
| Pin 22 | RB1/AN10/INT1 — PORTB bit 1 / analog input 10 / external interrupt 1 |
| Pin 23 | RB2/AN8/INT2 — PORTB bit 2 / analog input 8 / external interrupt 2 |
| Pin 24 | RB3/AN9/CCP2A — PORTB bit 3 / analog input 9 / CCP2 alternate output |
| Pin 25 | RB4/AN11/KBI0 — PORTB bit 4 / analog input 11 / interrupt-on-change 0 |
| Pin 26 | RB5/KBI1/PGM — PORTB bit 5 / interrupt-on-change 1 / LVP programming |
| Pin 27 | RB6/KBI2/PGC — PORTB bit 6 / interrupt-on-change 2 / ICSP clock |
| Pin 28 | RB7/KBI3/PGD — PORTB bit 7 / interrupt-on-change 3 / ICSP data |
Typical Applications
PIC18LF2321T-I/SO is suitable for 6 applications: Industrial Sensor Node (4-20 mA / 0-10 V), White-Goods / Appliance Control Board, Automotive LIN Slave Node, Battery-Powered Handheld Instrument, User Interface Board (LED + Keys + Buzzer), USB-to-UART Bridge / Programming Adapter.
Industrial Sensor Node (4-20 mA / 0-10 V)
Why fit: The PIC18LF2321T-I/SO's 10-bit ADC with up to 13 input channels, 2.0-5.5 V LF supply, and 25 I/O make it a natural fit for low-cost analog sensor conditioning and digital I/O aggregation nodes. Specifically, the ADC's 10-bit resolution and the EUSART/MSSP peripherals allow direct bridge-amp readout followed by RS-485 or I2C bus transmission without external glue logic. The 2.0 V minimum Vdd lets the board run directly from a 2-cell AA battery with a boost converter, simplifying the analog front-end supply. How used: The MCU sits between the sensor bridge/conditioning stage and the isolated comms transceiver, sampling at typically 100 Hz to 1 kHz and forwarding measurements via MODBUS-RTU over RS-485. Trade-off: A discrete op-amp plus MCU ADC achieves roughly 12-bit effective resolution (with oversampling), versus a 24-bit dedicated sigma-delta ADC; the PIC18 solution is dramatically cheaper but has higher noise floor.
Recommended
White-Goods / Appliance Control Board
Why fit: The 28-pin SOIC footprint, 25 I/O, four 10-bit PWM channels, and 2.0-5.5 V LF supply make the PIC18LF2321T-I/SO well-suited to washing machines, dishwashers, microwave ovens, and induction cooktop HMI boards. Specifically, the EUSART enables touch-panel or HMI link, while multiple timers support triac zero-crossing and motor RPM feedback. The wide 2.0-5.5 V supply means the part tolerates rectified 5 V rail droop during relay switching transients. How used: The MCU runs the user-interface state machine, drives LED indicators via PWM, and times triac firing on a 50/60 Hz mains half-cycle; brown-out and watchdog timers handle fault recovery. Trade-off: The PIC18 is 8-bit; for complex GUIs the PIC32 or Cortex-M0+ is more capable, but for simple knob-and-button panels the 18LF2321 is cost-optimal.
Recommended
Automotive LIN Slave Node
Why fit: The Enhanced USART (EUSART) supports LIN 1.3 / 2.0 with auto-baud and break-detect, and the LF variant's 2.0-5.5 V range tolerates 12 V automotive battery cranking transients when powered via an external regulator. The PIC18LF2321T-I/SO's 25 I/O and ADC are sufficient for body-comfort modules such as seat controllers, mirror adjusters, or window-lift switches. Industrial -40C to +85C rating covers most passenger-compartment locations; under-hood applications should use the Q-grade AEC-Q100 variant instead. How used: The MCU implements a LIN 2.0 slave stack, drives relay / FET outputs for the comfort function, and reads switch inputs via interrupt-on-change, all on a 28-SOIC board. Trade-off: For ASIL-B/C safety systems the PIC18 is insufficient; designers must use the PIC18 K-series with CAN or a dedicated safety MCU.
Recommended
Battery-Powered Handheld Instrument
Why fit: The PIC18LF2321T-I/SO's nanoWatt Technology with multiple low-power modes and the LF supply (2.0 V to 5.5 V) make it suitable for handheld DMMs, environmental loggers, and BLE-bridged sensor pens that run on 2 x AA / 1 x CR2032 cells. Sleep currents in the microamp range enable 1+ year battery life if the CPU wakes only on a button press or 1 Hz timer. The MSSP-based I2C interface works seamlessly with popular low-power ADCs and sensors. How used: The MCU performs peak-and-hold ADC reads, drives a low-power LCD via segmented I/O, and forwards data over a UART-BLE bridge. Trade-off: A dedicated low-power Cortex-M0+ may offer lower deep-sleep current, but the PIC18's strong interrupt-driven I/O set and Microchip MPLAB X toolchain shorten firmware development.
Recommended
User Interface Board (LED + Keys + Buzzer)
Why fit: 25 I/O plus 4 PWM channels on the PIC18LF2321T-I/SO support up to 25 LEDs or 12 matrix-scan keys plus a buzzer tone, all on the 28-SOIC package. The 10-bit ADC can be shared with a small resistive touch strip via the mTouch sensor-impedance measurement technique, enabling cost-sensitive touch UI without dedicated touch ICs. How used: The MCU scans the key matrix on a 1 ms timer, drives PWM LED dimming, and emits key events over I2C to a host controller. Trade-off: For larger displays (TFT) the PIC18 architecture is undersized; use the PIC32 or a Cortex-M4 with integrated display controller.
Recommended
USB-to-UART Bridge / Programming Adapter
Why fit: The PIC18LF2321T-I/SO's EUSART and MSSP together with the 2.0-5.5 V LF supply make it suitable as a low-cost USB-to-UART or USB-to-I2C/SPI bridge when paired with a USB stack loader. The 8 KB Flash fits a basic CDC-ACM UART bridge plus a HID channel for bootloading. How used: The MCU implements a CDC-class USB-UART bridge, optionally exposes an I2C/SPI tunnel command set, and uses only a 28-SOIC part on the daughter board. Trade-off: For higher throughput (>=1 Mbaud) or full-speed USB with multi-endpoint support use the PIC18F14K50 or PIC18F46K40 family instead, which have native USB-OTG peripherals.
Recommended
Recommended Products Summary
Engineering reference data for PIC18LF2321T-I/SO — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18LF2321-I/SO | PIC18F2321T-I/SO | PIC18LF2320T-I/SO | PIC18F2320T-I/SO | PIC18LF2420-I/SO |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-SOIC (7.50 mm) | 28-SOIC - same | 28-SOIC - same | 28-SOIC - same | 28-SOIC - same | 28-SOIC - same |
| Supply Voltage | 2.0 V to 5.5 V (LF) | 2.0 V to 5.5 V (LF) | 4.2 V to 5.5 V (F) | 2.0 V to 5.5 V (LF) | 4.2 V to 5.5 V (F) | 2.0 V to 5.5 V (LF) |
| Flash Memory | 8 KB | 8 KB | 8 KB | 4 KB | 4 KB | 16 KB |
| RAM | 512 bytes | 512 bytes | 512 bytes | 256 bytes | 256 bytes | 768 bytes |
| Maximum CPU Speed | 40 MHz | 40 MHz | 40 MHz | 40 MHz | 40 MHz | 40 MHz |
| I/O Pins | 25 | 25 | 25 | 25 | 25 | 25 |
| EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes |
| Industrial Temp Range | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
Key Differentiators
- Wide 2.0 V to 5.5 V LF supply range for battery and 3.3 V systems (vs PIC18F2321T-I/SO)
- Migration headroom with same SOIC-28 footprint (vs PIC18LF2420-I/SO)
- Identical package to lower-memory sibling for cost optimization (vs PIC18LF2320T-I/SO)
Design Notes
Vdd must be monotonic on rising edge to guarantee correct POR and Brown-Out Reset (BOR) behavior; add a 100 nF decoupling cap close to pin 20 and a bulk 1 uF to 10 uF cap within 1 cm. The LF process allows 2.0 V minimum, so on a 2 x AA cell, allow for cold-start at 2.0 V with the CPU at full 40 MHz - this is the lowest worst-case voltage and the MCU is still within spec. Add a reverse-protection diode and a TVS to extend battery lifetime against accidental reverse polarity.
Place a 100 nF X7R decoupling capacitor between Vdd (pin 20) and GND (pin 19) within 2 mm of the package. Route the MCLR pull-up resistor (typically 10 kOhm to Vdd) close to pin 1 with no high-current traces running underneath, since MCLR is sensitive to injected noise that can cause spurious resets. Provide an in-circuit serial programming (ICSP) connector with PGC (pin 27) and PGD (pin 28) accessible without removing the MCU from the board; this allows field firmware updates using the Microchip MPLAB ICD or PICkit.
Route the analog AVdd and AVss pins (shared with Vdd/GND) through a ferrite bead or 10 Ohm resistor to isolate digital switching noise from the analog reference used by the 10-bit ADC. Place the VREF+ bypass capacitor (typically 0.1 uF to 1 uF ceramic) directly at the AN3/VREF+ pin when used in external-reference mode. Keep ADC traces away from PWM and EUSART switching lines to minimize coupling; the LF variant has slightly higher ADC noise floor at high frequency so averaging or oversampling may be required for 10-bit ENOB at full speed.
Do not confuse the LF (2.0-5.5 V) and F (4.2-5.5 V) variants when ordering - the prefix letter controls the supply range and dropping a non-LF into a 3.3 V design will silently fail to start. Configuration bits (CONFIG1H) must explicitly select the oscillator mode (HS, XT, RC, INTOSC); if they are left blank, the device may boot from an unexpected oscillator source. The EUSART auto-baud feature requires a 'sync' character at the start of each frame; failure to send it causes one-frame receive errors during LIN diagnostics.
Compliance Information
RoHS and REACH compliance per Microchip product page. LF and F PIC18F2321 variants are not AEC-Q100 qualified; for automotive LIN nodes requiring AEC-Q100, use the PIC18F25K80 / PIC18F27K40 Q-grade variants.