Datasheet
PIC18F87K90 FAMILY
DS39957D-page 556 2009-2011 Microchip Technology Inc.
Brown-out Reset (BOR) ......................................................71
Detecting..................................................................... 71
BSF ................................................................................... 463
BTFSC .............................................................................. 464
BTFSS............................................................................... 464
BTG................................................................................... 465
BZ...................................................................................... 466
C
C Compilers
MPLAB C18 .............................................................. 502
CALL ................................................................................. 466
CALLW..............................................................................495
Capture (CCP Module)...................................................... 242
Associated Registers ................................................246
CCP Pin Configuration.............................................. 242
CCPR4H:CCPR4L Registers.................................... 242
Prescaler...................................................................243
Software Interrupt ..................................................... 243
Timer1/3/5/7 Mode Selection .................................... 242
Capture (ECCP Module) ................................................... 255
CCPRxH:CCPRxL Registers .................................... 255
ECCP Pin Configuration ........................................... 255
Prescaler...................................................................255
Software Interrupt ..................................................... 255
Timer1/Timer3 Mode Selection ................................. 255
Capture/Compare/PWM (CCP)......................................... 237
Capture Mode.
See Capture.
CCP6/7/8/9 Pin Assignment ..................................... 242
CCPRxH Register ..................................................... 241
CCPRxL Register......................................................241
Compare Mode.
See Compare.
Configuration.............................................................241
Mode and Timer Resources...................................... 241
Open-Drain Output Option ........................................ 242
Charge Time Measurement Unit (CTMU) ......................... 407
Associated Registers ................................................423
Calibrating the Module .............................................. 412
Creating a Delay ....................................................... 421
Effects of a Reset......................................................423
Measuring Capacitance with the CTMU ................... 418
Measuring Temperature with Use............................. 422
Measuring Time ........................................................ 420
Module Initialization .................................................. 412
Operation ..................................................................411
During Sleep and Idle Modes............................ 423
Clock Sources
Default System Clock on Reset .................................. 46
Selection Using OSCCON Register ............................46
CLRF................................................................................. 467
CLRWDT........................................................................... 467
Code Examples
16 x 16 Signed Multiply Routine ............................... 128
16 x 16 Unsigned Multiply Routine ........................... 128
8 x 8 Signed Multiply Routine ................................... 127
8 x 8 Unsigned Multiply Routine ............................... 127
Capacitance Calibration Routine .............................. 417
Changing Between Capture Prescalers ............ 243, 255
Computed GOTO Using an Offset Value.................... 89
Current Calibration Routine ...................................... 415
Data EEPROM Read ................................................123
Data EEPROM Refresh Routine............................... 124
Data EEPROM Write ................................................ 123
Erasing a Flash Program Memory Row .................... 116
Fast Register Stack.....................................................89
How to Clear RAM (Bank 1) Using Indirect
Addressing........................................................ 104
Initializing PORTA..................................................... 157
Initializing PORTB..................................................... 160
Initializing PORTC .................................................... 163
Initializing PORTD .................................................... 166
Initializing PORTE..................................................... 169
Initializing PORTF..................................................... 172
Initializing PORTG .................................................... 175
Initializing PORTH .................................................... 177
Initializing PORTJ ..................................................... 180
Loading the SSP1BUF (SSP1SR) Register.............. 306
Reading a Flash Program Memory Word ................. 115
Routine for Capacitive Touch Switch........................ 419
Routine for Temperature Measurement Using
Internal Diode ................................................... 422
Saving STATUS, WREG and BSR
Registers in RAM.............................................. 151
Setting the RTCWREN Bit........................................ 231
Setup for CTMU Calibration Routines ...................... 414
Ultra Low-Power Wake-up Initialization ...................... 66
Writing to Flash Program Memory.................... 118–119
Code Protection ........................................................ 425, 447
Associated Registers................................................ 448
Data EEPROM.......................................................... 450
Program Memory...................................................... 448
COMF ............................................................................... 468
Comparator....................................................................... 389
Analog Input Connection Considerations ................. 392
Associated Registers................................................ 396
Control and Configuration......................................... 393
Effects of a Reset ..................................................... 396
Enable and Input Selection....................................... 393
Enable and Output Selection.................................... 393
Interrupts .................................................................. 395
Operation.................................................................. 392
Operation During Sleep ............................................ 396
Response Time......................................................... 392
Comparator Voltage Reference ........................................ 397
Accuracy and Error................................................... 398
Associated Registers................................................ 399
Configuring ............................................................... 397
Connection Considerations....................................... 398
Effects of a Reset ..................................................... 398
Operation During Sleep ............................................ 398
Compare (CCP Module) ................................................... 244
Associated Registers................................................ 246
CCPR4 Register ....................................................... 244
Pin Configuration ...................................................... 244
Software Interrupt ..................................................... 244
Special Event Trigger ............................................... 244
Timer1/3/5/7 Mode Selection.................................... 244
Compare (ECCP Module)................................................. 256
CCPRx Register ....................................................... 256
Pin Configuration ...................................................... 256
Software Interrupt ..................................................... 256
Special Event Trigger ....................................... 210, 256
Timer1/Timer3 Mode Selection................................. 256
Computed GOTO................................................................ 89
Configuration Bits ............................................................. 425
Configuration Mismatch (CM) Reset................................... 72
Configuration Register Protection..................................... 450