首页| 行业标准| 论文文档| 电子资料| 图纸模型
购买积分 购买会员 激活码充值

您现在的位置是:团子下载站 > 电子元器件应用 > PIC17C42中断时存储和恢复的情况(实现参数堆栈)

PIC17C42中断时存储和恢复的情况(实现参数堆栈)

  • 资源大小:138
  • 上传时间:2021-06-21
  • 下载次数:0次
  • 浏览次数:28次
  • 资源积分:1积分
  • 标      签: PIC17C42

资 源 简 介

The PIC17C42 has a 16 level deep hardware stack. The program counter is pushed into this stack on interrupts and subroutine calls. However, other key registers are not saved to the stack. Registers such as WREG,ALUSTA (which has carry, zero and other flag bits) and the bank select register (BSR) must be saved in an interrupt service routine. The following macros, PUSH and POP implement a parameter stack in data memory to save these register values.The indirect addressing register, FSR0, is used to implement this parameter stack. It is assumed that FSR0 and its control bits are not used or modified elsewhere.The stack pointer (FSR0) is initialized at the highest RAM location (FFh).
VIP VIP