参数资料
型号: PIC16C620A-04/P301
元件分类: 微控制器/微处理器
英文描述: 8-BIT, OTPROM, 4 MHz, RISC MICROCONTROLLER, PDIP18
封装: 0.300 INCH, PLASTIC, DIP-18
文件页数: 62/108页
文件大小: 674K
代理商: PIC16C620A-04/P301
1998 Microchip Technology Inc.
Preliminary
DS30235G-page 57
PIC16C62X
9.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 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 dened
in both banks and must be dened at the same offset
from the bank base address (i.e., W_TEMP is dened
at 0x20 in Bank 0 and it must also be dened at 0xA0
in Bank 1). The user register, STATUS_TEMP, must be
dened in Bank 0. The Example 9-1:
Stores the W register
Stores the STATUS register in Bank 0
Executes the ISR code
Restores the STATUS (and bank select bit
register)
Restores the W register
EXAMPLE 9-1:
SAVING THE STATUS AND
W REGISTERS IN RAM
MOVWF
W_TEMP
;copy W to temp register,
;could be in either bank
SWAPF
STATUS,W
;swap status to be saved into W
BCF
STATUS,RP0
;change to bank 0 regardless
;of current bank
MOVWF
STATUS_TEMP
;save status to bank 0
;register
:
(ISR)
:
SWAPF
STATUS_TEMP,W
;swap STATUS_TEMP register
;into W, sets bank to original
;state
MOVWF
STATUS
;move W into STATUS register
SWAPF
W_TEMP,F
;swap W_TEMP
SWAPF
W_TEMP,W
;swap W_TEMP into W
9.7
Watchdog Timer (WDT)
The watchdog timer is a free running on-chip RC oscil-
lator which does not require any external components.
This RC oscillator is separate from the RC oscillator of
the CLKIN pin. That means that the WDT will run, even
if the clock on the OSC1 and OSC2 pins of the device
has been stopped, for example, by execution of a
SLEEP
instruction. During normal operation, a WDT
time-out generates a device RESET. If the device is in
SLEEP mode, a WDT time-out causes the device to
wake-up and continue with normal operation. The WDT
can be permanently disabled by programming the con-
guration bit WDTE as clear (Section 9.1).
9.7.1
WDT PERIOD
The WDT has a nominal time-out period of 18 ms, (with
no prescaler). The time-out periods vary with tempera-
ture, VDD and process variations from part to part (see
DC specs). If longer time-out periods are desired, a
prescaler with a division ratio of up to 1:128 can be
assigned to the WDT under software control by writing
to the OPTION register. Thus, time-out periods up to
2.3 seconds can be realized.
The CLRWDT and SLEEP instructions clear the WDT
and the postscaler, if assigned to the WDT, and prevent
it from timing out and generating a device RESET.
The TO bit in the STATUS register will be cleared upon
a Watchdog Timer time-out.
9.7.2
WDT PROGRAMMING CONSIDERATIONS
It should also be taken in account that under worst case
conditions (VDD = Min., Temperature = Max., max.
WDT prescaler) it may take several seconds before a
WDT time-out occurs.
相关PDF资料
PDF描述
PIC16C620A-20/P301 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PDIP18
PIC16LC620A-20/P 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PDIP18
PIC16C621-20/SS 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PDSO20
PIC16C622T-20I/SO 8-BIT, OTPROM, 20 MHz, RISC MICROCONTROLLER, PDSO18
PIC16LCR620AT-04I/SO 8-BIT, MROM, 4 MHz, RISC MICROCONTROLLER, PDSO18
相关代理商/技术参数
参数描述
PIC16C620A-20/P 功能描述:8位微控制器 -MCU .875KB 96 RAM 13 I/O 20 MHz PDIP18 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C620A-20/P 制造商:Microchip Technology Inc 功能描述:IC 8BIT CMOS MCU 16C620 DIP18
PIC16C620A-20/SO 功能描述:8位微控制器 -MCU .875KB 96 RAM 13 I/O 20 MHz SOIC18 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C620A-20/SS 功能描述:8位微控制器 -MCU .875KB 96 RAM 13 I/O 20 MHz SSOP20 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C620A-20E/P 功能描述:8位微控制器 -MCU .875KB 96 RAM 13 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT