Microchip Technology ARD00385 Data Sheet

Page of 570
PIC18F87K90 FAMILY
DS39957D-page 392
 2009-2011 Microchip Technology Inc.
24.2
Comparator Operation
A single comparator is shown in 
, along with
the relationship between the analog input levels and
the digital output. When the analog input at V
IN
+ is less
than the analog input, V
IN
-, the output of the compara-
tor is a digital low level. When the analog input at V
IN
+
is greater than the analog input, V
IN
-, the output of the
comparator is a digital high level. The shaded areas of
the output of the comparator, in 
, represent
the uncertainty due to input offsets and response time.
FIGURE 24-2:
SINGLE COMPARATOR
24.3
Comparator 
Response Time
Response time is the minimum time, after selecting a
new reference voltage or input source, before the com-
parator output has a valid level. The response time of
the comparator differs from the settling time of the
voltage reference. Therefore, both of these times must
be considered when determining the total response to
a comparator input change. Otherwise, the maximum
delay of the comparators should be used (see
24.4
Analog Input Connection
Considerations
A simplified circuit for an analog input is shown in
. Since the analog pins are connected to a
digital output, they have reverse biased diodes to V
DD
and V
SS
. The analog input, therefore, must be between
V
SS
 and V
DD
. 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 a Zener diode, should have very little
leakage current.
FIGURE 24-3:
COMPARATOR ANALOG INPUT MODEL        
Output
V
IN
-
V
IN
+
+
V
IN
+
V
IN
-
Output
VA
R
S
A
IN
C
PIN
5 pF
V
DD
V
T
 = 0.6V
V
T
 = 0.6V
R
IC
I
LEAKAGE
±100 nA
V
SS
Legend:
C
PIN
= 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
<10k