Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes
product primary image

PIC18F4221

Status: In Production

Features:

  • Up to 10 MIPS performance
  • C compiler optimized RISC architecture
  • 8 x 8 Single Cycle Hardware Multiply
  • Internal oscillator support - 31 kHz to 8 MHz, up to 32 MHz with 4X PLL
  • Fail-Safe Clock Monitor – allows safe shutdown if clock fails
  • Watchdog Timer with separate RC oscillator
  • Wide operating Voltage range; 2.0V to 5.5V
  • Run, Idle and Sleep modes
  • Idle mode currents down to 5.8uA typical
  • Sleep mode currents down to 0.1uA typical
  • 10-bit ADC, 13 channels, 100K samples per second
  • Programmable Low Voltage Detection Module
  • Programmable Brown-out Reset module
  • Two Analog comparators with input multiplexing
  • Master Synchronous Serial Port supports SPI ™ and I2C™ Master and Slave Mode
  • EUSART module including LIN bus support
  • Four Timer Modules
  • Up to 5 PWM outputs
  • Up to 2 Capture / Compare
View More
Overview
Documents
Development Environment
Similar Devices
RoHS Information
Add to Cart

Device Overview

Summary

This powerful 10 MIPS (100 nanosecond instruction execution), yet easy-to-program (only 77 single word instructions) CMOS Flash-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into a 44-pin package and is upwards compatible with the PIC16C5X, PIC12CXXX, PIC16CXX and PIC17CXX devices and provides a seamless migration path of software code to higher levels of hardware integration.

The PIC18F4221 features a C compiler-friendly development environment, 256 bytes of EEPROM, self-programming, an ICD, 2 capture/compare/PWM functions, 13 channels of 10-bit Analog-to-Digital (A/D) converter, 2 comparators, the synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and Enhanced Universal Asynchronous Receiver Transmitter (EUSART), 8 MHz internal RC oscillator and advanced low power oscillator controls.

All of these features make it ideal for battery powered and power consumption critical applications including instrumentation and monitoring, data acquisition, power conditioning, environmental monitoring, telecom and consumer audio/video applications.

Additional Features

    CPU

    • Up to 10 MIPS performance
    • C compiler optimized RISC architecture
    • 8 x 8 Single Cycle Hardware Multiply

    System

    • Internal oscillator support - 31 kHz to 8 MHz, up to 32 MHz with 4X PLL
    • Fail-Safe Clock Monitor – allows safe shutdown if clock fails
    • Watchdog Timer with separate RC oscillator
    • Wide operating Voltage range; 2.0V to 5.5V

    nanoWatt Power Managed Modes

    • Run, Idle and Sleep modes
    • Idle mode currents down to 5.8uA typical
    • Sleep mode currents down to 0.1uA typical

    Analog Features

    • 10-bit ADC, 13 channels, 100K samples per second
    • Programmable Low Voltage Detection Module
    • Programmable Brown-out Reset module
    • Two Analog comparators with input multiplexing

    Peripherals

    • Master Synchronous Serial Port supports SPI ™ and I2C™ Master and Slave Mode
    • EUSART module including LIN bus support
    • Four Timer Modules
    • Up to 5 PWM outputs
    • Up to 2 Capture / Compare
Parametrics
Name
Value
Program Memory Type
Flash
Program Memory Size (KB)
4
CPU Speed (MIPS/DMIPS)
10
SRAM (B)
512
Data EEPROM/HEF (bytes)
256
Digital Communication Peripherals
1-UART, 1-SPI, 1-I2C1-MSSP(SPI/I2C)
Capture/Compare/PWM Peripherals
1 CCP, 1 ECCP,
Timers
1 x 8-bit, 3 x 16-bit
ADC Input
13 ch, 10-bit
Number of Comparators
2
Temperature Range (°C)
-40 to 85
Operating Voltage Range (V)
2 to 5.5
Pin Count
40

Documents

Jump to:

Programming Specifications

Development Environment

  • Integrated Development Environments
  • Compilers
  • Emulators & Debuggers
  • Production Programmers
  • Demo & Evaluation Boards
Integrated Development Environments
MPLAB-X-IDE
MPLAB X Integrated Development Environment (IDE) ( MPLAB-X-IDE )

MPLAB® X Integrated Development Environment (IDE) is an expandable, highly configurable software program that incorporates powerful tools to help you discover, configure, develop, debug and qualify embedded designs for most of Microchip’s microcontrollers, microprocessors and digital signal controllers.
MPLAB X IDE works seamlessly with the MPLAB development ecosystem of

...

Learn More
Compilers
MPLAB-XC8
MPLAB XC8 Compiler ( MPLAB-XC8 )

Available as free, unrestricted-use downloads, our award-winning MPLAB® XC C Compilers are comprehensive solutions for your project’s software development. Finding the right compiler to support your device is simple:

  • MPLAB XC8 supports all 8-bit PIC® and AVR® microcontrollers (MCUs)
  • MPLAB XC16 supports all 16-bit PIC MCUs and dsPIC® Digital
...

Learn More
Emulators & Debuggers
MPLAB PICkit 4 In-Circuit Debugger
MPLAB PICkit 4 In-Circuit Debugger ( PG164140 )

Fast programming, increased functionality, at the same price as its predecessor, the PICkit™ 3.

The MPLAB PICkit 4 now has Programmer-to-Go functionality for 8-bit, 16-bit and 32-bit PIC MCUs and dsPICs and also SAM MCU devices . The firmware update comes with MPLAB X IDE v5.30.


The MPLAB® PICkit™ 4 In-Circuit Debugger/Programmer allows fast and

...

Learn More
Add To Cart
MPLAB ICD 4 In-Circuit Debugger
MPLAB ICD 4 In-Circuit Debugger ( DV164045 )

The MPLAB® ICD 4 In-Circuit Debugger/Programmer is Microchip’s fastest, cost-effective debugging and programming tool for PIC® and SAM Microcontrollers (MCUs) and Microprocessors (MPUs), dsPIC® Digital Signal Controllers (DSCs), and CEC flash microcontrollers. This speed is provided by a SAME70 MCU with 300 MHz, 32-bit MCU with 2MB of RAM and a

...

Learn More
Add To Cart
Production Programmers
MPLAB PICkit 4 In-Circuit Debugger
MPLAB PICkit 4 In-Circuit Debugger ( PG164140 )

Fast programming, increased functionality, at the same price as its predecessor, the PICkit™ 3.

The MPLAB PICkit 4 now has Programmer-to-Go functionality for 8-bit, 16-bit and 32-bit PIC MCUs and dsPICs and also SAM MCU devices . The firmware update comes with MPLAB X IDE v5.30.


The MPLAB® PICkit™ 4 In-Circuit Debugger/Programmer allows fast and

...

Learn More
Add To Cart
MPLAB ICD 4 In-Circuit Debugger
MPLAB ICD 4 In-Circuit Debugger ( DV164045 )

The MPLAB® ICD 4 In-Circuit Debugger/Programmer is Microchip’s fastest, cost-effective debugging and programming tool for PIC® and SAM Microcontrollers (MCUs) and Microprocessors (MPUs), dsPIC® Digital Signal Controllers (DSCs), and CEC flash microcontrollers. This speed is provided by a SAME70 MCU with 300 MHz, 32-bit MCU with 2MB of RAM and a

...

Learn More
Add To Cart
MPLAB PM3 Universal Device Programmer
MPLAB PM3 Universal Device Programmer ( DV007004 )

The MPLAB® PM3 Universal Device Programmer is easy to use and operates with a PC or as a stand-alone unit, and programs Microchip's entire line of PIC® devices as well as the latest dsPIC® DSC devices. When used standalone, data can be loaded and saved with the SD/MMC card (not included).

  • Socket: AC164305   PartNo: PIC18F4221 (44PT)
  • Socket: AC164301   PartNo: PIC18F4221 (40P)
  • Socket: AC164301   PartNo: PIC18F4221 (44P)
  • Socket: AC164322   PartNo: PIC18F4221 (44ML)
Learn More
Add To Cart
Softlog SEC-DS Secure Programming Upgrade for ICP2 Programmers
Softlog SEC-DS Secure Programming Upgrade for ICP2 Programmers ( SW500090 )

The Softlog SEC-DS Secure Programming Upgrade is a "Secure Programming" extension for the ICP2 and ICP2(HC) programmers that provides several layers of protection--utilizing breakthrough technology--dramatically reducing the risk of unauthorized reconstruction of hex data and limiting how many times a hex file can be programmed. Secure programming operates on two levels: the ADMIN level and the...

Learn More
Add To Cart
Softlog SEC4CH-DS Secure Programming Upgrade for ICP2GANG Programmers
Softlog SEC4CH-DS Secure Programming Upgrade for ICP2GANG Programmers ( SW500091 )

The Softlog SEC4CH-DS Secure Programming Upgrade is a "Secure Programming" extension for the ICP2GANG programmer that provides several layers of protection--utilizing breakthrough technology--dramatically reducing the risk of unauthorized reconstruction of hex data and also limiting how many times a hex file can be programmed. Secure programming operates on two levels: the ADMIN level and the USER...

Learn More
Add To Cart
Softlog ICP2(G3) ICSP Production Programmer
Softlog ICP2(G3) ICSP Production Programmer ( TPG100001-G3 )

The ICP2(G3) Production Quality In-Circuit Programmer is a cost-effective programmer that operates with a PC or as a standalone unit. It programs 8-bit PIC® / AVR® MCUs and Serial EEPROMs & Flash ICs. ICP2(G3) hardware is designed to support popular programming interfaces (ICSP™, JTAG, SWD, UPDI, SPI, QSPI, etc.)

Learn More
Add To Cart
Softlog ICP2(G3)-DP ICSP Production Programmer
Softlog ICP2(G3)-DP ICSP Production Programmer ( TPG100002-G3 )

The ICP2(G3)-DP Production Quality In-Circuit Programmer is a cost-effective programmer that operates with a PC or as a standalone unit. It programs 8-bit PIC® & AVR® MCUs, 16-bit PIC MCUs & dsPIC® DSCs and Serial EEPROMs & Flash ICs. ICP2(G3)-DP hardware is designed to support popular programming interfaces (ICSP™, JTAG, SWD, UPDI, SPI, QSPI,

...

Learn More
Add To Cart
Softlog ICP2GANG(G3)-DP 4-Channel ICSP Production Gang Programmer
Softlog ICP2GANG(G3)-DP 4-Channel ICSP Production Gang Programmer ( TPG100004-G3 )

The ICP2GANG(G3)-DP Production Quality In-Circuit 4-channel (expandable to 64 channels) GANG programmer is a cost-effective programmer that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs, 16-bit PIC MCUs & dsPIC® DSCs, and serial EEPROMs & Flash ICs. ICP2GANG(G3)-DP hardware is designed to support popular programming

...

Learn More
Add To Cart
Softlog ICP2GANG(G3) 4-Channel ICSP Production Gang Programmer
Softlog ICP2GANG(G3) 4-Channel ICSP Production Gang Programmer ( TPG100005-G3 )

The ICP2GANG(G3) Production Quality In-Circuit 4-channel (expandable to 64 channels) GANG programmer is a cost-effective programmer that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs and serial EEPROMs & Flash ICs. ICP2GANG(G3) hardware is designed to support popular programming interfaces (ICSP™, JTAG, SWD, UPDI, SPI, QSPI,

...

Learn More
Add To Cart
Softlog ICP2GANG(G3)-DS ICSP Secure Production Gang Programmer
Softlog ICP2GANG(G3)-DS ICSP Secure Production Gang Programmer ( TPG100006-G3 )

The ICP2GANG(G3)-DS Production Quality ICSP Secure GANG Programmer is a 4-channel in-circuit programmer (expandable up to 64 channels) that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs and serial EEPROMs & Flash ICs. The secure programming feature dramatically reduces the risk of unauthorized

...

Learn More
Add To Cart
Softlog ICP2(G3)-DS ICSP Secure Production Programmer
Softlog ICP2(G3)-DS ICSP Secure Production Programmer ( TPG100007-G3 )

The ICP2(G3)-DS Production Quality Secure Programmer is an in-circuit programmer that operates with a PC or as a standalone unit, and programs 8-bit PIC® & AVR® MCUs and serial EEPROMs & Flash ICs. The secure programming feature dramatically reduces the risk of unauthorized reconstruction of hex files, and also limits how many times the hex file can be programmed. ICP2(G3)-DS

...

Learn More
Add To Cart
Softlog ICP2(HC) ICSP High-Current Production Programmer
Softlog ICP2(HC) ICSP High-Current Production Programmer ( TPG100008 )

The Softlog ICP2(HC) Production Quality In-Circuit High Current Programmer is a cost-effective programmer that operates with a PC or as a standalone unit.

Note: All technical support and warranty service will be provided by Softlog. You can contact them at support@softlog.com.

Learn More
Add To Cart
Softlog ICP2PORT(G3) Portable In-Circuit Production Programmer
Softlog ICP2PORT(G3) Portable In-Circuit Production Programmer ( TPG100009-G3 )

A member of the ICP(G3) family of high-speed, production-grade in-circuit programmers. This compact, battery-powered device supports up to six different programming environments, making it an ideal, low-cost solution for field upgrades. ICP2PORT(G3) programs Microchip 8-bit PIC® & AVR® MCUs and Serial EEPROMs & Flash ICs. ICP2PORT(G3) hardware is designed to support popular

...

Learn More
Add To Cart
Softlog ICP2PORT(G3)-P Portable In-Circuit Production Programmer
Softlog ICP2PORT(G3)-P Portable In-Circuit Production Programmer ( TPG100010-G3 )

A member of the ICP(G3) family of high-speed, production-grade in-circuit programmers. This compact, battery-powered device supports up to six different programming environments, making it an ideal, low-cost solution for field upgrades. ICP2PORT(G3)-P programs Microchip 8-bit PIC® & AVR® MCUs, 16-bit PIC MCUs & dsPIC® DSCs and Serial EEPROMs & Flash ICs. ICP2PORT(G3)-P

...

Learn More
Add To Cart
Softlog ICP2PORT(G3)-PX Portable In-Circuit Production Programmer
Softlog ICP2PORT(G3)-PX Portable In-Circuit Production Programmer ( TPG100011-G3 )

A member of the ICP(G3) family of high-speed, production-grade in-circuit programmers. This compact, battery-powered device supports up to six different programming environments, making it an ideal, low-cost solution for field

...

Learn More
Add To Cart
Softlog ICP2(G3)-DPX ICSP Production Programmer
Softlog ICP2(G3)-DPX ICSP Production Programmer ( TPG100012-G3 )

The ICP2(G3)-DPX Production Quality In-Circuit Programmer is a cost-effective programmer that operates with a PC or as a standalone unit. It programs 8-bit PIC® & AVR® MCUs, 16-bit PIC MCUs & dsPIC® DSCs, 32-bit PIC & ARM Cortex M0/0+/23/3/4/7 MCUs and Serial EEPROMs & Flash ICs. ICP2(G3)-DPX hardware is designed to support popular programming interfaces

...

Learn More
Add To Cart
Softlog ICP2GANG(G3)-DPX ICSP 4-Channel Gang Programmer
Softlog ICP2GANG(G3)-DPX ICSP 4-Channel Gang Programmer ( TPG100013-G3 )

The ICP2GANG(G3)-DPX Production Quality In-Circuit 4-channel (expandable to 64 channels) GANG programmer is a cost-effective programmer that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs, 16-bit PIC MCUs & dsPIC® DSCs, 32-bit PIC & ARM Cortex M0/0+/23/3/4/7 MCUs and Serial EEPROMs & Flash ICs. ICP2GANG(G3)-DPX

...

Learn More
Add To Cart
Softlog ICP2COMBO(G3)-DPX-8 8-Channel Gang Programmer
Softlog ICP2COMBO(G3)-DPX-8 8-Channel Gang Programmer ( TPG100015-G3 )

The ICP2COMBO(G3)-DPX-8 Production Quality In-Circuit (ICSP) 8-channel (expandable up to 64 channels) GANG Programmer is a cost-effective programmer that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs, 16-bit PIC MCUs & dsPIC® DSCs, 32-bit PIC & ARM Cortex M0/0+/23/3/4/7 MCUs and Serial EEPROMs & Flash

...

Learn More
Add To Cart
Softlog ICP2COMBO(G3)-12 12-Channel Gang Programmer
Softlog ICP2COMBO(G3)-12 12-Channel Gang Programmer ( TPG100016-G3 )

The ICP2COMBO(G3)-12 Production Quality In-Circuit (ICSP) 12-channel (expandable up to 60 channels) GANG Programmer is a cost-effective programmer that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs and serial EEPROMs & Flash ICs. ICP2COMBO(G3)-12 hardware is designed to support popular programming interfaces (ICSP™, JTAG,

...

Learn More
Add To Cart
Softlog ICP2COMBO(G3)-8 8-Channel Gang Programmer
Softlog ICP2COMBO(G3)-8 8-Channel Gang Programmer ( TPG100017-G3 )

The ICP2COMBO(G3)-8 Production Quality In-Circuit (ICSP) 8-channel (expandable up to 64 channels) GANG Programmer is a cost-effective programmer that operates with a PC or as a standalone unit and simultaneously programs 8-bit PIC® & AVR® MCUs and serial EEPROMs & Flash ICs. ICP2COMBO(G3)-8 hardware is designed to support popular programming interfaces (ICSP™, JTAG,

...

Learn More
Add To Cart
Demo & Evaluation Boards
Explorer 8 Development Kit
Explorer 8 Development Kit ( DM160228 )

Summary
The Explorer 8 Development Kit is a full-featured development board and platform for 8-bit PIC® microcontrollers. This kit is a versatile development solution, featuring several options for external sensors, off-board communication and human interface. Additionally, it offers ample room for expansion, making it an excellent solution for developers and engineers looking for a...

Learn More
Add To Cart

Similar Devices

Product
Pins
Flash (KB)
SRAM (B)
Price 5K
Notes
28
4
512
$2.06
 
28
8
512
$2.19
 
40
4
512
$2.28
 
40
8
512
$2.45
 

RoHS Information

Part Number
Device Weight (g)
Shipping Weight (Kg)
Lead Count
Package Type
Package Dimension
Solder Composition
JEDEC Indicator
RoHS
China EFUP
PIC18F4221-I/ML
0.188400
0.288889
44
QFN
8x8x0.9mm
Matte Tin
e3
PIC18LF4221-I/ML
0.188400
0.288889
44
QFN
8x8x0.9mm
Matte Tin
e3
PIC18F4221-E/PT
0.273300
1.187500
44
TQFP
10x10x1mm
Matte Tin
e3
PIC18F4221-I/PT
0.273300
1.187500
44
TQFP
10x10x1mm
Matte Tin
e3
PIC18F4221T-I/PT
0.273300
0.748333
44
TQFP
10x10x1mm
Matte Tin
e3
PIC18LF4221-I/PT
0.273300
1.187500
44
TQFP
10x10x1mm
Matte Tin
e3
PIC18F4221-I/P
6.500000
10.60000
40
PDIP
.600in
Matte Tin
e3
PIC18LF4221-I/P
6.500000
10.60000
40
PDIP
.600in
Matte Tin
e3
PIC18F4221-E/P
6.500000
10.60000
40
PDIP
.600in
Matte Tin
e3
PIC18F4221-I/PREL
6.500000
10.60000
40
PDIP
.600in
Matte Tin
e3
To see a complete listing of RoHS data for this device, please Click here
Shipping Weight = Device Weight + Packing Material weight. Please contact sales office if device weight is not available.

Buy from Microchip

Grid
View
Table
View
Filter:
Apply
Clear
Only show products with samples
Product
Leads
Package Type
Temp Range
Packing Media
5K Pricing
Buy