English
Language : 

PIC18F2221_1 Datasheet, PDF (395/402 Pages) Microchip Technology – Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
PIC18F2221/2321/4221/4321 FAMILY
Example Frequencies/Resolutions .......................... 151
Operation Setup ....................................................... 151
Period ....................................................................... 150
TMR2 to PR2 Match ........................................ 150, 155
PWM (ECCP Module) ...................................................... 155
CCPR1H:CCPR1L Registers ................................... 155
Duty Cycle ................................................................ 156
Effects of a Reset ..................................................... 165
Enhanced PWM Auto-Shutdown ............................. 162
Example Frequencies/Resolutions .......................... 156
Full-Bridge Application Example .............................. 160
Full-Bridge Mode ...................................................... 159
Direction Change ............................................. 160
Half-Bridge Mode ..................................................... 158
Half-Bridge Output Mode Applications
Example ........................................................... 158
Operation in Power-Managed Modes ...................... 165
Operation with Fail-Safe Clock Monitor ................... 165
Output Configurations .............................................. 156
Output Relationships (Active-High) .......................... 157
Output Relationships (Active-Low) ........................... 157
Period ....................................................................... 155
Programmable Dead-Band Delay ............................ 162
Setup for PWM Operation ........................................ 165
Start-up Considerations ........................................... 164
Q
Q Clock .................................................................... 151, 156
R
RAM. See Data Memory.
RC Oscillator
RCIO Oscillator Mode ................................................ 31
RC_IDLE Mode .................................................................. 45
RC_RUN Mode .................................................................. 41
RCALL ............................................................................. 309
RCON Register
Bit Status During Initialization .................................... 54
Reader Response ............................................................ 400
Register File ....................................................................... 67
Register File Summary ................................................ 69–71
Registers
ADCON0 (A/D Control 0) ......................................... 233
ADCON1 (A/D Control 1) ......................................... 234
ADCON2 (A/D Control 2) ......................................... 235
BAUDCON (Baud Rate Control) .............................. 214
CCP1CON (Enhanced Capture/Compare/PWM
Control 1) ......................................................... 153
CCPxCON (CCPx Control) ...................................... 145
CMCON (Comparator Control) ................................ 243
CONFIG1H (Configuration 1 High) .......................... 260
CONFIG2H (Configuration 2 High) .......................... 262
CONFIG2L (Configuration 2 Low) ............................ 261
CONFIG3H (Configuration 3 High) .......................... 263
CONFIG4L (Configuration 4 Low) ............................ 264
CONFIG5H (Configuration 5 High) .......................... 265
CONFIG5L (Configuration 5 Low) ............................ 265
CONFIG6H (Configuration 6 High) .......................... 266
CONFIG6L (Configuration 6 Low) ............................ 266
CONFIG7H (Configuration 7 High) .......................... 267
CONFIG7L (Configuration 7 Low) ............................ 267
CVRCON (Comparator Voltage
Reference Control) .......................................... 249
DEVID1 (Device ID 1) .............................................. 268
DEVID2 (Device ID 2) .............................................. 268
ECCP1AS (ECCP Auto-Shutdown Control) ............. 163
© 2009 Microchip Technology Inc.
ECCP1DEL (PWM Dead-Band Delay) .................... 162
EECON1 (Data EEPROM Control 1) ................... 81, 90
HLVDCON (High/Low-Voltage Detect Control) ....... 253
INTCON (Interrupt Control) ....................................... 99
INTCON2 (Interrupt Control 2) ................................ 100
INTCON3 (Interrupt Control 3) ................................ 101
IPR1 (Peripheral Interrupt Priority 1) ....................... 106
IPR2 (Peripheral Interrupt Priority 2) ....................... 107
OSCCON (Oscillator Control) .................................... 37
OSCTUNE (Oscillator Tuning) ................................... 33
PIE1 (Peripheral Interrupt Enable 1) ....................... 104
PIE2 (Peripheral Interrupt Enable 2) ....................... 105
PIR1 (Peripheral Interrupt Request (Flag) 1) ........... 102
PIR2 (Peripheral Interrupt Request (Flag) 2) ........... 103
RCON (Reset Control) ....................................... 48, 108
RCSTA (Receive Status and Control) ..................... 213
SSPADD(MSSP Address) ....................................... 180
SSPCON1 (MSSP Control 1, I2C Mode) ................. 178
SSPCON1 (MSSP Control 1, SPI Mode) ................ 169
SSPCON2 (MSSP Control 2, I2C Mode) ................. 179
SSPSTAT (MSSP Status, I2C Mode) ...................... 177
SSPSTAT (MSSP Status, SPI Mode) ...................... 168
STATUS .................................................................... 72
STKPTR (Stack Pointer) ............................................ 61
T0CON (Timer0 Control) ......................................... 129
T1CON (Timer1 Control) ......................................... 133
T2CON (Timer2 Control) ......................................... 139
T3CON (Timer3 Control) ......................................... 141
TRISE (PORTE/PSP Control) ................................. 124
TXSTA (Transmit Status and Control) ..................... 212
WDTCON (Watchdog Timer Control) ...................... 270
RESET ............................................................................. 309
Reset State of Registers .................................................... 54
Resets ....................................................................... 47, 259
Brown-out Reset (BOR) ........................................... 259
Oscillator Start-up Timer (OST) ............................... 259
Power-on Reset (POR) ............................................ 259
Power-up Timer (PWRT) ......................................... 259
RETFIE ............................................................................ 310
RETLW ............................................................................ 310
RETURN .......................................................................... 311
Return Address Stack ........................................................ 60
Associated Registers ................................................. 60
Return Stack Pointer (STKPTR) ........................................ 61
Revision History ............................................................... 385
RLCF ............................................................................... 311
RLNCF ............................................................................. 312
RRCF ............................................................................... 312
RRNCF ............................................................................ 313
S
SCK ................................................................................. 167
SDI ................................................................................... 167
SDO ................................................................................. 167
SEC_IDLE Mode ............................................................... 44
SEC_RUN Mode ................................................................ 40
Serial Clock, SCK ............................................................ 167
Serial Data In (SDI) .......................................................... 167
Serial Data Out (SDO) ..................................................... 167
Serial Peripheral Interface. See SPI Mode.
SETF ............................................................................... 313
Single-Supply ICSP Programming.
Slave Select (SS) ............................................................. 167
SLEEP ............................................................................. 314
Sleep
OSC1 and OSC2 Pin States ...................................... 38
DS39689F-page 395