欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC16F886-I/SS 参数 Datasheet PDF下载

PIC16F886-I/SS图片预览
型号: PIC16F886-I/SS
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚,增强基于闪存的8位CMOS微控制器采用纳瓦技术 [28/40/44-Pin, Enhanced Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology]
分类和应用: 闪存微控制器和处理器外围集成电路光电二极管时钟
文件页数/大小: 288 页 / 5120 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC16F886-I/SS的Datasheet PDF文件第83页浏览型号PIC16F886-I/SS的Datasheet PDF文件第84页浏览型号PIC16F886-I/SS的Datasheet PDF文件第85页浏览型号PIC16F886-I/SS的Datasheet PDF文件第86页浏览型号PIC16F886-I/SS的Datasheet PDF文件第88页浏览型号PIC16F886-I/SS的Datasheet PDF文件第89页浏览型号PIC16F886-I/SS的Datasheet PDF文件第90页浏览型号PIC16F886-I/SS的Datasheet PDF文件第91页  
PIC16F882/883/884/886/887  
8.2  
Comparator Control  
Note 1: The CxOE bit overrides the PORT data  
latch. Setting the CxON has no impact on  
the port override.  
Each comparator has  
a
separate control and  
configuration register: CM1CON0 for Comparator C1 and  
CM2CON0 for Comparator C2. In addition, Comparator  
C2 has a second control register, CM2CON1, for  
controlling the interaction with Timer1 and simultaneous  
reading of both comparator outputs.  
2: The internal output of the comparator is  
latched with each instruction cycle.  
Unless otherwise specified, external  
outputs are not latched.  
The CM1CON0 and CM2CON0 registers (see Registers  
8-1 and 8-2, respectively) contain the control and Status  
bits for the following:  
8.2.5  
COMPARATOR OUTPUT POLARITY  
Inverting the output of the comparator is functionally  
equivalent to swapping the comparator inputs. The  
polarity of the comparator output can be inverted by  
setting the CxPOL bit of the CMxCON0 register.  
Clearing the CxPOL bit results in a non-inverted output.  
• Enable  
• Input selection  
• Reference selection  
• Output selection  
• Output polarity  
Table 8-1 shows the output state versus input  
conditions, including polarity control.  
8.2.1  
COMPARATOR ENABLE  
TABLE 8-1:  
COMPARATOR OUTPUT  
STATE VS. INPUT  
CONDITIONS  
Setting the CxON bit of the CMxCON0 register enables  
the comparator for operation. Clearing the CxON bit  
disables the comparator resulting in minimum current  
consumption.  
Input Condition  
CxPOL  
CxOUT  
CxVIN- > CxVIN+  
CxVIN- < CxVIN+  
CxVIN- > CxVIN+  
CxVIN- < CxVIN+  
0
0
1
1
0
1
1
0
8.2.2  
COMPARATOR INPUT SELECTION  
The CxCH<1:0> bits of the CMxCON0 register direct  
one of four analog input pins to the comparator  
inverting input.  
Note:  
To use CxIN+ and CxIN- pins as analog  
inputs, the appropriate bits must be set in  
the ANSEL and ANSELH registers and the  
corresponding TRIS bits must also be set  
to disable the output drivers.  
8.3  
Comparator Response Time  
The comparator output is indeterminate for a period of  
time after the change of an input source or the selection  
of a new reference voltage. This period is referred to as  
the response time. The response time of the  
comparator differs from the settling time of the voltage  
reference. Therefore, both of these times must be  
considered when determining the total response time  
to a comparator input change. See the Comparator and  
Voltage Reference specifications in Section 17.0  
“Electrical Specifications” for more details.  
8.2.3  
COMPARATOR REFERENCE  
SELECTION  
Setting the CxR bit of the CMxCON0 register directs an  
internal voltage reference or an analog input pin to the  
non-inverting input of the comparator. See  
Section 8.10 “Comparator Voltage Reference” for  
more information on the internal Voltage Reference  
module.  
8.2.4  
COMPARATOR OUTPUT  
SELECTION  
The output of the comparator can be monitored by  
reading either the CxOUT bit of the CMxCON0 register  
or the MCxOUT bit of the CM2CON1 register. In order  
to make the output available for an external connection,  
the following conditions must be true:  
• CxOE bit of the CMxCON0 register must be set  
• Corresponding TRIS bit must be cleared  
• CxON bit of the CMxCON0 register must be set  
© 2007 Microchip Technology Inc.  
Preliminary  
DS41291D-page 85  
 复制成功!