home *** CD-ROM | disk | FTP | other *** search
- 1 REM ***************** CSMA_CD2 ****************
- 2 REM File name: CSMA_CD2.TXT
- 3 REM This routine demonstrates basic control
- 4 REM functions over those ICOM radios
- 5 REM equipped with the CSMA/CD CI-V serial
- 6 REM data bus. It is written in GW Basic and
- 7 REM designed to run on any IBM (R) PC or
- 8 REM clone. It was written with the novice
- 9 REM in mind and should be easy to implement.
- 12 REM ******************************************
- 13 REM
- 14 REM BY: Charles F. Bahr
- 15 REM N7ICW
- 16 REM
- 17 REM
- 18 REM
- 20 SCREEN 0,0:WIDTH 80
- 30 KEY ON:CLS:CLOSE
- 40 DEFINT A-Z:
- 50 REM MENU=5 'VALUE OF MENU KEY(^E)
- 60 LOCATE 1,1
- 70 INPUT "WHICH RADIO (0 TO QUIT)";RADIO
- 80 IF RADIO=0 THEN 1520
- 90 IF RADIO=275 THEN A = 16
- 100 IF RADIO=375 THEN A = 18
- 110 IF RADIO=475 THEN A = 20
- 120 IF RADIO=575 THEN A = 22
- 130 IF RADIO=735 THEN A = 4
- 140 IF RADIO=761 THEN A = 30
- 150 IF RADIO=725 THEN A = 40
- 160 IF RADIO=765 THEN A = 13
- 170 IF RADIO=781 THEN A = 38
- 180 IF RADIO=7000 THEN A = 8
- 190 IF RADIO=9000 THEN A = 42
- 200 IF A=42 THEN GOSUB 1120
- 210 CLS
- 220 PRINT "CURRENT RIG IS THE IC"RADIO
- 230 LOCATE 2,1
- 240 PRINT "ENTER FUNCTION TO SET: VFO; MODE; FREQ; OR MEM "
- 250 INPUT "(Q TO QUIT N TO SELECT DIFFERENT RADIO...)";A$
- 260 IF A$= "" THEN 220
- 270 IF A$= "FREQ" THEN GOSUB 340
- 280 IF A$= "MODE" THEN GOSUB 670
- 290 IF A$= "MEM" THEN GOSUB 970
- 300 IF A$= "VFO" THEN GOSUB 840
- 310 IF A$="N" THEN 20
- 320 IF A$="Q" THEN 1520
- 330 GOTO 210
- 340 REM ******************************
- 350 REM SET FREQUENCY
- 360 REM ******************************
- 370 LOCATE 1,1:CLS
- 380 S=T=U=V=W=0
- 390 INPUT "NEW FREQUENCY:",F!
- 400 F!=F!+.000001
- 410 IF A=4 THEN F!=F!*100
- 420 N=INT(F!/100)
- 430 S=(6*FIX(N/10))+N
- 440 N=INT(F!)-N*100
- 450 T=(6*FIX(N/10))+N
- 460 F!=F!-INT(F!)
- 470 N=INT(F!*100)
- 480 U=(6*FIX(N/10))+N
- 490 F!=((F!*100)-N)*100
- 500 N=INT(F!)
- 510 V=(6*FIX(N/10))+N
- 520 IF A<> 20 AND A<> 42 THEN GOTO 610
- 530 F!=(F!-N)*100
- 540 W=(6*FIX(N/10))+N
- 550 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 560 OPEN COMFIL$ AS #1
- 570 PRINT #1,CHR$(254)+CHR$(254)+CHR$(A)+CHR$(241)+CHR$(5);
- 580 PRINT #1,CHR$(W)+CHR$(V)+CHR$(U)+CHR$(T)+CHR$(S)+CHR$(253)
- 590 CLOSE
- 600 GOTO 660
- 610 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 620 OPEN COMFIL$ AS #1
- 630 PRINT #1,CHR$(254)+CHR$(254)+CHR$(A)+CHR$(241)+CHR$(5);
- 640 PRINT #1,CHR$(V)+CHR$(U)+CHR$(T)+CHR$(S)+CHR$(253)
- 650 CLOSE
- 660 RETURN
- 670 REM **************************
- 680 REM SET MODE
- 690 REM **************************
- 700 LOCATE 1,1:CLS
- 710 INPUT "NEW MODE: ",MODE$
- 720 IF MODE$= "LSB" THEN D = 0
- 730 IF MODE$= "USB" THEN D = 1
- 740 IF MODE$= "AM" THEN D = 2
- 750 IF MODE$= "CW" THEN D = 3
- 760 IF MODE$= "RTTY" THEN D=4
- 770 IF MODE$= "FM" THEN D = 5
- 780 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 790 OPEN COMFIL$ AS #1
- 800 PRINT #1,CHR$(254)+CHR$(254)+CHR$(A)+CHR$(241);
- 810 PRINT#1,CHR$(6)+CHR$(D)+CHR$(253)
- 820 CLOSE
- 830 RETURN
- 840 REM **************************
- 850 REM SET VFO
- 860 REM **************************
- 870 LOCATE 1,1:CLS
- 880 INPUT "NEW VFO: ",VFO$
- 890 D=0
- 900 IF VFO$= "B" THEN D = 1
- 910 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 920 OPEN COMFIL$ AS #1
- 930 PRINT #1,CHR$(254)+CHR$(254)+CHR$(A)+CHR$(241);
- 940 PRINT#1,CHR$(7)+CHR$(D)+CHR$(253)
- 950 CLOSE
- 960 RETURN
- 970 REM **************************
- 980 REM SET MEMORY
- 990 REM **************************
- 1000 LOCATE 1,1:CLS
- 1010 INPUT "WHICH MEMORY: ",D
- 1040 C= INT(D/10)
- 1050 D= D + (6*C)
- 1060 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 1070 OPEN COMFIL$ AS #1
- 1080 PRINT #1,CHR$(254)+CHR$(254)+CHR$(A)+CHR$(241);
- 1090 PRINT#1,CHR$(8)+CHR$(D)+CHR$(253)
- 1100 CLOSE
- 1110 RETURN
- 1120 REM ****************************
- 1130 REM 9000 UNIQUE
- 1140 REM ****************************
- 1150 LOCATE 1,1:CLS
- 1160 INPUT "RF, AF, SQ, METER";R$
- 1170 IF R$="RF" THEN D=1
- 1180 IF R$="AF" THEN D=2
- 1190 IF R$="SQ" THEN D=3
- 1200 IF R$="METER" THEN 1330
- 1210 IF R$="" THEN 1500
- 1220 INPUT "HOW MUCH, (1 TO 255)";L
- 1230 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 1240 OPEN COMFIL$ AS #1
- 1250 PRINT #1,CHR$(254)+CHR$(254)+CHR$(42)+CHR$(241)+CHR$(20);
- 1260 PRINT#1,CHR$(D)+CHR$(L)+CHR$(253)
- 1270 CLOSE
- 1280 INPUT "MORE? (Y/N)...",M$
- 1290 IF M$="Y" THEN 1220
- 1300 INPUT "ANOTHER FUNCTION (Y/N)...";M$
- 1310 IF M$="Y" THEN 1150
- 1320 GOTO 1500
- 1330 CLS
- 1340 LOCATE 1,1
- 1350 COMFIL$= "COM1:1200,N,8,,CS0,DS0,CD0"
- 1360 OPEN COMFIL$ AS #1
- 1370 PRINT #1,CHR$(254)+CHR$(254)+CHR$(42)+CHR$(241)+CHR$(21);
- 1380 PRINT#1,CHR$(2)+CHR$(253)
- 1390 FOR X=1 TO 17
- 1400 A$=INPUT$(1,#1)
- 1410 B=ASC(A$)
- 1420 C$=HEX$(B)
- 1430 IF X>14 AND X<17 THEN PRINT C$;
- 1440 E$=INKEY$: IF E$<>"" THEN 1480
- 1450 NEXT X
- 1460 CLOSE
- 1470 GOTO 1340
- 1480 CLOSE
- 1490 GOTO 1300
- 1500 CLOSE
- 1510 RETURN
- 1520 CLOSE
- 1530 END