Microchip Technology DM164130-2 Data Sheet

Page of 478
 2010-2012 Microchip Technology Inc.
DS41414D-page 183
PIC16(L)F1946/47
18.7
Comparator Negative Input 
Selection
The CxNCH<1:0> bits of the CMxCON0 register direct
one of four analog pins to the comparator inverting
input.
18.8
Comparator Response Time
The comparator output is indeterminate for a period of
time after the change of an input source or the selection
of a new reference voltage. This period is referred to as
the response time. 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 time to a comparator
input change. See the Comparator and Voltage Refer-
ence Specifications in 
 for more details.
18.9
Interaction with ECCP Logic
The comparators can be used as general purpose
comparators. Their outputs can be brought out to the
CxOUT pins. When the ECCP Auto-Shutdown is
active it can use one or both comparator signals. If
auto-restart is also enabled, the comparators can be
configured as a closed loop analog feedback to the
ECCP, thereby, creating an analog controlled PWM.
18.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 for-
ward 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:
To use CxIN+ and CxINx- pins as analog
input, the appropriate bits must be set in
the ANSEL register and the correspond-
ing TRIS bits must also be set to disable
the output drivers.
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.