PIC18F2221-E/SP Microchip Technology, PIC18F2221-E/SP Datasheet - Page 390

no-image

PIC18F2221-E/SP

Manufacturer Part Number
PIC18F2221-E/SP
Description
4KB, Flash, 512bytes-RAM, 25I/O, 8-bit Family,nanoWatt 28 SPDIP .300in TUBE
Manufacturer
Microchip Technology
Series
PIC® 18Fr

Specifications of PIC18F2221-E/SP

Core Processor
PIC
Core Size
8-Bit
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
25
Program Memory Size
4KB (2K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 10x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
28-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
DVA18XP280 - DEVICE ADAPTER 18F2220 PDIP 28LD
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PIC18F2221/2321/4221/4321 FAMILY
C
C Compilers
CALL ................................................................................ 294
CALLW ............................................................................. 323
Capture (CCP Module) ..................................................... 147
Capture (ECCP Module) .................................................. 154
Capture/Compare/PWM (CCP) ........................................ 145
Clock Sources .................................................................... 35
CLRF ................................................................................ 295
CLRWDT .......................................................................... 295
Code Examples
Code Protection ....................................................... 259, 274
COMF ............................................................................... 296
Comparator ...................................................................... 243
DS39689F-page 390
MPLAB C18 ............................................................. 330
MPLAB C30 ............................................................. 330
Associated Registers ............................................... 149
CCP Pin Configuration ............................................. 147
CCPRxH:CCPRxL Registers ................................... 147
Prescaler .................................................................. 147
Software Interrupt .................................................... 147
Timer1/Timer3 Mode Selection ................................ 147
Capture Mode. See Capture.
CCPRxH Register .................................................... 146
CCPRxL Register ..................................................... 146
Compare Mode. See Compare.
Interaction of Two CCP Modules ............................. 146
Module Configuration ............................................... 146
Pin Assignment ........................................................ 146
Timer Resources ...................................................... 146
Selecting the 31 kHz Source ...................................... 36
Selection Using OSCCON Register ........................... 36
16 x 16 Signed Multiply Routine ................................ 96
16 x 16 Unsigned Multiply Routine ............................ 96
8 x 8 Signed Multiply Routine .................................... 95
8 x 8 Unsigned Multiply Routine ................................ 95
Address Masking ..................................................... 182
Changing Between Capture Prescalers ................... 147
Computed GOTO Using an Offset Value ................... 62
Data EEPROM Read ................................................. 91
Data EEPROM Refresh Routine ................................ 92
Data EEPROM Write ................................................. 91
Erasing a Flash Program Memory Row ..................... 84
Fast Register Stack .................................................... 62
How to Clear RAM (Bank 1) Using Indirect
Implementing a Real-Time Clock Using a
Initializing PORTA .................................................... 111
Initializing PORTB .................................................... 114
Initializing PORTC .................................................... 117
Initializing PORTD .................................................... 120
Initializing PORTE .................................................... 123
Loading the SSPBUF (SSPSR) Register ................. 170
Reading a Flash Program Memory Word .................. 83
Saving STATUS, WREG and BSR
Writing to Flash Program Memory ....................... 86–87
Associated Registers ............................................... 275
Configuration Register Protection ............................ 277
Data EEPROM ......................................................... 277
Program Memory ..................................................... 275
Analog Input Connection Considerations ................. 247
Associated Registers ............................................... 247
Configuration ............................................................ 244
Addressing ......................................................... 73
Timer1 Interrupt Service .................................. 137
Registers in RAM ............................................. 109
Comparator Specifications ............................................... 350
Comparator Voltage Reference ....................................... 249
Compare (CCP Module) .................................................. 148
Compare (ECCP Module) ................................................ 154
Computed GOTO ............................................................... 62
Configuration Bits ............................................................ 259
Context Saving During Interrupts ..................................... 109
Conversion Considerations .............................................. 387
CPFSEQ .......................................................................... 296
CPFSGT .......................................................................... 297
CPFSLT ........................................................................... 297
Crystal Oscillator/Ceramic Resonator ................................ 29
Customer Change Notification Service ............................ 399
Customer Notification Service ......................................... 399
Customer Support ............................................................ 399
D
Data Addressing Modes .................................................... 73
Data EEPROM Memory ..................................................... 89
Data Memory ..................................................................... 65
Effects of a Reset .................................................... 246
Interrupts ................................................................. 246
Operation ................................................................. 245
Operation During Sleep ........................................... 246
Outputs .................................................................... 245
Reference ................................................................ 245
Response Time ........................................................ 245
Accuracy and Error .................................................. 250
Associated Registers ............................................... 251
Configuring .............................................................. 249
Connection Considerations ...................................... 250
Effects of a Reset .................................................... 250
Operation During Sleep ........................................... 250
CCPRx Register ...................................................... 148
Pin Configuration ..................................................... 148
Software Interrupt .................................................... 148
Special Event Trigger .............................. 143, 148, 242
Timer1/Timer3 Mode Selection ................................ 148
Special Event Trigger .............................................. 154
Comparing Options with the Extended
Direct ......................................................................... 73
Indexed Literal Offset ................................................ 75
Indirect ....................................................................... 73
Inherent and Literal .................................................... 73
Associated Registers ................................................. 93
EEADR Register ........................................................ 89
EECON1 Register ...................................................... 89
EECON2 Register ...................................................... 89
EEDATA Register ...................................................... 89
Operation During Code-Protect ................................. 92
Protection Against Spurious Write ............................. 92
Reading ..................................................................... 91
Using ......................................................................... 92
Write Verify ................................................................ 91
Writing ....................................................................... 91
Access Bank .............................................................. 67
and the Extended Instruction Set .............................. 75
Bank Select Register (BSR) ...................................... 65
General Purpose Registers ....................................... 67
Map for PIC18F2221/2321/4221/4321 Family ........... 66
Special Function Registers ........................................ 68
External Signal ................................................ 245
Internal Signal .................................................. 245
Instruction Set Enabled ..................................... 76
Instructions Affected .......................................... 75
© 2009 Microchip Technology Inc.

Related parts for PIC18F2221-E/SP