PIC18F24J11 MICROCHIP [Microchip Technology], PIC18F24J11 Datasheet - Page 365

no-image

PIC18F24J11

Manufacturer Part Number
PIC18F24J11
Description
28/44-Pin, Low-Power, High-Performance USB Microcontrollers with nanoWatt XLP Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F24J11-I/ML
Manufacturer:
MICROCHIP
Quantity:
49 000
Part Number:
PIC18F24J11-I/SO
Manufacturer:
Microchip Technology
Quantity:
1 960
22.5
Each comparator has up to eight possible combina-
tions of inputs: up to four external analog inputs, and
one of two internal voltage references.
Both comparators allow a selection of the signal from
pin, CxINA, or the voltage from the comparator refer-
ence (CV
compared to either CxINB, CTMU or the microcon-
troller’s fixed internal reference voltage (V
nominal) on the inverting channel.
Table 22-1
tied to fixed I/O pins.
Figure 22-4
configurations and their corresponding bit settings.
TABLE 22-1:
22.5.1
Setting the CON bit of the CMxCON register
(CMxCON<7>) enables the comparator for operation.
Clearing the CON bit disables the comparator, resulting
in minimum current consumption.
The CCH<1:0> bits in the CMxCON register
(CMxCON<1:0>) direct either one of three analog input
pins, or the Internal Reference Voltage (V
comparator V
ing mode, either an external or internal voltage
reference may be used. The analog signal present at
V
output of the comparator is adjusted accordingly.
 2011 Microchip Technology Inc.
IN
Comparator
- is compared to the signal at V
1
2
Comparator Control and
Configuration
REF
provides the comparator inputs and outputs
COMPARATOR ENABLE AND
INPUT SELECTION
IN
) on the non-inverting channel. This is
illustrates
-. Depending on the comparator operat-
COMPARATOR INPUTS AND
OUTPUTS
Input or Output
C1INA (V
C1INB (V
C2INA(V
C2INB(V
C1OUT
C2OUT
the
IN
IN
IN
IN
available
+)
+)
-)
-)
IN
+ and the digital
Remapped
Remapped
comparator
I/O Pin
IRV
RA0
RA3
RPn
RA1
RA2
RPn
IRV
), to the
, 0.6V
PIC18F46J11 FAMILY
The external reference is used when CREF = 0
(CMxCON<2>) and V
pin. When external voltage references are used, the
comparator module can be configured to have the
reference sources externally. The reference signal
must be between V
either pin of the comparator.
The comparator module also allows the selection of an
internally generated voltage reference (CV
the comparator voltage reference module. This module
is described in more detail in
tor
voltage reference module is only available when
CREF = 1. In this mode, the internal voltage reference
is applied to the comparator’s V
22.5.2
The comparator outputs are read through the CMSTAT
register. The CMSTAT<0> reads the Comparator 1 out-
put and CMSTAT<1> reads the Comparator 2 output.
These bits are read-only.
The comparator outputs may also be directly output to
the RPn I/O pins by setting the COE bit (CMxCON<6>).
When enabled, multiplexers in the output path of the
pins switch to the output of the comparator.
By default, the comparator’s output is at logic high
whenever the voltage on V
The polarity of the comparator outputs can be inverted
using the CPOL bit (CMxCON<5>).
The uncertainty of each of the comparators is related to
the input offset voltage and the response time given in
the specifications, as discussed in
“Comparator
Note:
Module”. The reference from the comparator
The comparator input pin selected by
CCH<1:0> must be configured as an input
by setting both the corresponding TRIS
and PCFG bits in the ANCON1 register.
COMPARATOR ENABLE AND
OUTPUT SELECTION
Operation”.
SS
IN
and V
+ is connected to the CxINA
IN
DD
Section 22.0 “Compara-
+ is greater than on V
, and can be applied to
IN
+ pin.
DS39932D-page 365
Section 22.2
REF
) from
IN
-.

Related parts for PIC18F24J11