2007 Microchip Technology Inc. DS39599G
28/40/44-Pin High-Performance,Enhanced Flash Microcontrollers
with 10-Bit A/D and nanoWatt Technology
DS39599G-page ii 2007 Microchip Technology Inc.
Information contained in this publication regarding deviceapplications and the like is provided only for your convenienceand may be superseded by updates. It is your responsibility toensure that your application meets with your specifications.MICROCHIP MAKES NO REPRESENTATIONS ORWARRANTIES OF ANY KIND WHETHER EXPRESS ORIMPLIED, WRITTEN OR ORAL, STATUTORY OROTHERWISE, RELATED TO THE INFORMATION,INCLUDING BUT NOT LIMITED TO ITS CONDITION,QUALITY, PERFORMANCE, MERCHANTABILITY ORFITNESS FOR PURPOSE. Microchip disclaims all liabilityarising from this information and its use. Use of Microchipdevices in life support and/or safety applications is entirely atthe buyers risk, and the buyer agrees to defend, indemnify andhold harmless Microchip from any and all damages, claims,suits, or expenses resulting from such use. No licenses areconveyed, implicitly or otherwise, under any Microchipintellectual property rights.
The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, KEELOQ logo, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, rfPIC and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
AmpLab, FilterLab, Linear Active Thermistor, Migratable Memory, MXDEV, MXLAB, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their respective companies.
2007, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchips Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of ourproducts. Attempts to break Microchips code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Companys quality system processes and procedures are for its PIC MCUs and dsPIC DSCs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchips quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
2007 Microchip Technology Inc. DS39599G-page 1
Low-Power Features: Power-Managed modes:
- Run: CPU on, peripherals on- Idle: CPU off, peripherals on- Sleep: CPU off, peripherals off
Power Consumption modes:- PRI_RUN: 150 A, 1 MHz, 2V- PRI_IDLE: 37 A, 1 MHz, 2V- SEC_RUN: 14 A, 32 kHz, 2V- SEC_IDLE: 5.8 A, 32 kHz, 2V- RC_RUN: 110 A, 1 MHz, 2V- RC_IDLE: 52 A, 1 MHz, 2V- Sleep: 0.1 A, 1 MHz, 2V
Timer1 Oscillator: 1.1 A, 32 kHz, 2V Watchdog Timer: 2.1 A Two-Speed Oscillator Start-up
Oscillators: Four Crystal modes:
- LP, XT, HS: up to 25 MHz- HSPLL: 4-10 MHz (16-40 MHz internal)
Two External RC modes, Up to 4 MHz Two External Clock modes, Up to 40 MHz Internal Oscillator Block:
- 8 user-selectable frequencies: 31 kHz, 125 kHz, 250 kHz, 500 kHz, 1 MHz, 2 MHz, 4 MHz, 8 MHz
- 125 kHz-8 MHz calibrated to 1%- Two modes select one or two I/O pins- OSCTUNE Allows user to shift frequency
Secondary Oscillator using Timer1 @ 32 kHz Fail-Safe Clock Monitor
- Allows for safe shutdown if peripheral clock stops
Peripheral Highlights: High-Current Sink/Source 25 mA/25 mA Three External Interrupts Up to 2 Capture/Compare/PWM (CCP) modules:
- Capture is 16-bit, max. resolution is 6.25 ns (TCY/16)- Compare is 16-bit, max. resolution is 100 ns (TCY)- PWM output: PWM resolution is 1 to 10-bit
Enhanced Capture/Compare/PWM (ECCP) module:- One, two or four PWM outputs- Selectable polarity- Programmable dead time- Auto-Shutdown and Auto-Restart
Compatible 10-Bit, Up to 13-Channel Analog-to-Digital Converter (A/D) module with Programmable Acquisition Time
Dual Analog Comparators Addressable USART module:
- RS-232 operation using internal oscillator block (no external crystal required)
Special Microcontroller Features: 100,000 Erase/Write Cycle Enhanced Flash Program
Memory Typical 1,000,000 Erase/Write Cycle Data EEPROM
Memory Typical Flash/Data EEPROM Retention: > 40 Years Self-Programmable under Software Control Priority Levels for Interrupts 8 x 8 Single-Cycle Hardware Multiplier Extended Watchdog Timer (WDT):
- Programmable period from 41 ms to 131s- 2% stability over VDD and Temperature
Single-Supply 5V In-Circuit Serial Programming (ICSP) via Two Pins
In-Circuit Debug (ICD) via Two Pins Wide Operating Voltage Range: 2.0V to 5.5V
Program Memory Data Memory
I/O 10-BitA/D (ch)
(bytes)# Single WordInstructions
PIC18F2220 4096 2048 512 256 25 10 2/0 Y Y Y 2 2/3PIC18F2320 8192 4096 512 256 25 10 2/0 Y Y Y 2 2/3PIC18F4220 4096 2048 512 256 36 13 1/1 Y Y Y 2 2/3PIC18F4320 8192 4096 512 256 36 13 1/1 Y Y Y 2 2/3
28/40/44-Pin High-Performance, Enhanced Flash MCUswith 10-Bit A/D and nanoWatt Technology
DS39599G-page 2 2007 Microchip Technology Inc.
28-Pin SPDIP, SOIC
Note: Pin compatible with 40-pin PIC16C7X devices.
* RB3 is the alternate pin for the CCP2 pin multiplexing.
2007 Microchip Technology Inc. DS39599G-page 3
PIC18F2220/2320/4220/4320Pin Diagrams (Cont.d)
18 19 20 21 2212 13 14 15
44 43 42 41 40 3916 17