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

PIC18F4320-I/P 参数 Datasheet PDF下载

PIC18F4320-I/P图片预览
型号: PIC18F4320-I/P
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚高性能,增强型闪存微控制器与10位A / D和纳瓦技术 [28/40/44-Pin High-Performance, Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology]
分类和应用: 闪存微控制器
文件页数/大小: 388 页 / 6899 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18F4320-I/P的Datasheet PDF文件第222页浏览型号PIC18F4320-I/P的Datasheet PDF文件第223页浏览型号PIC18F4320-I/P的Datasheet PDF文件第224页浏览型号PIC18F4320-I/P的Datasheet PDF文件第225页浏览型号PIC18F4320-I/P的Datasheet PDF文件第227页浏览型号PIC18F4320-I/P的Datasheet PDF文件第228页浏览型号PIC18F4320-I/P的Datasheet PDF文件第229页浏览型号PIC18F4320-I/P的Datasheet PDF文件第230页  
PIC18F2220/2320/4220/4320  
FIGURE 20-3:  
COMPARATOR OUTPUT BLOCK DIAGRAM  
Port Pins  
MULTIPLEX  
+
-
CxINV  
To RA4 or  
RA5 Pin  
Bus  
Data  
Q
D
Read CMCON  
EN  
Q
Set  
CMIF  
bit  
D
From  
other  
Comparator  
EN  
CL  
Read CMCON  
Reset  
20.6 Comparator Interrupts  
Note:  
If a change in the CMCON register  
(C1OUT or C2OUT) should occur when a  
read operation is being executed (start of  
the Q2 cycle), then the CMIF (PIR  
registers) interrupt flag may not get set.  
The comparator interrupt flag is set whenever there is  
a change in the output value of either comparator.  
Software will need to maintain information about the  
status of the output bits, as read from CMCON<7:6>, to  
determine the actual change that occurred. The CMIF  
bit (PIR registers) is the Comparator Interrupt Flag. The  
CMIF bit is cleared by firmware. Since it is also possible  
to write a ‘1’ to this register, a simulated interrupt may  
be initiated.  
The user, in the Interrupt Service Routine, can clear the  
interrupt in the following manner:  
a) Any read or write of CMCON will end the  
mismatch condition.  
b) Clear flag bit CMIF.  
The CMIE bit (PIE registers) and the PEIE bit (INTCON  
register) must be set to enable the interrupt. In addition,  
the GIE bit must also be set. If any of these bits are  
clear, the interrupt is not enabled, though the CMIF bit  
will still be set if an interrupt condition occurs.  
A mismatch condition will continue to set flag bit CMIF.  
Reading CMCON will end the mismatch condition and  
allow flag bit CMIF to be cleared.  
DS39599C-page 224  
2003 Microchip Technology Inc.