English
Language : 

PIC18F2221_1 Datasheet, PDF (7/402 Pages) Microchip Technology – Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
PIC18F2221/2321/4221/4321 FAMILY
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 9
2.0 Guidelines for Getting Started with PIC18F Microcontrollers ..................................................................................................... 25
3.0 Oscillator Configurations ............................................................................................................................................................ 29
4.0 Power-Managed Modes ............................................................................................................................................................. 39
5.0 Reset .......................................................................................................................................................................................... 47
6.0 Memory Organization ................................................................................................................................................................. 59
7.0 Flash Program Memory.............................................................................................................................................................. 79
8.0 Data EEPROM Memory ............................................................................................................................................................. 89
9.0 8 x 8 Hardware Multiplier............................................................................................................................................................ 95
10.0 Interrupts .................................................................................................................................................................................... 97
11.0 I/O Ports ................................................................................................................................................................................... 111
12.0 Timer0 Module ......................................................................................................................................................................... 129
13.0 Timer1 Module ......................................................................................................................................................................... 133
14.0 Timer2 Module ......................................................................................................................................................................... 139
15.0 Timer3 Module ......................................................................................................................................................................... 141
16.0 Capture/Compare/PWM (CCP) Modules ................................................................................................................................. 145
17.0 Enhanced Capture/Compare/PWM (ECCP) Module................................................................................................................ 153
18.0 Master Synchronous Serial Port (MSSP) Module .................................................................................................................... 167
19.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) ............................................................... 211
20.0 10-Bit Analog-to-Digital Converter (A/D) Module ..................................................................................................................... 233
21.0 Comparator Module.................................................................................................................................................................. 243
22.0 Comparator Voltage Reference Module................................................................................................................................... 249
23.0 High/Low-Voltage Detect (HLVD)............................................................................................................................................. 253
24.0 Special Features of the CPU.................................................................................................................................................... 259
25.0 Instruction Set Summary .......................................................................................................................................................... 279
26.0 Development Support............................................................................................................................................................... 329
27.0 Electrical Characteristics .......................................................................................................................................................... 333
28.0 Packaging Information.............................................................................................................................................................. 373
Appendix A: Revision History............................................................................................................................................................. 385
Appendix B: Device Differences ........................................................................................................................................................ 386
Appendix C: Conversion Considerations ........................................................................................................................................... 387
Appendix D: Migration from Baseline to Enhanced Devices.............................................................................................................. 387
Appendix E: Migration From Mid-Range to Enhanced Devices ......................................................................................................... 388
Appendix F: Migration From High-End to Enhanced Devices............................................................................................................ 388
Index ................................................................................................................................................................................................. 389
The Microchip Web Site ..................................................................................................................................................................... 399
Customer Change Notification Service .............................................................................................................................................. 399
Customer Support .............................................................................................................................................................................. 399
Reader Response .............................................................................................................................................................................. 400
PIC18F2221/2321/4221/4321 Product Identification System ............................................................................................................ 401
© 2009 Microchip Technology Inc.
DS39689F-page 7