Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Section 20. Comparator

Section 20. Comparator

Ratings: (0)|Views: 23|Likes:
Published by Guillermo Hernandez

More info:

Published by: Guillermo Hernandez on Jul 26, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/13/2011

pdf

text

original

 
©
1997 Microchip Technology Inc. DS31020A page 20-1
M
 C  o m  p a a t    o
20
Section 20. Comparator
HIGHLIGHTS
This section of the manual contains the following major topics:20.1Introduction..................................................................................................................20-220.2Control Register...........................................................................................................20-320.3Comparator Configuration............................................................................................20-420.4Comparator Operation.................................................................................................20-620.5Comparator Reference.................................................................................................20-620.6Comparator Response Time........................................................................................20-820.7Comparator Outputs....................................................................................................20-820.8Comparator Interrupts..................................................................................................20-920.9Comparator Operation During SLEEP.........................................................................20-920.10Effects of a RESET......................................................................................................20-920.11Analog Input Connection Considerations...................................................................20-1020.12Initialization................................................................................................................20-1120.13Design Tips................................................................................................................20-1220.14Related Application Notes..........................................................................................20-1320.15Revision History.........................................................................................................20-14
 
PICmicro MID-RANGE MCU FAMILY
DS31020A-page 20-2
©
1997 Microchip Technology Inc.
20.1 Introduction
The comparator module contains two analog comparators. The inputs to the comparators aremultiplexed with the I/O pins. The on-chip Voltage Reference (see the
sec-tion)can also be an input to the comparators.The CMCON register, shown inFigure 20-1, controls the comparator input and output multiplex-ers. A block diagram of the comparator is shown inFigure 20-1.
 
©
1997 Microchip Technology Inc.DS31020A-page 20-3
Section 20. Comparator
 C  o m  p a a t    o
20
20.2 Control Register
Register 20-1:CMCON Register
R-0R-0U-0U-0R/W-0R/W-0R/W-0R/W-0C2OUTC1OUTCISCM2CM1CM0bit 7bit 0bit 7
C2OUT
: Comparator2 Output Indicator bit1 = C2 V
IN
+ > C2 V
IN
 – 0 = C2 V
IN
+ < C2 V
IN
 – bit 6
C1OUT
: Comparator1 Output Indicator bit1 = C1 V
IN
+ > C1 V
IN
 – 0 = C1 V
IN
+ < C1 V
IN
 – bit 5:4
Unimplemented:
Read as '0'bit 3
CIS
: Comparator Input Switch bitWhen CM2:CM0: = 001:1 = C1 V
IN
 – connects to AN30 = C1 V
IN
 – connects to AN0When CM2:CM0 = 010:1 = C1 V
IN
 – connects to AN3C2 V
IN
 – connects to AN20 = C1 V
IN
 – connects to AN0C2 V
IN
 – connects to AN1bit 2:0
CM2:CM0
: Comparator Mode Select bitsSeeFigure 20-1.LegendR = Readable bitW = Writable bitU = Unimplemented bit, read as 0- n = Value at POR reset

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->