English
Language : 

PIC18F44J50-I Datasheet, PDF (385/562 Pages) Microchip Technology – 28/44-Pin, Low-Power, High-Performance USB Microcontrollers
PIC18F46J50 FAMILY
23.0 COMPARATOR MODULE
The analog comparator module contains two compara-
tors that can be independently configured in a variety of
ways. The inputs can be selected from the analog inputs
and two internal voltage references. The digital outputs
are available at the pin level and can also be read
through the control register. Multiple output and interrupt
event generation is also available. Figure 23-1 provides
a generic single comparator from the module.
Key features of the module are:
• Independent comparator control
• Programmable input configuration
• Output to both pin and register levels
• Programmable output polarity
• Independent interrupt generation for each
comparator with configurable interrupt-on-change
23.1 Registers
The CMxCON registers (Register 23-1) select the input
and output configuration for each comparator, as well
as the settings for interrupt generation.
The CMSTAT register (Register 23-2) provides the out-
put results of the comparators. The bits in this register
are read-only.
FIGURE 23-1:
COMPARATOR SIMPLIFIED BLOCK DIAGRAM
CCH<1:0>
COUTx
(CMSTAT<1:0>)
CxINB
0
VIRV
3
CREF
CxINA
0
CVREF
1
VIN-
VIN+
Cx
CON
Interrupt
Logic
EVPOL<4:3>
Polarity
Logic
COE
CPOL
CMxIF
CxOUT
 2011 Microchip Technology Inc.
DS39931D-page 385