Datasheet

Table Of Contents
2011-2013 Microchip Technology Inc. DS40001609C-page 155
PIC16(L)F1508/9
17.2.5 COMPARATOR OUTPUT POLARITY
Inverting the output of the comparator is functionally
equivalent to swapping the comparator inputs. The
polarity of the comparator output can be inverted by
setting the CxPOL bit of the CMxCON0 register.
Clearing the CxPOL bit results in a non-inverted output.
Table 17-2 shows the output state versus input
conditions, including polarity control.
17.2.6 COMPARATOR SPEED/POWER
SELECTION
The trade-off between speed or power can be opti-
mized during program execution with the CxSP control
bit. The default state for this bit is ‘1’ which selects the
Normal-Speed mode. Device power consumption can
be optimized at the cost of slower comparator propaga-
tion delay by clearing the CxSP bit to ‘0’.
17.3 Analog Input Connection
Considerations
A simplified circuit for an analog input is shown in
Figure 17-4. Since the analog input pins share their
connection with a digital input, they have reverse
biased ESD protection diodes to V
DD 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 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.
FIGURE 17-3: ANALOG INPUT MODEL
TABLE 17-2: COMPARATOR OUTPUT
STATE VS. INPUT CONDITIONS
Input Condition CxPOL CxOUT
CxV
N > CxVP 00
CxVN < CxVP 01
CxV
N > CxVP 11
CxVN < CxVP 10
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.
VA
R
S
< 10K
V
DD
Analog
Input pin
CPIN
5pF
V
T
§ 0.6V
V
T
§ 0.6V
ILEAKAGE
(1)
V
SS
R
IC
To Comparator
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
Rev. 10-000071A
8/2/2013
Note 1: See Section 29.0 “Electrical Specifications”.