Electronic Components Datasheet Search
  English  ▼

X  

PIC16C781 Datasheet(PDF) 91 Page - Microchip Technology

Part # PIC16C781
Description  8-Bit CMOS Microcontrollers with A/D, D/A, OPAMP, Comparators and PSMC
PDF  186 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16C781 Datasheet(HTML) 91 Page - Microchip Technology

Back Button PIC16C781 Datasheet HTML 87Page - Microchip Technology PIC16C781 Datasheet HTML 88Page - Microchip Technology PIC16C781 Datasheet HTML 89Page - Microchip Technology PIC16C781 Datasheet HTML 90Page - Microchip Technology PIC16C781 Datasheet HTML 91Page - Microchip Technology PIC16C781 Datasheet HTML 92Page - Microchip Technology PIC16C781 Datasheet HTML 93Page - Microchip Technology PIC16C781 Datasheet HTML 94Page - Microchip Technology PIC16C781 Datasheet HTML 95Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 91 / 186 page
background image
 2001 Microchip Technology Inc.
Preliminary
DS41171A-page 89
PIC16C781/782
12.0
COMPARATOR MODULE
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
(Comparator C2 only)
12.1
Control Registers
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
COMPARATOR C1 CONTROL
REGISTER
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>.
Setting C1R (CM1CON0<2>) selects the output of the
DAC module as the reference voltage for the compara-
tor. Clearing C1R selects the VREF1 input on the RA3/
AN3/VREF1 pin.
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.
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.
Note:
To use AN<7:4> as analog inputs, the
appropriate bits must be programmed in
the ANSEL register.
TABLE 12-1:
OUTPUT STATE VERSUS
INPUT CONDITIONS
Input Condition
C1POL
C1OUT
C1VN > C1VP
0
0
C1VN < C1VP
0
1
C1VN > C1VP
1
1
C1VN < C1VP
1
0
Note 1: The internal output of the comparator is
latched at the end of each instruction
cycle. External outputs are not latched.
2: The C1 interrupt will operate correctly
with C1OE set or cleared.
3: For the output of C1 on RB6/C1/
PSMC1A, the PSMC must be disabled
and TRISB<6> must be ‘0’.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com