DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC16CR620A-04E/SS View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC16CR620A-04E/SS
Microchip
Microchip Technology 
PIC16CR620A-04E/SS Datasheet PDF : 128 Pages
First Prev 51 52 53 54 55 56 57 58 59 60 Next Last
PIC16C62X
TABLE 9-6: SUMMARY OF INTERRUPT REGISTERS
Address Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on POR
Reset
Value on all
other
RESETS(1)
0Bh
0Ch
8Ch
Note
INTCON GIE
PEIE
T0IE
INTE
RBIE
T0IF
INTF
RBIF
0000 000x 0000 000u
PIR1
CMIF
-0-- ---- -0-- ----
PIE1
CMIE
-0-- ---- -0-- ----
1: Other (non Power-up) Resets include MCLR Reset, Brown-out Reset and Watchdog Timer Reset during normal
operation.
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
registers during an interrupt (e.g., W register and
STATUS register). This will have to be implemented in
software.
Example 9-3 stores and restores the STATUS and W
registers. The user register, W_TEMP, must be defined
in both banks and must be defined at the same offset
from the bank base address (i.e., W_TEMP is defined
at 0x20 in Bank 0 and it must also be defined at 0xA0
in Bank 1). The user register, STATUS_TEMP, must be
defined in Bank 0. The Example 9-3:
• 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-3:
SAVING THE STATUS
AND W REGISTERS IN
RAM
MOVWF
SWAPF
BCF
MOVWF
:
:
:
SWAPF
MOVWF
SWAPF
SWAPF
W_TEMP
STATUS,W
STATUS,RP0
STATUS_TEMP
;copy W to temp register,
;could be in either bank
;swap status to be saved
into W
;change to bank 0 regardless
;of current bank
;save status to bank 0
;register
(ISR)
STATUS_TEMP,
W
STATUS
W_TEMP,F
W_TEMP,W
;swap STATUS_TEMP register
;into W, sets bank to origi-
nal
;state
;move W into STATUS register
;swap W_TEMP
;swap W_TEMP into W
2003 Microchip Technology Inc.
DS30235J-page 57

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]