PICDEM™ 17 Demonstration Board User’s Guide
DS39024B-page 28
2001 Microchip Technology Inc.
4.5
Interrupt Code File
The interrupt code file is used to setup the interrupt vectors for the INT pin,
TMR0 Overflow, T0CKI pin, and the Peripheral Interrupt vector. Included with
this code is the context save and restore routines that are called before and
after the interrupt service routines. The “real” interrupt vectors of the
PIC17C756A located at addresses 0008h, 0010h, 0018h, and 0020h have
been remapped to address location 4008h, 4010h, 4018h, and 4020h. The
original vectors have code that simply writes the associated vector address of
40??h to the PCLATH:PCL registers. This file would need to be assembled
and linked in with the other files in the project.
;*****************************************************************
;** PIC17C756A Interrupt Support File, Version 1.10
;** L a r g e M o d e l
;** PIC1DEM-17 Workshop Demo Board Version
;** (c) Copyright 1997 Microchip Technology
;*****************************************************************
list p=17c756
;
;------------------------ Equates --------------------------;
PCL equ 0x02
PCLATH equ 0x03
ALUSTA equ 0x04
BSR equ 0x0F
WREG equ 0x0A
SAVEINT_START equ 0x00FC ;Start of shared region for
;int.saving
;***********************************************************;
INTSAVE_SEC UDATA SAVEINT_START
;-----------------------------------------------------------;
; Save registers that absolutely need to be saved!
save_BSR RES 1 ;Used for saving the BSR - BANK 0 ONLY
save_WREG RES 1 ;WREG ;SPACE RESERVED ALSO IN ALL BANKS
save_ALUSTA RES 1 ;ALUSTA ;SPACE RESERVED ALSO IN ALL BANKS
save_PCLATH RES 1 ;PCLATH ;SPACE RESERVED ALSO IN ALL BANKS
;-----------------------------------------------------------;
;***********************************************************;
; save_ALUSTA and save_PCLATH are saved in any of the banks.
; We therefore must reserve the corresponding locations in ALL
; banks. Since BSR and WREG are guaranteed to be saved in
; bank 0, they only need storage locations in bank 0.
;-- Bank 1
INTSAVE_SEC1 UDATA SAVEINT 0x101
RES 1 ;WREG
RES 1 ;ALUSTA
RES 1 ;CPUSTA
;-- Bank 2
INTSAVE_SEC2 UDATA SAVEINT 0x201
RES 1 ;WREG
Содержание Picdem 17
Страница 1: ...PICDEM 17 DEMONSTRATION BOARD USER S GUIDE 2001 Microchip Technology Inc DS39024B ...
Страница 19: ... 2001 Microchip Technology Inc DS39024B page 13 Using the PICDEM 17 Monitor Figure 2 5 Running Diagnostics ...
Страница 24: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 18 2001 Microchip Technology Inc NOTES ...
Страница 28: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 22 2001 Microchip Technology Inc NOTES ...
Страница 40: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 34 2001 Microchip Technology Inc NOTES ...
Страница 62: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 56 2001 Microchip Technology Inc NOTES ...
Страница 80: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 74 2001 Microchip Technology Inc NOTES ...
Страница 82: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 76 2001 Microchip Technology Inc A 1 SCHEMATIC 1 ...
Страница 83: ... 2001 Microchip Technology Inc DS39024B page 77 PICDEM 17 Demonstration Board Schematics A 2 SCHEMATIC 2 ...
Страница 84: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 78 2001 Microchip Technology Inc A 3 SCHEMATIC 3 ...
Страница 85: ... 2001 Microchip Technology Inc DS39024B page 79 PICDEM 17 Demonstration Board Schematics A 4 SCHEMATIC 4 ...
Страница 86: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 80 2001 Microchip Technology Inc NOTES ...
Страница 90: ...PICDEM 17 Demonstration Board User s Guide DS39024B page 84 2001 Microchip Technology Inc NOTES ...
Страница 91: ... 2001 Microchip Technology Inc DS39024B page 85 Floppy Disk Contents NOTES ...