PIC18F2221/2321/4221/4321 FAMILY
DS39689F-page 392 © 2009 Microchip Technology Inc.
High/Low-Voltage Detect ................................................. 253
Applications .............................................................. 256
Associated Registers ............................................... 257
Characteristics ......................................................... 351
Current Consumption ...............................................255
Effects of a Reset ..................................................... 257
Operation .................................................................254
During Sleep .................................................... 257
Setup ........................................................................ 255
Start-up Time ........................................................... 255
Typical Application ................................................... 256
HLVD. See High/Low-Voltage Detect. ............................. 253
I
I/O Ports ........................................................................... 111
I2C Mode (MSSP)
Acknowledge Sequence Timing ............................... 204
Associated Registers ............................................... 210
Baud Rate Generator ...............................................197
Bus Collision
During a Repeated Start Condition .................. 208
During a Start Condition ................................... 206
During a Stop Condition ................................... 209
Clock Arbitration .......................................................198
Clock Stretching .......................................................190
10-Bit Slave Receive Mode (SEN = 1) ............. 190
10-Bit Slave Transmit Mode ............................. 190
7-Bit Slave Receive Mode (SEN = 1) ............... 190
7-Bit Slave Transmit Mode ............................... 190
Clock Synchronization and the CKP Bit ................... 191
Effects of a Reset ..................................................... 205
General Call Address Support ................................. 194
I2C Clock Rate w/BRG ............................................. 197
Master Mode ............................................................ 195
Operation ......................................................... 196
Reception ......................................................... 201
Repeated Start Condition Timing ..................... 200
Start Condition Timing ..................................... 199
Transmission .................................................... 201
Multi-Master Communication, Bus Collision
and Arbitration .................................................. 205
Multi-Master Mode ...................................................205
Operation .................................................................181
Read/Write Bit Information (R/W Bit) ....................... 181
Read/Write Bit Information (R/W Bit) ....................... 183
Registers .................................................................. 176
Serial Clock (RC3/SCK/SCL) ................................... 183
Slave Mode ..............................................................181
Address Masking ............................................. 182
Addressing ....................................................... 181
Reception ......................................................... 183
Transmission .................................................... 183
Sleep Operation ....................................................... 205
Stop Condition Timing ..............................................204
ID Locations ............................................................. 259, 277
INCF .................................................................................300
INCFSZ ............................................................................ 301
In-Circuit Debugger .......................................................... 277
In-Circuit Serial Programming (ICSP) ...................... 259, 277
Single-Supply ........................................................... 277
Indexed Literal Offset Addressing
and Standard PIC18 Instructions ............................. 326
Indexed Literal Offset Mode ............................................. 326
Indirect Addressing ............................................................ 74
INFSNZ ............................................................................301
Initialization Conditions for all Registers ...................... 55–58
Instruction Cycle ................................................................ 63
Clocking Scheme ....................................................... 63
Instruction Flow/Pipelining ................................................. 63
Instruction Set .................................................................. 279
ADDLW .................................................................... 285
ADDWF .................................................................... 285
ADDWF (Indexed Literal Offset Mode) .................... 327
ADDWFC ................................................................. 286
ANDLW .................................................................... 286
ANDWF .................................................................... 287
BC ............................................................................ 287
BCF ......................................................................... 288
BN ............................................................................ 288
BNC ......................................................................... 289
BNN ......................................................................... 289
BNOV ...................................................................... 290
BNZ ......................................................................... 290
BOV ......................................................................... 293
BRA ......................................................................... 291
BSF .......................................................................... 291
BSF (Indexed Literal Offset Mode) .......................... 327
BTFSC ..................................................................... 292
BTFSS ..................................................................... 292
BTG ......................................................................... 293
BZ ............................................................................ 294
CALL ........................................................................ 294
CLRF ....................................................................... 295
CLRWDT ................................................................. 295
COMF ...................................................................... 296
CPFSEQ .................................................................. 296
CPFSGT .................................................................. 297
CPFSLT ................................................................... 297
DAW ........................................................................ 298
DCFSNZ .................................................................. 299
DECF ....................................................................... 298
DECFSZ .................................................................. 299
Extended Instruction Set ......................................... 321
General Format ........................................................ 281
GOTO ...................................................................... 300
INCF ........................................................................ 300
INCFSZ .................................................................... 301
INFSNZ .................................................................... 301
IORLW ..................................................................... 302
IORWF ..................................................................... 302
LFSR ....................................................................... 303
MOVF ...................................................................... 303
MOVFF .................................................................... 304
MOVLB .................................................................... 304
MOVLW ................................................................... 305
MOVWF ................................................................... 305
MULLW .................................................................... 306
MULWF .................................................................... 306
NEGF ....................................................................... 307
NOP ......................................................................... 307
Opcode Field Descriptions ....................................... 280
POP ......................................................................... 308
PUSH ....................................................................... 308
RCALL ..................................................................... 309
RESET ..................................................................... 309
RETFIE .................................................................... 310
RETLW .................................................................... 310
RETURN .................................................................. 311
RLCF ....................................................................... 311
RLNCF ..................................................................... 312
RRCF ....................................................................... 312