Microchip Technology AC244045 Data Sheet

Page of 448
PIC16(L)F1825/1829
DS41440C-page 178
 2010-2012 Microchip Technology Inc.
19.9
Interaction with ECCP Logic
In some devices, a comparator output signal can be
used to trigger the auto-shutdown feature found within
the ECCP module. When the ECCP auto-shutdown
feature is enabled and a comparator output signal is
selected as the source, the comparator can be used
simultaneously as a general purpose comparator and
as the ECCP auto-shutdown source. In addition, the
comparator output signal can also be routed to the
designated I/O pin. If the ECCP Auto-Restart mode is
also enabled, the comparators can be used as a
closed loop analog feedback circuit to the ECCP,
thereby creating an analog controlled PWM.
Please see section
 
for more information.
19.10 Analog Input Connection 
Considerations
A simplified circuit for an analog input is shown in
. Since the analog input pins share their
connection with a digital input, they have reverse
biased ESD protection 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 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.
FIGURE 19-3:
ANALOG INPUT MODEL 
Note:
When the comparator module is first
initialized the output state is unknown.
Upon initialization, the user should verify
the output state of the comparator prior to
relying on the result, primarily when using
the result in connection with other
peripheral features, such as the ECCP
Auto-Shutdown mode.
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.
V
A
Rs < 10K
C
PIN
5 pF
V
DD
V
T
 
 0.6V
V
T
 
 0.6V
R
IC
I
LEAKAGE
(1)
Vss
Legend:
C
PIN
= Input Capacitance
I
LEAKAGE
= Leakage Current at the pin due to various junctions
R
IC
= Interconnect Resistance
R
S
= Source Impedance
V
A
= Analog Voltage
V
T
= Threshold Voltage
To Comparator
Note 1: See 
Analog
Input
pin