' SCAN.BAS ' by Don Adams, 10 October 1998 ' Control program for the Icom R-7000 Receiver DEFDBL N DEF fna (x\$) = ((ASC(x\$) MOD 32) + 9) MOD 25 OPEN "COM1:1200,N,8,1,CD0,CS0,DS0,OP0,RS,TB2048,RB4096" FOR RANDOM AS #2 ' put radio into ssb mode PRINT #2, CHR\$(&HFE) + CHR\$(&HFE) + CHR\$(&H8) + CHR\$(1) + CHR\$(6) + CHR\$(&H5) + CHR\$(0) + CHR\$(&HFD) startfreq# = 400000000# 'hz IF VAL(COMMAND\$) <> 0 THEN startfreq# = (VAL(COMMAND\$) - 1000) * 1000000 FOR n = startfreq# TO 900000000# STEP 2000 'hz num\$ = MID\$(STR\$(n), 2, LEN(STR\$(n)) - 1) IF LEN(STR\$(n)) MOD 2 = 0 THEN num\$ = "0" + num\$ l = LEN(num\$) digit100m = 0 digit10m1m = 0 digit100k10k = 0 digit1k100 = 0 IF l >= 3 THEN digit1k100 = (16 * fna(MID\$(num\$, l - 3, 1)) + fna(MID\$(num\$, l - 2, 1))) IF l >= 5 THEN digit100k10k = (16 * fna(MID\$(num\$, l - 5, 1)) + fna(MID\$(num\$, l - 4, 1))) IF l >= 7 THEN digit10m1m = (16 * fna(MID\$(num\$, l - 7, 1)) + fna(MID\$(num\$, l - 6, 1))) IF l >= 9 THEN digit100m = (16 * fna(MID\$(num\$, l - 9, 1)) + fna(MID\$(num\$, l - 8, 1))) 'PRINT HEX\$(digit100m); 'PRINT HEX\$(digit10m1m); 'PRINT HEX\$(digit100k10k); 'PRINT HEX\$(digit1k100) PRINT #2, CHR\$(&HFE) + CHR\$(&HFE) + CHR\$(&H8) + CHR\$(1) + CHR\$(5) + CHR\$(&H0) + CHR\$(digit1k100) + CHR\$(digit100k10k) + CHR\$(digit10m1m) + CHR\$(digit100m) + CHR\$(&HFD) OPEN "setifox.cfg" FOR OUTPUT AS 1 PRINT #1, "longitude = -810000" PRINT #1, "latitude = 410000" PRINT #1, "altitude = 450000" PRINT #1, "azimuth = 1900000" PRINT #1, "port=544" PRINT #1, "samplerate=8192" PRINT #1, "samples=8192" PRINT #1, USING "start = ########"; n / 100 PRINT #1, "offset = 10000000" 'PRINT #1, "step=10" PRINT #1, "channel=1" PRINT #1, "average=4" PRINT #1, "decay=99" 'PRINT #1, "doppler" PRINT #1, "bandwidth=101" PRINT #1, "trigger=600" PRINT #1, "record" PRINT #1, "alarm" PRINT #1, "logarithmic" PRINT #1, "log carriers" PRINT #1, "filter1=4990000" PRINT #1, "width1=30" CLOSE #1 SHELL "setifox" GOSUB wait1 'this may not be needed except for debug time NEXT n 'to let the get you out of the program END wait1: startime = TIMER DO WHILE (TIMER < startime + 2) AND TIMER >= startime IF INKEY\$ = CHR\$(&H1B) THEN CLOSE : END LOOP RETURN