10 REM ------------------------------------------------------------- 20 REM Genrad 1689 Digibridge & PC-488 example program 30 REM ------------------------------------------------------------- 31 ' The Digibridge requires some special commands, due to its slightly 32 ' non-standard use of the IEEE-488 interface. First, it requires 33 ' that remote enable be turned on right after initializing. 34 ' Second, it requires an Unlisten command after each message. 35 ' 36 ' Because special command sequences are needed, TRANSMIT is used. 37 ' TRANSMIT provides more detailed control over the interface than 38 ' SEND. 39 DEFINT A-Z 42 DEF SEG=0 ' find IEEE interface code memory location 43 IEEE=PEEK(&H182)+256*PEEK(&H183) 44 IF IEEE=0 THEN PRINT "BASIC488 not installed" : STOP 45 DEF SEG=IEEE 50 INIT=0 : TRANSMIT=3 : ENTER=21 ' PC-488 commands 60 MY.ADDR=21 : SYSTEM.CONTROL=0 ' Initialize IEEE-488 65 DIGIBRIDGE=3 ' Address of Digibridge 70 CALL INIT (MY.ADDR,SYSTEM.CONTROL) 80 REN$="REN" ' Enable remote control first 90 CALL TRANSMIT (REN$,STATUS) 100 M$="S0X4G0" ' Command for Digibridge 110 GOSUB 1000 ' Send command 120 R$=SPACE$(17) ' Receive data 130 CALL ENTER (R$,LENGTH,DIGIBRIDGE,STATUS) 140 PRINT "MEASUREMENT IS: ";R$ ' Print result 150 END 1000 '--- send a command to digibridge (requires trailing UNLISTEN) 1010 ST$="LISTEN 3 MTA DATA '"+M$+"' UNL" 1020 CALL TRANSMIT (ST$,STATUS) 1030 RETURN