Remote Technologies RPC-320 manual Optically Isolated Interrupt, Interrupt Characteristics

Page 44

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

Image 44
Contents Revision REVTrademarks Table of Contents Sect ION 11 Watchdog Timer Description External ResetInterrupt Characteristics Sect ION 13 Multi Mode Counter DescriptionSoftware Revision History Overview SectionDescription Manual OrganizationSymbols and Term inology Technical SupportOverview Section System layoutEquipment Operating PrecautionsIntroduction Using a PC Using a TerminalFirst Time Operation Uploading and Downloading ProgramsEditing programs and program ming hints Where to GO from Here TroubleshootingSaving Programs Saving a ProgramEprom W3 autorun jumperAutorunning Preventing AutorunLoading a Program Changing Eprom SizeCommands Alternate EpromsBload BsaveCOM1 Serial Port Serial PortsCOM0 Serial Port RS-422/485 Termination network Serial Ports SectionRS-422/485 Operating Information Multidrop Network Accessing Serial BuffersTwo wire RS-485 Serial Port PIN OUT Accessing COM0 and COM1Disabling CONTROL-C RXD CTS Battery Backup Checking the batteryRAM Memory Changing MemoryReserved Memory Storing Variables in RAMAssembly Language Interface Block Data TransferDigital Por t J3 Digital and Opto PortsDigital I/O Ports Digital I/O Commands Digital Port P6High Current Port L8 Optically Isolated InputHigh Current Output Digital I/ O prog ramm ing exam ple Interfacing to switches and other devicesInterfacing Digital I/O to an opto-module rack Ls e Width Modulation PWM Digital and Opto Ports Section Conne ctor pin ou t J3Config Line CountLine Line BM E Setting Date and TimeDate Section Programming Example Connecting DisplaysWriting to the Display Display Connector PIN OUT Display TypesKeypad Port Program explanationKeypad Port PIN OUT J5 Connecting Analog Inputs Analog InputInitialization Overvoltage conditionsAcquiring Analog Data Differential ModeExamples u sing CON FIG AIN Temperature Measurement Noise NotesAnalog Input Section Data logging on a timer tick Measuring Higher VoltagesMeasuring 4-20 mA current loops Converting Analog MeasurementsAmplifiers Calibration Watchdog Timer External ResetProgram Example Interrupt CharacteristicsOptically Isolated Interrupt Optically isolated and TTL interrup ts Programming GNDLoad GateCOU NT0 Power Management Further Power ReductionPower Management Section Program Examp leElectrical Specifications Technical InformationMechanical Specifications Memory and I/O Bank MAPJumper Descriptions Bank