RL-903 Receiver
Glenayre
Document Number: 9110.00148
MAINTENANCE
Issue
1,
Rev. C: 12/10/96
BASIC Listing for Programming Synthesizer
90 CLS
100 REM program to calculate RL-903 receive frequency
110 PRINT "This program helps calculate the Si and S2 switch settings."
120 PRINT "for the RL-903 synthesizer."
130 PRINT "Enter the receive frequency (MHz). Press Ctrl-Scroll Lock to exit."
140 INPUT D
150 IF D>1100 OR D<870 THEN 130
160 H=INT(((D-864.2)*160)+0.5)
165 PRINT "Frequency (MHz) is "; D;",
( exactly"; ((H+138272!)/160);")."
170 PRINT " Hex value is ";
175
HH$
=
HEX$(H)
180 PRINT
HEX$(H)
185 GOSUB 500
190 PRINT "Binary value is ";
200 FOR I
=
1 TO 4
210 PRINT HI$(I);"I";
220 NEXT I
230 PRINT "Si segments 1-4 = "; HR$(4)
240 PRINT "Si segments 5-8 = "; HR$(3)
250 PRINT "S2 segments 1-4 = "; HR$(2)
260 PRINT
"
S2 segments 5-8 = "; HR$(1)
270 PRINT "NOTE: 0 = ON, 1 = off"
280 PRINT
290 GOTO 130
500 REM calculate hex and binary
510
HH$
=
"0000"+HH$
520 HH$
=
RIGHT$(HH$,4)
530 FOR I=1 TO 4
535 B$=MID$(HH$,I,1)
540 GOSUB 700
550 HI$(I)
=
A$:
HR$(I)
=
RR$
560 NEXT I
570 RETURN
700 REM look up binary values from hex
710 A$="."
720 IF B$
=
"0" THEN A$
=
"0000":RR$
=
"0000
"
730 IF B$
=
"l" THEN A$="0001":RR$
=
"1000"
740 IF B$="2" THEN A$="0010":RR$
=
"0100"
750 IF B$
=
"3" THEN A$="0011":RR$
=
"1100
"
760 IF B$
="
4" THEN A$
=
"0100":RR$
="
0010
"
770 IF B$
=
"5" THEN A$
=
"0101":RR$
="
1010
"
780 IF B$="6" THEN A$="0110":RR$
=
"0110"
790 IF B$="7" THEN A$="0111":RR$
=
"1110"
800 IF B$="8" THEN A$="1000":RR$="0001"
810 IF B$="9" THEN A$="1001":RR$
=
"1001"
820 IF B$
=
"A" THEN A$
=
"1010":RR$
="
0101
"
830 IF B$
=
"B" THEN A$
=
"1011":RR$
="
1101
"
840 IF B$="C" THEN A$="1100":RR$
=
"0011"
850 IF B$
="
D" THEN A$="1101":RR$
="
1011
"
860 IF B$="E" THEN A$="1110":RR$
=
"011l"
870 IF B$
="
F
"
THEN A$
=
"1111":RR$
="
1111
"
880 IF A$
="
." THEN PRINT
"000000ps,
B$
=
"; B$: STOP
890 RETURN
Page:
7-10
Copyright ©1996 Glenayre
Print Date: 12/05/96