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

PIC18C452-I/L 参数 Datasheet PDF下载

PIC18C452-I/L图片预览
型号: PIC18C452-I/L
PDF下载: 下载PDF文件 查看货源
内容描述: 高性能微控制器,10位A / D [High-Performance Microcontrollers with 10-Bit A/D]
分类和应用: 微控制器
文件页数/大小: 296 页 / 4835 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18C452-I/L的Datasheet PDF文件第61页浏览型号PIC18C452-I/L的Datasheet PDF文件第62页浏览型号PIC18C452-I/L的Datasheet PDF文件第63页浏览型号PIC18C452-I/L的Datasheet PDF文件第64页浏览型号PIC18C452-I/L的Datasheet PDF文件第66页浏览型号PIC18C452-I/L的Datasheet PDF文件第67页浏览型号PIC18C452-I/L的Datasheet PDF文件第68页浏览型号PIC18C452-I/L的Datasheet PDF文件第69页  
PIC18CXX2  
When the IPEN bit is cleared (default state), the inter-  
rupt priority feature is disabled and interrupts are com-  
7.0  
INTERRUPTS  
The PIC18CXX2 devices have multiple interrupt  
sources and an interrupt priority feature that allows  
each interrupt source to be assigned a high priority  
level or a low priority level. The high priority interrupt  
vector is at 000008h and the low priority interrupt vector  
is at 000018h. High priority interrupt events will over-  
ride any low priority interrupts that may be in progress.  
patible with PICmicro mid-range devices.  
In  
compatibility mode, the interrupt priority bits for each  
source have no effect. INTCON<6> is the PEIE bit,  
which enables/disables all peripheral interrupt sources.  
INTCON<7> is the GIE bit, which enables/disables all  
interrupt sources. All interrupts branch to address  
000008h in compatibility mode.  
There are ten registers which are used to control inter-  
rupt operation. These registers are:  
When an interrupt is responded to, the Global Interrupt  
Enable bit is cleared to disable further interrupts. If the  
IPEN bit is cleared, this is the GIE bit. If interrupt prior-  
ity levels are used, this will be either the GIEH or GIEL  
bit. High priority interrupt sources can interrupt a low  
priority interrupt.  
• RCON  
• INTCON  
• INTCON2  
• INTCON3  
• PIR1, PIR2  
• PIE1, PIE2  
• IPR1, IPR2  
The return address is pushed onto the stack and the  
PC is loaded with the interrupt vector address  
(000008h or 000018h). Once in the interrupt service  
routine, the source(s) of the interrupt can be deter-  
mined by polling the interrupt flag bits. The interrupt  
flag bits must be cleared in software before re-enabling  
interrupts to avoid recursive interrupts.  
It is recommended that the Microchip header files sup-  
plied with MPLAB be used for the symbolic bit names  
in these registers. This allows the assembler/compiler  
to automatically take care of the placement of these bits  
within the specified register.  
The "return from interrupt" instruction, RETFIE, exits  
the interrupt routine and sets the GIE bit (GIEH or GIEL  
if priority levels are used), which re-enables interrupts.  
Each interrupt source has three bits to control its oper-  
ation. The functions of these bits are:  
For external interrupt events, such as the INT pins or  
the PORTB input change interrupt, the interrupt latency  
will be three to four instruction cycles. The exact  
latency is the same for one or two cycle instructions.  
Individual interrupt flag bits are set regardless of the  
status of their corresponding enable bit or the GIE bit.  
• Flag bit to indicate that an interrupt event  
occurred  
• Enable bit that allows program execution to  
branch to the interrupt vector address when  
the flag bit is set  
• Priority bit to select high priority or low priority  
The interrupt priority feature is enabled by setting the  
IPEN bit (RCON<7>). When interrupt priority is  
enabled, there are two bits which enable interrupts glo-  
bally. Setting the GIEH bit (INTCON<7>) enables all  
interrupts that have the priority bit set. Setting the GIEL  
bit (INTCON<6>) enables all interrupts that have the  
priority bit cleared. When the interrupt flag, enable bit  
and appropriate global interrupt enable it are set, the  
interrupt will vector immediately to address 000008h or  
000018h depending on the priority level. Individual  
interrupts can be disabled through their corresponding  
enable bits.  
7/99 Microchip Technology Inc.  
Preliminary  
DS39026B-page 65  
 复制成功!