PIC16C782 Microchip Technology Inc., PIC16C782 Datasheet - Page 91
![no-image](/images/manufacturer_photos/0/4/440/microchip_technology_inc__sml.jpg)
PIC16C782
Manufacturer Part Number
PIC16C782
Description
8-bit Cmos Microcontrollers With A/d, D/a, Opamp, Comparators And Psmc
Manufacturer
Microchip Technology Inc.
Datasheet
1.PIC16C782.pdf
(186 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 91 of 186
- Download datasheet (4Mb)
12.0
The comparator module has two separate voltage com-
parators: Comparator C1 and Comparator C2 (see
Figure 12-1).
Each comparator offers the following list of features:
• Control and configuration register
• Comparator output available externally
• Programmable output polarity
• Interrupt-on-change flags
• Wake-up from SLEEP
• Configurable as feedback input to the PSMC
• Programmable four input multiplexer
• Programmable reference selections
• Programmable speed
• Output synchronization to Timer1 clock input
12.1
Both comparators have separate control and configura-
tion registers: CM1CON0 for C1 and CM2CON0 for C2.
In addition, Comparator C2 has a second control regis-
ter, CM2CON1, for synchronization control and simul-
taneous reading of both comparator outputs.
12.1.1
The CM1CON0 register (shown in Register 12-1) con-
tains the control and status bits for the following:
• Comparator enable
• Comparator input selection
• Comparator reference selection
• Output mode
• Comparator speed
Setting C1ON (CM1CON0<7>) enables Comparator
C1 for operation.
Bits C1CH<1:0> (CM1CON0<1:0>) select the compar-
ator input from the four analog pins AN<7:4>.
(Comparator C2 only)
Note:
2001 Microchip Technology Inc.
COMPARATOR MODULE
Control Registers
To use AN<7:4> as analog inputs, the
appropriate bits must be programmed in
the ANSEL register.
COMPARATOR C1 CONTROL
REGISTER
Preliminary
Setting C1R (CM1CON0<2>) selects the output of the
DAC module as the reference voltage for the compara-
tor. Clearing C1R selects the V
AN3/V
The output of the comparator is available internally via
the C1OUT flag (CM1CON0<6>). To make the output
available for an external connection, the C1OE flag
(CM1CON0<5>) must be set. If the module is disabled
with C1OE set, the output will be driven as shown in
Table 12-2:
The polarity of the comparator output can be inverted
by setting the C1POL flag (CM1CON0<4>). Clearing
C1POL results in a non-inverted output. A complete
table showing the output state versus input conditions
and the polarity bit is shown in Table 12-2.
TABLE 12-1:
C1SP (CM1CON0<3>) configures the speed of the
comparator. When C1SP is set, the comparator oper-
ates at its normal speed. Clearing C1SP operates the
comparator in a slower, low power mode.
Input Condition
Note 1: The internal output of the comparator is
C1VN > C1VP
C1VN < C1VP
C1VN > C1VP
C1VN < C1VP
REF
2: The C1 interrupt will operate correctly
3: For the output of C1 on RB6/C1/
1 pin.
latched at the end of each instruction
cycle. External outputs are not latched.
with C1OE set or cleared.
PSMC1A, the PSMC must be disabled
and TRISB<6> must be ‘0’.
PIC16C781/782
OUTPUT STATE VERSUS
INPUT CONDITIONS
C1POL
0
0
1
1
REF
1 input on the RA3/
DS41171A-page 89
C1OUT
0
1
1
0
Related parts for PIC16C782
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC-0903](/images/no-image3.png)
Part Number:
Description:
Photo IC(photodiode with signal processing)
Manufacturer:
KODENSHI KOREA CORP
Datasheet:
![PIC-1018SMB](/images/no-image3.png)
Part Number:
Description:
INFRARED RECEIVER MODULE
Manufacturer:
ETC
Datasheet:
![PIC-2058SMB](/images/no-image3.png)
Part Number:
Description:
INFRARED RECEIVER MODULE
Manufacturer:
ETC
Datasheet:
![PIC-2503](/images/no-image3.png)
Part Number:
Description:
Photo IC(photodiode with signal processing)
Manufacturer:
KODENSHI KOREA CORP
Datasheet:
![PIC12045S](/images/manufacturer_photos/0/3/374/kodenshi_tmb.jpg)
Part Number:
Description:
(PIC-1204x) OPTICAL-RECEIVER OUTPUT PHOTO IC
Manufacturer:
Kodenshi
Datasheet:
![TC1014-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1014-5.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.8VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-4.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: