
PIC18F85J11 FAMILY
DS39774C-page 382
Preliminary
2007 Microchip Technology Inc.
PORTD and PORTE (Parallel Slave Port) ...............144
PWM Operation (Simplified) ....................................169
Reads From Flash Program Memory .........................87
Single Comparator ...................................................263
Table Read Operation ................................................83
Table Write Operation ................................................84
Table Writes to Flash Program Memory ....................89
Timer0 in 16-Bit Mode ..............................................148
Timer0 in 8-Bit Mode ................................................148
Timer1 (16-Bit Read/Write Mode) ............................152
Timer1 (8-Bit Mode) .................................................152
Timer2 ......................................................................158
Timer3 (16-Bit Read/Write Mode) ............................160
Timer3 (8-Bit Mode) .................................................160
Watchdog Timer .......................................................278
BN ....................................................................................294
BNC ..................................................................................295
BNN ..................................................................................295
BNOV ...............................................................................296
BNZ ..................................................................................296
BOR. See Brown-out Reset.
BOV ..................................................................................299
BRA ..................................................................................297
BRG. See Baud Rate Generator.
BRGH Bit
TXSTA1 Register .....................................................221
TXSTA2 Register .....................................................240
Brown-out Reset (BOR) .....................................................47
and On-Chip Voltage Regulator ...............................280
Detecting ....................................................................47
BSF ..................................................................................297
BTFSC .............................................................................298
BTFSS ..............................................................................298
BTG ..................................................................................299
BZ .....................................................................................300
C
C Compilers
MPLAB C18 .............................................................336
MPLAB C30 .............................................................336
CALL ................................................................................300
CALLW .............................................................................329
Capture (CCP Module) .....................................................166
Associated Registers ...............................................168
CCPR2H:CCPR2L Registers ...................................166
CCPx Pin Configuration ...........................................166
Software Interrupt ....................................................166
Timer1/Timer3 Mode Selection ................................166
Capture/Compare/PWM (CCP) ........................................163
Capture Mode. See Capture.
CCPRxH Register ....................................................164
CCPRxL Register .....................................................164
CCPx Mode and Timer Resources ..........................164
Compare Mode. See Compare.
Configuration ............................................................164
Interaction of CCP1 and CCP2 for
Timer Resources ..............................................165
Interconnect Configurations .....................................164
Clock Sources ....................................................................31
Default System Clock on Reset .................................32
Selection Using OSCCON Register ...........................32
CLRF ................................................................................301
CLRWDT ..........................................................................301
Code Examples
16 x 16 Signed Multiply Routine .............................. 106
16 x 16 Unsigned Multiply Routine .......................... 106
8 x 8 Signed Multiply Routine .................................. 105
8 x 8 Unsigned Multiply Routine .............................. 105
Changing Between Capture Prescalers ................... 166
Computed GOTO Using an Offset Value ................... 63
Erasing a Flash Program Memory Row ..................... 88
Fast Register Stack ................................................... 63
How to Clear RAM (Bank 1) Using
Indirect Addressing ............................................ 76
Implementing a Real-Time Clock Using
a Timer1 Interrupt Service ............................... 155
Initializing PORTA .................................................... 124
Initializing PORTB .................................................... 126
Initializing PORTC ................................................... 128
Initializing PORTD ................................................... 131
Initializing PORTE .................................................... 134
Initializing PORTF .................................................... 137
Initializing PORTG ................................................... 139
Initializing PORTH ................................................... 141
Initializing PORTJ .................................................... 142
Loading the SSPBUF (SSPSR) Register ................. 176
Reading a Flash Program Memory Word .................. 87
Saving STATUS, WREG and BSR
Registers in RAM ............................................. 122
Writing to Flash Program Memory ............................. 90
Code Protection ............................................................... 271
COMF .............................................................................. 302
Comparator ...................................................................... 261
Analog Input Connection Considerations ................ 265
Associated Registers ............................................... 265
Configuration ........................................................... 262
Effects of a Reset .................................................... 264
Interrupts ................................................................. 264
Operation ................................................................. 263
Operation During Sleep ........................................... 264
Outputs .................................................................... 263
Reference ................................................................ 263
External Signal ................................................ 263
Internal Signal .................................................. 263
Response Time ........................................................ 263
Comparator Specifications ............................................... 353
Comparator Voltage Reference ....................................... 267
Accuracy and Error .................................................. 268
Associated Registers ............................................... 269
Configuring .............................................................. 267
Connection Considerations ...................................... 268
Effects of a Reset .................................................... 268
Operation During Sleep ........................................... 268
Compare (CCP Module) .................................................. 167
Associated Registers ............................................... 168
CCPR2 Register ...................................................... 167
CCPx Pin Configuration ........................................... 167
Software Interrupt .................................................... 167
Special Event Trigger ...................................... 161, 167
Timer1/Timer3 Mode Selection ................................ 167
Compare (CCP2 Module)
Special Event Trigger .............................................. 258
Computed GOTO ............................................................... 63
Configuration Bits ............................................................ 271
Configuration Bits, Device IDs
Associated Registers ............................................... 272