English
Language : 

PIC18F6390 Datasheet, PDF (247/412 Pages) Microchip Technology – 64/80-Pin Flash Microcontrollers with LCD Driver and nanoWatt Technology
PIC18F6390/6490/8390/8490
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
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.
FIGURE 19-4:
COMPARATOR ANALOG INPUT MODEL
RS < 10k
AIN
VA
CPIN
5 pF
VDD
VT = 0.6V
VT = 0.6V
RIC
ILEAKAGE
±500 nA
Comparator
Input
VSS
Legend:
CPIN
=
VT
=
ILEAKAGE =
RIC
=
RS
=
VA
=
Input Capacitance
Threshold Voltage
Leakage Current at the pin due to various junctions
Interconnect Resistance
Source Impedance
Analog Voltage
TABLE 19-1: REGISTERS ASSOCIATED WITH COMPARATOR MODULE
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reset
Values
on Page
CMCON
C2OUT C1OUT C2INV C1INV
CIS
CM2
CM1
CM0
61
CVRCON CVREN CVROE CVRR CVRSS CVR3 CVR2 CVR1 CVR0
61
INTCON GIE/GIEH PEIE/GIEL TMR0IE INT0IE RBIE TMR0IF INT0IF RBIF
59
PIR2
OSCFIF CMIF
—
—
BCLIF HLVDIF TMR3IF CCP2IF
61
PIE2
OSCFIE CMIE
—
—
BCLIE HLVDIE TMR3IE CCP2IE 61
IPR2
OSCFIP CMIP
—
—
BCLIP HLVDIP TMR3IP CCP2IP 61
PORTF
Read PORTF pins, Write LATF Latch
62
LATF
LATF Data Output Register
62
TRISF
PORTF Data Direction Register
62
Legend: — = unimplemented, read as ‘0’. Shaded cells are unused by the comparator module.
 2004 Microchip Technology Inc.
Preliminary
DS39629B-page 245