Measurement Computing Micro 488/EX rev.2.1 User Manual
Page 39

Section 3
IEEE Operating Modes
3.5
As a bus Peripheral, the Micro488/EX must respond to the commands issued by
the Active Controller. The controller can, for example, address the Micro488/EX to
listen in preparation for sending data. There are two ways of detecting our being
addressed to listen: through the STATUS command, or by detecting an event with the
ARM
or ON
The STATUS 1 command can be used to watch for commands from the Active
Controller. The Operating Mode, which is a "P" while the Micro488/EX is a
Peripheral, will change to a "C" if the Active Controller Passes Control to the
Micro488/EX. The Addressed State will go from Idle ("I") to Listener ("L") or Talker
("T") if the Micro488/EX is addressed to listen or to talk, and will go back to Idle ("I")
when the Active Controller issues Unlisten (UNL), Untalk (UNT), or specifies another
talker (TAG). The Triggered ("T1") and Cleared ("C1") indicators will be set when the
Micro488/EX is triggered or cleared, and reset when STATUS 1 is read. The Address
Change indicator will be set ("G1") when the address state changes. These indicators
allow the program to sense the commands issued to the Micro488/EX by the Active
Controller. The following BASIC program fragment illustrates the use of the Address
Change and Addressed State indicators to communicate with the Active Controller:
First we check STATUS until it indicates that there has been an address change:
200 PRINT#1,"STATUS1"
210 INPUT#2 ST$
220 'Has there been no Address Change?
230 IF MID$(ST$,7,1)="0" THEN 200
240 'Are will still in the idle state?
250 STATE$=MID$(ST$,9,1)
260 IF STATE$="I" THEN 200
270 'Are we addressed to listen?
280 IF STATE$="L" THEN 400
290 'Are we addressed to talk?
300 IF STATE$="T" THEN 500
310 PRINT "BAD ADDRESSED STATE VALUE: ";ST$: STOP