Jameco Electronics 3000 User Manual

Page of 349
100
Rabbit 3000 Microprocessor
7.10.2  Interrupt Vectors: INT0 - EIR,0x00/INT1 - EIR,0x08
When it is desired to expand the number of interrupts for additional peripheral devices, the 
user should use the interrupt routine to dispatch interrupts to other virtual interrupt rou-
tines. Each additional interrupting device will have to signal the processor that it is 
requesting an interrupt. A separate signal line is needed for each device so that the proces-
sor can determine which devices are requesting an interrupt.
The following code shows how the interrupt service routines can be written.
; External interrupt Routine #0 (programmed priority could be 3)
int2:
    PUSH IP  ; save interrupt priority
    IPSET 1  ; set to priority really desired (1, 2, etc.)
; insert body of interrupt routine here
;
    OPP IP   ; get back entry priority
    IPRES    ; restore interrupted routine’s priority
    RET      ; return from interrupt
Table 7-16.  Control Registers for External Interrupts
Reg Name
Reg Address
Bits 7,6
Bits 5,4
Bits 3,2
Bits 1,0
I0CR
10011000
xx
INT0B PE4
INT0A PE0
Enb INT0
I1CR
10011001
xx
INT1B PE5
INT1A PE1
Enb INT1
edge triggered
00-disabled
10-rising
01-falling
11-both
edge triggered
00-disabled
10-rising
01-falling
11-both
interrupt
00-disable
01-pri 1
10-pri 2
11-pri 3