Datasheet

PIC18F66K80 FAMILY
DS39977F-page 380 2010-2012 Microchip Technology Inc.
24.7 Comparator Operation
During Sleep
When a comparator is active and the device is placed
in Sleep mode, the comparator remains active and the
interrupt is functional, if enabled. This interrupt will
wake-up the device from Sleep mode, when enabled.
Each operational comparator will consume additional
current.
To minimize power consumption while in Sleep mode,
turn off the comparators (CON =
0) before entering
Sleep. If the device wakes up from Sleep, the contents
of the CMxCON register are not affected.
24.8 Effects of a Reset
A device Reset forces the CMxCON registers to their
Reset state. This forces both comparators and the
voltage reference to the OFF state.
TABLE 24-3: REGISTERS ASSOCIATED WITH COMPARATOR MODULE
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
INTCON GIE/GIEH PEIE/GIEL TMR0IE INT0IE RBIE TMR0IF INT0IF RBIF
CM1CON
CON COE CPOL EVPOL1 EVPOL0 CREF CCH1 CCH0
CM2CON
CON COE CPOL EVPOL1 EVPOL0 CREF CCH1 CCH0
CVRCON
CVREN CVROE CVRSS CVR4 CVR3 CVR2 CVR1 CVR0
CMSTAT
CMP2OUT CMP1OUT
PIR4
TMR4IF EEIF CMP2IF CMP1IF CCP5IF CCP4IF CCP3IF
PIE4
TMR4IE EEIE CMP2IE CMP1IE CCP5IE CCP4IE CCP3IE
IPR4
TMR4IP EEIP CMP2IP CMP1IP CCP5IP CCP4IP CCP3IP
ANCON0
ANSEL7 ANSEL6 ANSEL5 ANSEL4 ANSEL3 ANSEL2 ANSEL1 ANSEL0
ANCON1
ANSEL14 ANSEL13 ANSEL12 ANSEL11 ANSEL10 ANSEL9 ANSEL8
PMD2
MODMD ECANMD CMP2MD CMP1MD
Legend: — = unimplemented, read as ‘0’.