PIC16C641 Datasheet

  • PIC16C641

  • 8-Bit EPROM Microcontrollers with Analog Comparators

  • 661.21KB

  • 137页

  • MICROCHIP   MICROCHIP

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC16C64X & PIC16C66X
9.6
Context Saving During Interrupts
Example 9-1:
Stores the W register regardless of current bank
Stores the STATUS register in Bank 0
Executes the ISR code
Restores the STATUS (and bank select bit
register)
鈥?Restores the W register
鈥?/div>
鈥?/div>
鈥?/div>
鈥?/div>
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 e.g. W register and STATUS
register. This will have to be implemented in software.
Example 9-1 stores and restores the STATUS and W
registers. The user register, W_TEMP, must be de铿乶ed
in both banks and must be de铿乶ed at the same offset
from the bank base address (i.e., W_TEMP is de铿乶ed
at 0x70 - 0x7F in Bank 0). The user register,
STATUS_TEMP, must be de铿乶ed in Bank 0.
EXAMPLE 9-1:
SAVING THE STATUS AND W REGISTERS IN RAM
Copy W to a Temporary Register regardless of current bank
Swap STATUS nibbles and place into W register
Change to Bank 0 regardless of current bank
Save STATUS to a Temporary register in Bank 0
Routine)
Swap original STATUS register value into W (restores original bank)
Restore STATUS register from W register
Swap W_Temp nibbles and return value to W_Temp
Swap W_Temp to W to restore original W value without affecting STATUS
MOVWF
W_TEMP
;
SWAPF
STATUS,W
;
BCF
STATUS,RP0
;
MOVWF
STATUS_TEMP
;
:
: (Interrupt Service
:
SWAPF
STATUS_TEMP,W ;
MOVWF
STATUS
;
SWAPF
W_TEMP,F
;
SWAPF
W_TEMP,W
;
DS30559A-page 68
Preliminary
1996 Microchip Technology Inc.

PIC16C641 PDF文件相关型号

PIC16C642

PIC16C641相关型号PDF文件下载

  • 型号
    版本
    描述
    厂商
    下载
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with EEPROM Data Memory
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with A/D Converter and EEP...
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    Microcontroller
    MICROCHIP
  • 英文版
    Microcontroller 
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM-Based 8-Bit CMOS Microcontroller
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    ETC
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    28-Pin Programmable Mixed Signal Controller
    Microchip
  • 英文版
    EPROM Memory Programming Specification
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM/ROM-Based 8-Bit CMOS Microcontroller Series
    MICROCHIP

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!