Datasheet

PIC18F1230/1330
2009 Microchip Technology Inc. DS39758D-page 181
17.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, as shown in the comparator specifications. To
minimize power consumption while in Sleep mode, turn
off the comparators (CMEN2:CMEN0 = 000) before
entering Sleep. If the device wakes up from Sleep, the
contents of the CMCON register are not affected.
17.8 Effects of a Reset
A device Reset forces the CMCON register to its Reset
state, causing the comparator modules to be turned off
(CMEN2:CMEN0 = 000).
17.9 Analog Input Connection
Considerations
A simplified circuit for an analog input is shown in
Figure 17-2. Since the analog pins are connected to a
digital output, they have reverse biased diodes to VDD
and VSS. The analog input, therefore, must be between
V
SS and VDD. If the input voltage deviates from this
range by more than 0.6V in either direction, one of the
diodes is forward biased and a latch-up condition may
occur. A maximum source impedance of 10 k is
recommended for the analog sources. Any external
component connected to an analog input pin, such as
a capacitor or Zener diode, should have very little
leakage current.
FIGURE 17-2: COMPARATOR ANALOG INPUT MODEL
VA
R
S < 10k
A
IN
CPIN
5 pF
V
DD
VT = 0.6V
VT = 0.6V
RIC
ILEAKAGE
±100 nA
V
SS
Legend: CPIN = Input Capacitance
V
T = Threshold Voltage
I
LEAKAGE = Leakage Current at the pin due to various junctions
R
IC = Interconnect Resistance
R
S = Source Impedance
VA = Analog Voltage
Comparator
Input