350
GOSUB
500
360
TR3$=TR6$
370
12=601
380
GOSUB
500
390
TR4$=TR6$
400 'format last two characters
410
TR5$=""
420
TR5$=TR5$+CHR$(Yl(80l))+CHR$(Y1(802))
430 'write to spectrum analyzer
440 PRINT #l,LEARN$
450 'output trace data
460 PRINT
#l,"IB";TRl$;TR2$;TR3$;TR4$;TR5$;
470 PRINT
#l,"VIEW
TRB;"
480 GOT0 560 'end program
490 'subroutine for converting integer data to ASCII
500
TR6$="" 'set the string to a null value
510 FOR
I=1
TO 200
520
TRS$=TRS$+CHR$(Yl(IZ>)
530
12=12+1
540 NEXT I
550 RETURN 'done with conversion
560 END
The RS-232 program,
232PROG9,
reads a trace stored in the file
TRACEA
and loads it into the
variable TRCA. This program assumes that trace data is stored on the disk from the previous
program example,
232PROG8.
First, the settings of the spectrum analyzer that were stored in the variable
LEARN$
are
recalled. The spectrum analyzer state is changed to the same state as when the trace was
stored. Then previously stored trace data is returned to the spectrum analyzer and the trace is
viewed on the spectrum analyzer screen.
3-14 Programming Topics