PIC16F684-I/SLG Microchip, PIC16F684-I/SLG Datasheet - Page 58

no-image

PIC16F684-I/SLG

Manufacturer Part Number
PIC16F684-I/SLG
Description
pic, flash, Microcontrollers, Microprocessors, Semiconductors and Actives, ic, mcu
Manufacturer
Microchip
Datasheet
PIC16F684
8.1
A single comparator is shown in Figure 8-1 along with
the relationship between the analog input levels and
the digital output. When the analog input at V
than the analog input V
is a digital low level. When the analog input at V
greater than the analog input V
comparator is a digital high level. The shaded areas of
the output of the comparator in Figure 8-1 represent
the uncertainty due to input offsets and response time.
The polarity of the comparator output can be inverted
by setting the CxINV bits (CMCON0<5:4>). Clearing
CxINV results in a non-inverted output. A complete
table showing the output state versus input conditions
and the polarity bit is shown in Table 8-1.
TABLE 8-1:
FIGURE 8-2:
DS41202C-page 56
Note:
Input Conditions
V
V
V
V
IN
IN
IN
IN
Comparator Operation
To use CIN+ and CIN- pins as analog
inputs, the appropriate bits must be
programmed in the CMCON0 (19h)
register.
- > V
- < V
- > V
- < V
VA
Legend: C
IN
IN
IN
IN
Rs < 10K
+
+
+
+
OUTPUT STATE VS. INPUT
CONDITIONS
IN
ANALOG INPUT MODEL
-, the output of the comparator
V
I
R
R
VA
LEAKAGE
A
T
PIN
IC
S
IN
CINV
IN
C
5 pF
0
0
1
1
PIN
-, the output of the
= Input Capacitance
= Threshold Voltage
= Leakage Current at the pin due to various junctions
= Interconnect Resistance
= Source Impedance
= Analog Voltage
CxOUT
IN
+ is less
0
1
1
0
IN
+ is
Preliminary
V
DD
V
V
T
T
= 0.6V
= 0.6V
FIGURE 8-1:
8.2
A simplified circuit for an analog input is shown in
Figure 8-2. Since the analog pins are connected to a
digital output, they have reverse biased diodes to V
and V
V
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. Any external component
connected to an analog input pin, such as a capacitor
or a Zener diode, should have very little leakage
current.
SS
Output
V
V
Output
Note 1: When reading the PORT register, all pins
IN
V
IN
V
IN–
IN+
and V
-
+
SS
V
V
IN
IN
. The analog input, therefore, must be between
2: Analog levels on any pin defined as a
Analog Input Connection
Considerations
Leakage
±500 nA
Vss
+
-
DD
configured as analog inputs will read as a
‘0’. Pins configured as digital inputs will
convert as analog inputs according to the
input specification.
digital input may cause the input buffer to
consume more current than is specified.
. If the input voltage deviates from this
R
IC
+
SINGLE COMPARATOR
 2004 Microchip Technology Inc.
Output
DD

Related parts for PIC16F684-I/SLG