EXTERNAL INTERRUPT

DESCRIPTION

There are tw o sources of interrupts the ONITR statement respond s to: Inter nal and exter nal. Exter nal interr upts are off -card. Internal interrupts are from the counter .

External interrupts are used to "w ake-up" the card from any of the IDLE modes. This feature is useful in power conserving m odes.

Signals to P2-ISOA and P2-ISOB are optically isolated. P2-IN T is a non-iso lated, TTL input. Only 1 inter rupt is selected. Available inte rrup ts are show n in the table below.

W8 P in

Description

1-2

External TTL level through P2 (INT)

 

or optically isolated through P2 (ISOA

 

& ISO B)

3-4

Carry or borr ow pulse from counter

5-6

Carry pulse from counter

7-8

Borrow pulse from counter

ONINT selection is through jumper W8. This chapter descr ibes using exter nal inter rupts P 2-IN T or ISOA /B. When a counter is used, then external interr upts may not be used. See Chapter 14 , C ounter Inputs for more information.

External interrupt at P2-INT is TTL level compatible. Bringing this line low generates an interrupt when ONITR is enabled.

OPTICALLY ISOLATED INTERRUPT

ISOA and ISOB provide an isolated, higher voltage input. Neither input is connected to ground or + 5V and is isolated to the card by at least 500 volts.

An external voltage of at least 3.5 volts, any polarity, will generate an interrupt. Higher voltages may be used provided a ser ies resistor is in line to the supply. Use the following formula to determine the series resistor needed.

Rs = (Vi - 6) / .005

Where: Vi = input voltage

No series resistor is needed when Rs is negative.

SECTION 12

INTERRUPT CHARACTERISTICS

Interrupts are negative going edge sensitive. This means an interrupt is detected when P2-INT goes low or when a voltage is applied to P2-ISOA and ISOB for at least 10 micro-seconds. To detect a subsequent interrupt, the line must go high at P2-INT or voltage removed at P 2- ISOA/ B for at least 10 micro -seconds.

The status of the interrupt or ISOA/B line is read using the following statement:

100 A = LINE(8)

When A = 1, P 2-INT is high or no v oltage is applied to ISOA /B.

The P2-INT goes to the output from the opto-isolator I1. Since this line goes to a 10K ohm pull- up resistor, additional devices can generate an interrupt only if they are "wired -or" .

PROGRAM EXAMPLE

The following program enables interrupts and goes to a routine to service it . Jumper W8[1- 2] and bring P2- INT to ground to see this example work.

10ONITR 500

30GOTO 30

500 PRINT "Got Interrupt"

510 RETI

Line 510 is necessary to re-enable all interru pts. If th is line is not executed, but a RETURN is used, then

ONT ICK is also d isabled. If your pr ogram requir ements require disabling all interrupts for a time, then the RETI statement can be executed within any subroutine to re-

Page 12-1 RPC-320

Page 44
Image 44
Remote Technologies RPC-320 manual Optically Isolated Interrupt, Interrupt Characteristics, Program Example