tlup:
OPEN "com1:1200,n,8,1" FOR RANDOM AS #1
PRINT #1, "D1973D1973D1973BBBBBBBBBB";
t = 3: GOSUB 3000
WHILE LOC(1) > 0
jj$ = INPUT$(LOC(1), 1)
GOSUB 3000
WEND
PRINT "Monitor mode initialized..."
PRINT "Waiting 3 minutes for warm up..."
tm = TIMER
WHILE TIMER - tm < 180
IF INKEY$ <> "" THEN GOTO skip
WEND
skip:
PRINT "3 minutes has expired..."
FOR k = 1 TO 4
FOR j = 1 TO 4
SOUND 2000, 1
FOR i = 1 TO 1000: NEXT i
NEXT j
FOR i = 1 TO 2000: NEXT i
NEXT k
PRINT "Remove RF jumper then..."
PRINT "Set LM723 output to 5.000V...": GOSUB 1000
PRINT "Set ADC reference voltage to 1.0900V...": GOSUB 1000
PRINT "Set RF voltage to -2.150 (this depends on probe)...": GOSUB 1000
PRINT "-> replace rf jumper"
PRINT "ADC test: use hands to make diode voltage change..."
PRINT "--> hit key when through"
PRINT "Diode", "T0", "T1", "T2", "Zero"
GOSUB 2000
PRINT "Testing Balance Relay..."
PRINT " Does it BUZZZZ?????"
PRINT "--> hit a key when ready to continue"
WHILE INKEY$ <> "": WEND
WHILE INKEY$ = ""
PRINT #1, "89";
WEND
PRINT "Waiting for buffer to empty..."
PRINT #1, "I";
INPUT #1, a$
PRINT #1, "D";
PRINT "DAC test in progress": GOSUB 1000
klup: PRINT "Keyboard test: hit 0 1 2 3 4 5 6 7 8 9 MODE PRINT and GO keys"
PRINT #1, "G"
PRINT #1, "H";
INPUT #1, a$
IF a$ = "0123456789-." THEN PRINT "Keyboard OK": GOTO kok
SOUND 440, 2
PRINT "Keyboard test failed-- retry(Y/N)?"
klup2: a$ = INKEY$
IF a$ = "Y" THEN GOTO klup
IF a$ = "y" THEN GOTO klup
IF a$ = "n" THEN GOTO kok
IF a$ = "N" THEN GOTO kok
GOTO klup2
kok:
PRINT "Testing Aux Module..."
OPEN "i", #2, "c:\sb900\auxlog"
PRINT #1, "ADFBFB";
WHILE NOT EOF(2)
INPUT #2, b$
tm = TIMER
WHILE (TIMER - tm < 3) AND (LOC(1) < 1): WEND
IF LOC(1) > 0 THEN INPUT #1, a$
IF a$ <> b$ THEN GOTO mbad
WEND
t = 3: GOSUB 3000
IF LOC(1) > 0 THEN PRINT "Too Many entries": GOTO mbad
GOTO mok
mbad:
PRINT "############## Error in reading Aux Module!!!"
SOUND 880, 2
mok: PRINT "Aux Module test complete"
PRINT "Serial port handshaking check"
PRINT #1, "ADFBFB";
CLOSE
PRINT "-> Listing on LCD be 'frozen'"
PRINT "-> Unplug Aux Module"
PRINT "-> Unplug serial port and listing should finish"
PRINT
PRINT "-> Finish by doing the 'twist test'"
PRINT
PRINT "?? test another?? (Y/N)??"
dlup: a$ = INKEY$
IF a$ = "Y" THEN GOTO tlup
IF a$ = "y" THEN GOTO tlup
IF a$ = "n" THEN GOTO done
IF a$ = "N" THEN GOTO done
GOTO dlup
done:
END
1000 PRINT "--> Hit a key when ready to continue..."
WHILE INKEY$ <> "": WEND
WHILE INKEY$ = "": WEND
RETURN
2000 REM monitor diode voltage
WHILE INKEY$ <> "": WEND
posn = CSRLIN
PRINT #1, "R0";
WHILE INKEY$ = ""
PRINT #1, "R0";
INPUT #1, v0
PRINT #1, "BR1";
INPUT #1, v1
PRINT #1, "BR2";
INPUT #1, v2
PRINT #1, "BR3";
INPUT #1, v3
PRINT #1, "BR4";
INPUT #1, v4
PRINT #1, "B";
IF v0 > 50000 THEN v0 = v0 - 100000
IF v1 > 50000 THEN v1 = v1 - 100000
IF v2 > 50000 THEN v2 = v2 - 100000
IF v3 > 50000 THEN v3 = v3 - 100000
IF v4 > 50000 THEN v4 = v4 - 100000
LOCATE posn, 1
PRINT v0, v1, v2, v3, v4; " ";
WEND
PRINT #1, "B";
PRINT
RETURN
3000 REM routine to wait t seconds
tm = TIMER
WHILE TIMER - tm < t: WEND
RETURN