PIC18F45J10 FAMILY
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.
19.9 Analog Input Connection
Considerations
A simplified circuit for an analog input is shown in
Figure 19-4. Since the analog pins are connected to a
digital output, they have reverse biased diodes to VDD
and VSS. The analog input, therefore, must be between
VSS and VDD. If the input voltage deviates from this
FIGURE 19-4:
COMPARATOR ANALOG INPUT MODEL
VDD
VT = 0.6V
RIC
RS < 10k
AIN
Comparator
Input
ILEAKAGE
±100 nA
CPIN
5 pF
VA
VT = 0.6V
VSS
Legend: CPIN
=
=
Input Capacitance
Threshold Voltage
VT
ILEAKAGE = Leakage Current at the pin due to various junctions
RIC
RS
VA
=
=
=
Interconnect Resistance
Source Impedance
Analog Voltage
TABLE 19-1: REGISTERS ASSOCIATED WITH COMPARATOR MODULE
Reset
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Values
on page
CMCON
CVRCON
INTCON
PIR2
C2OUT
CVREN
C1OUT
CVROE
C2INV
CVRR
C1INV
CVRSS
INT0IE
—
CIS
CM2
CVR2
TMR0IF
—
CM1
CVR1
INT0IF
—
CM0
CVR0
RBIF
49
49
50
49
49
49
50
50
50
CVR3
RBIE
GIE/GIEH PEIE/GIEL TMR0IE
OSCFIF
OSCFIE
OSCFIP
—
CMIF
CMIE
CMIP
—
—
—
BCL1IF
BCL1IE
BCL1IP
RA3
CCP2IF
CCP2IE
CCP2IP
RA0
PIE2
—
—
—
IPR2
—
—
—
—
PORTA
LATA
RA5
—
RA2
RA1
—
—
PORTA Data Latch Register (Read and Write to Data Latch)
TRISA5 TRISA3 TRISA2 TRISA1 TRISA0
TRISA
—
—
—
Legend: — = unimplemented, read as ‘0’. Shaded cells are unused by the comparator module.
© 2009 Microchip Technology Inc.
DS39682E-page 229