| 전자부품 데이터시트 검색엔진 |
|
PIC17C44-08/P 데이터시트(PDF) 27 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC17C44-08/P 데이터시트(HTML) 27 Page - Microchip Technology |
|
27 / 240 page ![]() © 1996 Microchip Technology Inc. DS30412C-page 27 PIC17C4X 5.9 Context Saving During Interrupts During an interrupt, only the returned PC value is saved on the stack. Typically, users may wish to save key reg- isters during an interrupt; e.g. WREG, ALUSTA and the BSR registers. This requires implementation in soft- ware. Example 5-1 shows the saving and restoring of infor- mation for an interrupt service routine. The PUSH and POP routines could either be in each interrupt service routine or could be subroutines that were called. Depending on the application, other registers may also need to be saved, such as PCLATH. EXAMPLE 5-1: SAVING STATUS AND WREG IN RAM ; ; The addresses that are used to store the CPUSTA and WREG values ; must be in the data memory address range of 18h - 1Fh. Up to ; 8 locations can be saved and restored using ; the MOVFP instruction. This instruction neither affects the status ; bits, nor corrupts the WREG register. ; ; PUSH MOVFP WREG, TEMP_W ; Save WREG MOVFP ALUSTA, TEMP_STATUS ; Save ALUSTA MOVFP BSR, TEMP_BSR ; Save BSR ISR : ; This is the interrupt service routine : POP MOVFP TEMP_W, WREG ; Restore WREG MOVFP TEMP_STATUS, ALUSTA ; Restore ALUSTA MOVFP TEMP_BSR, BSR ; Restore BSR RETFIE ; Return from Interrupts enabled |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |