Electronic Components Datasheet Search
  English  ▼

X  

PIC16C781 Datasheet(PDF) 97 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) 97 Page - Microchip Technology

Back Button PIC16C781 Datasheet HTML 93Page - Microchip Technology PIC16C781 Datasheet HTML 94Page - Microchip Technology PIC16C781 Datasheet HTML 95Page - Microchip Technology PIC16C781 Datasheet HTML 96Page - Microchip Technology PIC16C781 Datasheet HTML 97Page - Microchip Technology PIC16C781 Datasheet HTML 98Page - Microchip Technology PIC16C781 Datasheet HTML 99Page - Microchip Technology PIC16C781 Datasheet HTML 100Page - Microchip Technology PIC16C781 Datasheet HTML 101Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 97 / 186 page
background image
 2001 Microchip Technology Inc.
Preliminary
DS41171A-page 95
PIC16C781/782
12.2
Comparator Configuration
The following examples show the use of the Compara-
tor module in:
• A simple voltage comparator configuration syn-
chronized to the Timer 1 clock input.
• A comparator input to the PSMC with a program-
mable DAC reference.
• A low power window comparator configuration
with interrupt-on-change.
12.2.1
EXAMPLE: C2 SYNCHRONIZED TO
T1CKI
In this example, Comparator C2 is configured as a nor-
mal voltage comparator synchronized to the T1CKI
input. A block diagram of the comparator with external
connections is shown in Figure 12-2.
FIGURE 12-3:
COMPARATOR C2 CONFIGURATION WITH OUTPUT SYNCHRONIZED TO T1CKI
EXAMPLE 12-1:
C2 CONFIGURATION
PROGRAM
;*
This code block will configure C2
;*
for normal speed and output polarity,
;*
input on AN6, Reference from VREF2, and
;*
output synchronization to TMR1 clock.
;*
BANKSEL TRISA
; Select Bank 1
BSF
TRISA,RA2
; RA2 as input
BSF
TRISA,RA6
; RA6 as input
BSF
TRISB,RB2
; RB2 as input
BSF
ANSEL,AN2
; AN2 as analog
BSF
ANSEL,AN6
; AN6 as analog
BANKSEL CM2CON0
; Select Bank 2
MOVLW
B’10001010’
; Set C2; no out
MOVWF
CM2CON0
; VREF2, AN6
BSF
CM2CON1,C2SYNC ; CLK sync
12.2.2
EXAMPLE: C1 INPUT TO PSMC W/
DAC AS REFERENCE
In this example, Comparator C1 is configured as a non-
inverting normal speed voltage comparator input to the
PSMC, with a programmable reference voltage. A
block diagram of the comparator with external connec-
tions is shown in Figure 12-3.
D
Q
CK
Q
CM2CON0<6>
External Oscillator
External Reference
INPUT
PIC16C78X
C2
+
-
RB2/AN6
RA2/AN2/VREF2
RA6/OSC2/CLKOUT/T1CKI
C2POL



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