English
Language : 

COP888GD Datasheet, PDF (27/42 Pages) National Semiconductor (TI) – 8-Bit CMOS ROM Based Microcontrollers with 16k
Interrupts (Continued)
Programming Example: External Interrupt
WAIT:
PSW
CNTRL
RBIT
RBIT
SBIT
SBIT
SBIT
JP
.
.
.
.=0FF
VIS
=00EF
=00EE
0,PORTGC
0,PORTGD
IEDG, CNTRL
EXEN, PSW
GIE, PSW
WAIT
.
.
.
.=01FA
.ADDRW SERVICE
INT_EXIT:
SERVICE:
.
.
RETI
.
.
RBIT
EXPND, PSW
.
.
.
JP INT_EXIT
; G0 pin configured Hi-Z
; Ext interrupt polarity; falling edge
; Enable the external interrupt
; Set the GIE bit
; Wait for external interrupt
; The interrupt causes a
; branch to address 0FF
; The VIS causes a branch to
;interrupt vector table
; Vector table (within 256 byte
; of VIS inst.) containing the ext
; interrupt service routine
; Interrupt Service Routine
; Reset ext interrupt pend. bit
; Return, set the GIE bit
27
www.national.com