PIC18F2221-I/SS - 8-Bit 40MHz 4KB Flash MCU 28-SSOP | Microchip
MPN: PIC18F2221-I/SS ✓ Hoạt độngPIC18F2221-I/SS Tóm tắt
An 8-bit PIC microcontroller is a Harvard-architecture RISC CPU designed for deterministic, low-power embedded control. Within the broader taxonomy, PIC18 sits above baseline PIC10/12/16 parts and below 16-bit dsPIC/PIC24 and 32-bit PIC32 devices. The PIC18 family adds 16-bit instructions, a hardware multiplier, linear RAM access up to 4KB and C-compiler friendly addressing, making it a workhorse for cost-sensitive real-time control applications.
Key features of the PIC18F2221-I/SS include 256 bytes of EEPROM, 512 bytes of SRAM, 25 digital I/O pins, 13 channels of 10-bit Analog-to-Digital conversion, two analog comparators, two Capture/Compare/PWM modules, a Master Synchronous Serial Port configurable as SPI or I2C, an ICD (In-Circuit Debug) interface and nanoWatt technology with multiple power-managed modes including Idle, Sleep and peripheral gating.
Technically, the PIC18F2221 combines a hardware multiplier, 8x8 hardware multiply in a single cycle and 31-level stack with 200ns instruction execution at 20 MHz (40 MHz oscillator input via 4x PLL or external). The 10-bit ADC supports up to 13 analog input channels with acquisition time programmable via software, and the MSSP peripheral provides both SPI and I2C master/slave modes. The nanoWatt power-managed modes enable typical sleep currents in the microamp range, suitable for battery-backed designs.
Typical applications for the PIC18F2221-I/SS include low-cost consumer appliances, white-goods control boards, HVAC sensor interfacing, battery chargers, security alarm panels, motor control (small DC/BLDC via PWM and comparator) and industrial sensor hubs where 5V I/O and IEC 61010-1 isolation-friendly logic levels are required.
When designing with the PIC18F2221-I/SS, allocate a minimum 0.1uF decoupling capacitor adjacent to each VDD/VSS pair and follow Microchip's Emulation/ICD connection guidelines if you intend to use the on-chip debug hardware. Devices with the same flash size but different pin count exist (PIC18F2221 = 28-pin, PIC18F4321 = 44-pin); always match the package to the PCB footprint before sourcing.
Bộ thay thế dễ dàng lắp đặt cho PIC18F2221-I/SS — cùng gói, chân-to-chân tương thích. Các bộ phận yêu cầu hàn PCB bị loại trừ.
Các biến thể trong loạt này
Các mẫu cùng loạt có thể lắp đặt dễ dàng tương thích với PIC18F2221-I/SS (cùng hình factor và footprint) — khác nhau ở Operating Temperature, Package, Program Memory (Flash), ADC, Timers.
PIC18F2221-I/SO
✅ Drop-In ⚠️ Thông số chưa được xác minh📋 Tham chiếu thay thế (không có trong danh mục)
PIC18F2321-I/SS
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC18F2420-I/SS
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC18F2520-I/SS
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC18F2221-E/SS
✅ Drop-In📋 Tham chiếu thay thế (không có trong danh mục)
PIC18F2221T-I/SS
✅ Drop-In ⚠️ Thông số chưa được xác minh📋 Tham chiếu thay thế (không có trong danh mục)
PIC18LF2221-I/SS
✅ Drop-InLiên hệ để biết giá
Xem tài liệu →PIC18F2221-I/SS Tỷ lệ tối đa & tính chất điện
| Product Type | 8-bit Microcontroller (MCU) |
| Architecture | PIC18 (Harvard RISC) |
| Family | PIC18F2xx1/4xx1 Enhanced Flash with nanoWatt |
| Core / Data Bus Width | 8-bit |
| Maximum CPU Speed | 40 MHz (16 MIPS) |
| Instruction Cycle Time | 200 ns at 20 MHz / 100 ns at 40 MHz |
| Program Memory (Flash) | 4 KB (2K x 16 words) |
| Data EEPROM | 256 bytes |
| Data SRAM | 512 bytes |
| I/O Pins | 25 |
| ADC | 10-bit, 13 channels |
| Comparators | 2 |
| CCP/ECCP Modules | 2 CCP |
| Serial Interfaces | 1x MSSP (SPI / I2C), AUSART |
| Supply Voltage (VDD) | 4.2 V to 5.5 V |
| Nhiệt độ hoạt động | -40C to +85C (Industrial, -I suffix) |
| Hộp | 28-SSOP (0.209 inch / 5.30 mm body width) |
| Kiểu lắp đặt | Surface Mount |
| Trạng thái RoHS | Compliant |
| On-Chip Debug | ICD (In-Circuit Debugger) |
| Program Memory Type | Flash (self-programming) |
Cấu hình chân PIC18F2221-I/SS
| Chân 1 | RA0/AN0 — PORTA bit 0 / Analog input channel 0 |
| Chân 2 | RA1/AN1 — PORTA bit 1 / Analog input channel 1 |
| Chân 3 | RA2/AN2/VREF-/CVREF — PORTA bit 2 / Analog input 2 / VREF- / Comparator VREF output |
| Chân 4 | RA3/AN3/VREF+ — PORTA bit 3 / Analog input 3 / VREF+ |
| Chân 5 | RA4/T0CKI/C1OUT — PORTA bit 4 / Timer0 clock input / Comparator 1 output |
| Chân 6 | RA5/AN4/SS/HLVDIN/C2OUT — PORTA bit 5 / Analog input 4 / SSP slave select / High/Low-Voltage detect / Comparator 2 output |
| Chân 7 | VSS — Ground reference |
| Chân 8 | OSC1/CLKI/RA7 — Oscillator input / External clock input / PORTA bit 7 |
| Chân 9 | OSC2/CLKO/RA6 — Oscillator output / Clock output / PORTA bit 6 |
| Chân 10 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| Chân 11 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator input / CCP2 I/O |
| Chân 12 | RC2/CCP1 — PORTC bit 2 / CCP1 I/O |
| Chân 13 | RC3/SCK/SCL — PORTC bit 3 / SSP SPI clock / I2C clock |
| Chân 14 | RC4/SDI/SDA — PORTC bit 4 / SSP SPI data in / I2C data |
| Chân 15 | RC5/SDO — PORTC bit 5 / SSP SPI data out |
| Chân 16 | RC6/TX/CK — PORTC bit 6 / AUSART TX / AUSART clock |
| Chân 17 | RC7/RX/DT — PORTC bit 7 / AUSART RX / AUSART data |
| Chân 18 | VSS — Ground reference |
| Chân 19 | VDD — Positive supply (4.2 V to 5.5 V) |
| Chân 20 | RB0/AN12/INT0 — PORTB bit 0 / Analog input 12 / External interrupt 0 |
| Chân 21 | RB1/AN10/INT1 — PORTB bit 1 / Analog input 10 / External interrupt 1 |
| Chân 22 | RB2/AN8/INT2 — PORTB bit 2 / Analog input 8 / External interrupt 2 |
| Chân 23 | RB3/AN9/CCP2 — PORTB bit 3 / Analog input 9 / CCP2 I/O |
| Chân 24 | RB4/AN11/KBI0 — PORTB bit 4 / Analog input 11 / Keyboard interrupt 0 |
| Chân 25 | RB5/KBI1/PGM — PORTB bit 5 / Keyboard interrupt 1 / LVP programming |
| Chân 26 | RB6/KBI2/PGC — PORTB bit 6 / Keyboard interrupt 2 / ICD clock |
| Chân 27 | RB7/KBI3/PGD — PORTB bit 7 / Keyboard interrupt 3 / ICD data |
| Chân 28 | VDD — Positive supply (4.2 V to 5.5 V) |
Ứng dụng tiêu biểu
PIC18F2221-I/SS phù hợp cho 6 Áp dụngs: White Goods and Home Appliance Control, HVAC and Building Automation Sensors, Industrial Sensor Hubs and IoT Gateways, Battery Chargers and Power Tools, Security and Alarm Panels, Small DC/BLDC Motor Control.
White Goods and Home Appliance Control
The PIC18F2221-I/SS is widely deployed in washing machines, dishwashers, refrigerators and microwave ovens where 5V digital I/O and 28-pin SSOP integration are standard. Its 25 digital I/O pins support keypad scanning, relay drivers, triac firing, buzzer PWM and segment-LCD control via external drivers; the 13-channel 10-bit ADC reads temperature sensors (NTC/PTC), water-level probes and humidity sensors. The PIC18 core executes household real-time control loops deterministically at 40 MHz / 16 MIPS, while nanoWatt sleep currents extend standby power budgets to <2 mW per board to meet Energy Star. The 4KB Flash holds typical appliance state machines and safety interlock firmware; the 256-byte EEPROM retains user preferences and fault logs across power cycles.
Được đề xuất
HVAC and Building Automation Sensors
In HVAC wall thermostats, indoor air-quality stations and variable-air-volume controllers, the PIC18F2221-I/SS acts as the central node that digitizes thermistor inputs, CO2/VOC sensor analog channels and occupancy-detector outputs while driving triac-controlled fan stages and communicating over RS-485 or I2C. The 13-channel 10-bit ADC provides 0.5C temperature resolution with proper averaging, and the 256-byte EEPROM stores calibration constants. The MSSP module can be configured as I2C master to scan sensor backbones; nanoWatt idle/sleep modes reduce average supply current to <100 uA for battery-backed wireless sensor variants. The 28-SSOP package suits compact wall-plate enclosures with vertical mounting.
Được đề xuất
Industrial Sensor Hubs and IoT Gateways
The PIC18F2221-I/SS is suitable for low-cost industrial 4-20 mA / 0-10 V sensor hubs that aggregate analog inputs from a few field sensors and forward data via RS-485 or Modbus RTU to a PLC. The PIC18 RISC core delivers deterministic 100 ns instruction timing required for tight sensor sampling loops, while 13 ADC channels support a typical 8-sensor scan plus 5 housekeeping inputs. The AUSART module implements Modbus RTU slave without DMA load, and the 256-byte EEPROM retains Modbus address and calibration across maintenance. The 28-SSOP package supports dense PCB layouts where mechanical footprint is constrained; the -40C to +85C industrial grade supports cabinet or panel-mount environments.
Được đề xuất
Battery Chargers and Power Tools
Cordless-drill and Li-ion battery charger designs use the PIC18F2221-I/SS to perform CC/CV charge algorithms, monitor cell voltage via the 10-bit ADC, drive MOSFET half-bridges via the two CCP PWM channels, and signal LED status through the digital I/O. The 4KB Flash holds typical NiMH, Li-ion and lead-acid charge profiles; the 256-byte EEPROM saves battery cycle count and pack health data. nanoWatt sleep currents minimize standby drain on the battery pack, and the 40 MHz CPU allows synchronous current-mode control loop execution within a few microseconds. The 28-SSOP package fits inside charger base enclosures with the MCU and analog front-end on a single PCB.
Được đề xuất
Security and Alarm Panels
PIC18F2221-I/SS-based security panels implement PIR motion detector scanning via ADC, magnetic-contact zone monitoring on digital I/O, piezo-buzzer alarm drive via PWM and key-fob signal decoding on the AUSART or external interrupt. The 25 I/O pins support 8 zones plus a 4x4 keypad matrix and strobe/LED drivers, while 256 bytes EEPROM stores installer configuration and event logs across power failures. The PIC18 deterministic interrupt response (<100 ns) ensures no missed events even during busy serial housekeeping. The 28-SSOP package suits slim wall-mounted enclosures; nanoWatt sleep mode extends battery backup life to >5 years in typical alarm duty cycles.
Được đề xuất
Small DC/BLDC Motor Control
Small BLDC or DC motor controllers for fans, pumps and toys use the PIC18F2221-I/SS to generate complementary PWM via the two CCP channels, drive MOSFET gate signals on the digital I/O, read back-EMF or shunt current via the 10-bit ADC, and implement closed-loop speed control. The 40 MHz / 16 MIPS throughput allows 20 kHz PWM with full PID loop closure inside each commutation period. The 13 ADC channels read motor phase currents, DC bus voltage and PCB temperature; the MSSP SPI drives optional digital potentiometer or gate-driver fault monitoring. The 28-SSOP package fits inside the motor housing or controller base, and nanoWatt sleep enables standby current <1 mA.
Được đề xuất
Tóm tắt các sản phẩm được đề xuất
Dữ liệu tham khảo kỹ thuật cho PIC18F2221-I/SS — so sánh, hướng dẫn thiết kế và thông tin tuân thủ.
Hướng dẫn chọn lựa
So sánh với các sản phẩm thay thế
| Tham số | Sản phẩm này | PIC18F2321-I/SS | PIC18F2420-I/SS | PIC18F2520-I/SS | PIC18F2221-E/SS | PIC18LF2221-I/SS |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 28-SSOP (5.30 mm) | 28-SSOP - same | 28-SSOP - same | 28-SSOP - same | 28-SSOP - same | 28-SSOP - same |
| Program Flash | 4 KB | 8 KB (+100%) | 16 KB (+300%) | 32 KB (+700%) | 4 KB (identical) | 4 KB (identical) |
| Data EEPROM | 256 B | 256 B | 256 B | 1 KB | 256 B | 256 B |
| Data SRAM | 512 B | 512 B | 768 B | 1.5 KB | 512 B | 512 B |
| Maximum Clock | 40 MHz / 16 MIPS | 40 MHz / 16 MIPS | 40 MHz / 16 MIPS | 40 MHz / 16 MIPS | 40 MHz / 16 MIPS | 40 MHz / 16 MIPS |
| ADC Channels | 13x 10-bit | 13x 10-bit (same) | 10x 10-bit | 10x 10-bit | 13x 10-bit (same) | 13x 10-bit (same) |
| VDD Range | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 2.0 V to 5.5 V |
| Operating Temperature | -40C to +85C (Industrial) | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +125C (Extended) | -40C to +85C |
Bảo phân biệt quan trọng
- Smallest-Flash, lowest-cost entry point of the PIC18F2x21 28-SSOP family (vsPIC18F2321-I/SS)
- Same 28-SSOP footprint as PIC18F2420 and PIC18F2520 for free firmware upgrades (vsPIC18F2520-I/SS)
- Industrial temperature range at standard cost; extended range available as -E variant (vsPIC18F2221-E/SS)
- Higher VDD range vs LF variant supports 5V-only systems (vsPIC18LF2221-I/SS)
Ghi chú thiết kế
Place a 0.1 uF X7R ceramic decoupling capacitor within 5 mm of each VDD/VSS pair (pins 19/18 and 28/18). Add a bulk 10 uF tantalum or aluminum-polymer capacitor at the regulator output to suppress Icc transient dips during CCP/PWM switching. The PIC18F2221 will draw up to 35 mA at 40 MHz; ensure the regulator can deliver at least 2x peak current for cold-start Flash programming.
Keep the 28-SSOP PCB footprint to JEDEC standard land pattern with 0.65 mm pin pitch. Route the MCLR/VPP reset line with a 10 kohm pull-up to VDD and a 100 nF capacitor to ground to enable in-circuit serial programming (ICSP). Reserve 0.1 inch-pitch test points for PGD (pin 27) and PGC (pin 26) to allow debug ICD connection without removing the IC from the board.
Keep analog ADC inputs (RA0-RA5, RB0-RB2) away from high-current switching traces such as PWM outputs on RC1/RC2 and the DC bus. Use a single-point ground at the MCU's VSS pin and route noisy return currents (MOSFET gate drive, relay coils) through a separate ground plane region. If using the internal 4x PLL, place a 100 nF capacitor across the OSC1/OSC2 pins as datasheet section 3.0 indicates for crystal operation.
Do not confuse the -I/SS suffix (industrial temp / SSOP package) with -E/SS (extended temp / SSOP) or -I/SO (industrial temp / SOIC package). Verify ordering code with Microchip's part-number decoder before procuring - mismatches will result in non-pinout-compatible SSOP vs SOIC shipments. Also note that the LF (low-voltage) variants require different programming voltages than standard F parts.
For I2C bus operation via MSSP, place 4.7 kohm pull-ups on SCL (RC3) and SDA (RC4); for SPI master operation, ensure the SCK signal integrity by routing over a continuous ground plane. The AUSART TX/RX pins (RC6/RC7) are 5V TTL-level; for RS-485 add an external transceiver such as MCP2551. Always keep MCLR high during operation to avoid spurious resets.
Thông tin tuân thủ
RoHS-compliant lead-free matte-tin finish per Microchip product declaration. Halogen-free per Microchip statement. AEC-Q100 qualification is not applicable to this general-purpose MCU; for automotive AEC-Q100 use the PIC18Fxxx-I/SS variant. REACH SVHC compliance is maintained per Microchip's chemical substance declarations.