Jameco Electronics 2000, 3000 manual Reg Name, Reg Address, Bits 7,6, Bits 5,4, Bits 3,2, Bits 1,0

Models: 3000 2000

1 349
Download 349 pages 5.72 Kb
Page 109
Image 109
Reg Name

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

edge triggered

interrupt

 

 

 

00-disabled

00-disabled

00-disable

 

 

 

10-rising

10-rising

01-pri 1

 

 

 

01-falling

01-falling

10-pri 2

 

 

 

11-both

11-both

11-pri 3

 

 

 

 

 

 

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

100

Rabbit 3000 Microprocessor

Page 109
Image 109
Jameco Electronics 2000, 3000 manual Reg Name, Reg Address, Bits 7,6, Bits 5,4, Bits 3,2, Bits 1,0