Texas Instruments MSP50C6xx User Manual

Page 338

Advertising
background image

C– – Efficiency

5-42

change is the table of interrupt vectors. At the top of the file is a list of interrupt
labels. The ones that are not used are commented out with a semicolon.

;

external

DAC_ISR

;

external

timer1_isr

external

timer2_isr

;

external

pd2

;

external

pd3

;

external

portF

;

external

pd4

;

external

pd5

At the bottom of the file are a dummy interrupt routine and the interrupt vector table.

pd2
pd3
portF
pd4
pd5
DAC_ISR
timer1_isr
;timer2_isr

nop
INTE
iret
AORG 07F00h
DATA _EQ,_NE,_LT,_LE,_GE,_GT,_ULT,_ULE,_UGE,_UGT,_LNEG
DATA _EQS,_NES,_LTS,_LES,_GES,_GTS,_ULTS,_ULES,_UGES,_UGTS
DATA _DIV,_DIVU,_EXTB,_ASR
AORG

07FF0h

data

DAC_ISR

; the DAC interrupt is used for synthesis

data

timer1_isr ; this is the timer1 isr.

data

timer2_isr

; this is the timer2 isr.

data

pd2

data

pd3

data

portF

data

pd4

data

pd5

aorg

0x7ffe

data

0x1ffff

;ROM protection word (0x7ffe)

data

init614

;reset address (0x7fff)

Notice that timer2 was not commented out at the top of the file but it is
commented out in the dummy interrupt routine. External interrupt routines are
switched on by not commenting them at the external statement at the top of
the file and commenting them in the dummy interrupt routine. They are
switched off by commenting their external statement at the top and not
commenting the label in the dummy routine at the bottom. Note that this does
not enable or disable an interrupt, it just controls what is executed when it fires.
Interrupt routines will be enabled and disabled in the next file, but it is important
to provide a dummy routine for unused interrupts in case a programming error
causes them to be accidentally enabled.

Advertising