English
Language : 

PIC18LF2X_13 Datasheet, PDF (315/560 Pages) Microchip Technology – PIC18(L)F2X/45K50 USB Flash MCU Product Brief
PIC18(L)F2X/4XK22
18.5 Operation During Sleep
The comparator, if enabled before entering Sleep mode,
remains active during Sleep. The additional current
consumed by the comparator is shown separately in
Section 27.0 “Electrical Characteristics”. If the
comparator is not used to wake the device, power
consumption can be minimized while in Sleep mode by
turning off the comparator. Each comparator is turned off
by clearing the CxON bit of the CMxCON0 register.
A change to the comparator output can wake-up the
device from Sleep. To enable the comparator to wake
the device from Sleep, the CxIE bit of the PIE2 register
and the PEIE/GIEL bit of the INTCON register must be
set. The instruction following the SLEEP instruction
always executes following a wake from Sleep. If the
GIE/GIEH bit of the INTCON register is also set, the
device will then execute the Interrupt Service Routine.
18.6 Effects of a Reset
A device Reset forces the CMxCON0 and CM2CON1
registers to their Reset states. This forces both
comparators and the voltage references to their Off
states.Comparator Control Registers.
18.7 Analog Input Connection
Considerations
A simplified circuit for an analog input is shown in
Figure 18-5. Since the analog input pins share their
connection with a digital input, they have reverse
biased ESD protection diodes to VDD and VSS. The
analog input, therefore, must be between VSS 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 may occur.
A maximum source impedance of 10 k is recommended
for the analog sources. Also, any external component
connected to an analog input pin, such as a capacitor or
a Zener diode, should have very little leakage current to
minimize inaccuracies introduced.
Note 1: When reading a PORT register, all pins
configured as analog inputs will read as a
‘0’. Pins configured as digital inputs will
convert as an analog input, according to
the input specification.
2: Analog levels on any pin defined as a
digital input, may cause the input buffer to
consume more current than is specified.
FIGURE 18-5:
ANALOG INPUT MODEL
VDD
Rs < 10K
VA
AIN
CPIN
5 pF
VT  0.6V
VT  0.6V
RIC
ILEAKAGE(1)
To Comparator
Vss
Legend:
CPIN = Input Capacitance
ILEAKAGE = Leakage Current at the pin due to various junctions
RIC
= Interconnect Resistance
RS
= Source Impedance
VA
= Analog Voltage
VT
= Threshold Voltage
Note 1: See Section 27.0 “Electrical Characteristics”.
 2010-2012 Microchip Technology Inc.
DS41412F-page 315