| Electronic Components Datasheet Search |
|
PIC16C781 Datasheet(PDF) 97 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16C781 Datasheet(HTML) 97 Page - Microchip Technology |
|
97 / 186 page ![]() 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 |
|
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 |
| 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 |