PIC16C781T-I/SO Microchip Technology, PIC16C781T-I/SO Datasheet - Page 91

IC MCU CMOS 8BIT 1K 20MHZ 20SOIC

PIC16C781T-I/SO

Manufacturer Part Number
PIC16C781T-I/SO
Description
IC MCU CMOS 8BIT 1K 20MHZ 20SOIC
Manufacturer
Microchip Technology
Series
PIC® 16Cr

Specifications of PIC16C781T-I/SO

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
13
Program Memory Size
1.75KB (1K x 14)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Data Converters
A/D 8x8b; D/A 1x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
20-SOIC (7.5mm Width)
For Use With
AC164028 - MODULE SKT PROMATEII 20SOIC/DIP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
Other names
PIC16C781TI/SO
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 PIC16C781T-I/SO