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

PIC16C715-04E/SS 参数 Datasheet PDF下载

PIC16C715-04E/SS图片预览
型号: PIC16C715-04E/SS
PDF下载: 下载PDF文件 查看货源
内容描述: 8位CMOS微控制器与A / D转换器 [8-Bit CMOS Microcontrollers with A/D Converter]
分类和应用: 转换器微控制器
文件页数/大小: 176 页 / 1596 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC16C715-04E/SS的Datasheet PDF文件第60页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第61页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第62页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第63页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第65页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第66页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第67页浏览型号PIC16C715-04E/SS的Datasheet PDF文件第68页  
PIC16C71X  
8.6  
Context Saving During Interrupts  
During an interrupt, only the return PC value is saved  
on the stack.Typically, users may wish to save key reg-  
isters during an interrupt i.e., W register and STATUS  
register. This will have to be implemented in software.  
Example 8-1 stores and restores the STATUS and W  
registers. The user register, STATUS_TEMP, must be  
defined in bank 0.  
The example:  
a) Stores the W register.  
b) Stores the STATUS register in bank 0.  
c) Executes the ISR code.  
d) Restores the STATUS register (and bank select  
bit).  
e) Restores the W register.  
EXAMPLE 8-1: SAVING STATUS AND W REGISTERS IN RAM  
MOVWF  
SWAPF  
MOVWF  
:
W_TEMP  
STATUS,W  
STATUS_TEMP  
;Copy W to TEMP register, could be bank one or zero  
;Swap status to be saved into W  
;Save status to bank zero STATUS_TEMP register  
:(ISR)  
:
SWAPF  
STATUS_TEMP,W  
;Swap STATUS_TEMP register into W  
;(sets bank to original state)  
;Move W into STATUS register  
;Swap W_TEMP  
MOVWF  
SWAPF  
SWAPF  
STATUS  
W_TEMP,F  
W_TEMP,W  
;Swap W_TEMP into W  
DS30272A-page 64  
1997 Microchip Technology Inc.  
 
 复制成功!