
RPBASIC-52 PROGRAMMING GUIDE
2-72
ONITR
Syntax: ONITR number,line number
ONITR number
ONITR line number
ONITR
Where: number = interrupt line. This is card dependent. Refer to your hardw are manual.
line number = Subroutine line number to go.
Function: Branches to a service subrou tine on an external or counter interrupt.
Mode: Run
Use: ONITR 0,5000 Executes a subroutine at line 5000 on hardware interrupt 0.
Cards: Basic com mand avai lable fo r all cards. number may or m ay not be used. Refer to your hardw are
manual for more information.
DESCRIPTION
ONITR provides a way to respond to hardware interrupts. It replaces ONEX1 in BASIC-52. Interrupts can
be external through the opto isolator, external TTL, or any number of card dependent sources. The number of
interrupts available depend upon the card type. Refer to your hardware manual for specific information.
The first two syntaxes are for the RPC-330. The second two are for the RPC-320 and RPC-52.
Hardware interrupts are edge sensitive and latched. When the current R PBASIC program statement is
completed, execution branches to the subroutine specified by line number. Interrupt latency is determined by
the current pro gram statem ent. Th e IDL E com man d provides the fastest respon se to an interrup t.
You must exit an ONITR using the RETI statement. Failure to do so prevents other ONITR and ONTICK
interrupts.
To turn off ON ITR, refer to the card's hardware m anual.
ONITR can be interrupted only by an ONTICK interrupt. Also, ONITR can interrupt any other multi-tasking
statement (ON LINE, ON C OM$, ON KEY PAD, etc.) but cannot be interrupted by them. An interrupt pulse
to the card must be at least 1 m icro-second long , low level.
RELATED
RETI
ERRORS
none
Komentáře k této Příručce