home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
tech
/
eepub04
/
bpfzen.asc
< prev
next >
Wrap
Text File
|
1986-03-10
|
17KB
|
387 lines
100 '*******************************************************
110 ' SIMPLE BANDPASS FILTER SYNTHESIS
120 '
130 ' COPYRIGHT: R.F. PRODUCTS & EARL F. BOSSALLER JR.
140 ' 6/6/85 5022 ARTESIAN ST.
150 ' SAN DIEGO CA. 92117
160 '
170 'PERMISSION TO COPY AND USE FOR NON-COMMERCIAL PURPOSES
180 'IS HEREBY GRANTED.
190 '
200 'FOR COPY OF THIS PROGRAM, SEND FORMATTED DISK, STAMPED
210 'SELF ADDRESSED RETURN MAILER, AND $5.00 TO ABOVE
220 'ADDRESS. AVAILABLE FOR: MS-DOS/PC-DOS, KAYPRO,
230 'ZENITH Z-100, WRITE FOR OTHERS.
240 '
250 'PROGRAM: BPF.BAS VERSION 1.0
260 ' BY: E.F. BOSSALLER JR. 6/85
270 '*******************************************************
280 'INITIALIZATION SECTION
290 GOSUB 50010 ' GO DO VERSION DEPENDENT INITIALIZATION
300 LPP = 60 ' 11 INCH PAPER
310 MARGIN$ = " " 'LEFT MARGIN FOR 3 RING BINDER
320 PLINES = 1 'SET PRINTER LINE COUNTER TO TOP OF FORM
330 CFLTR = 0 :DFLTR = 1 'DISPLAY AND CALCULATE FILTER 1
340 RS=50:RL=200:K=.1:Q=10:F=10 'SET INITIAL INPUT VALUES
350 PI = 3.1415927#
360 'SET UP STRINGS FOR PRINT USING STATEMENTS
370 INVAL1$ = "|(1) RS = #########,.# OHMS | (I)-CHANGE INPUT VALUE |"
380 INVAL2$ = "|(2) RL = #########,.# OHMS | (P)-PRINTER MENU |"
390 INVAL3$ = "|(3) K = ###.### | (D)-DISK FILES MENU |"
400 INVAL4$ = "|(4) Q = ####.# | |"
410 INVAL5$ = "|(5) F = ####.###### MHz | (1...16)-DISPLAY FILTER 1...16 ON SCREEN |"
420 FLTRVAL$ = " \\ = +#.###^^^^ ##.###^^^^ \ \ \ \"
430 BOTLINE$ = "______________________________________________________________________________"
440 GOSUB 50200 'CLEAR SCREEN AND HOME CURSOR
450 PRINT "BPF.BAS SIMPLE BANDPASS FILTER SYNTHESIS VERSION 1.0"
460 PRINT ".____________________________________________________________________________."
470 PRINT "| INPUT VALUES | COMMAND MENU (X)-EXIT PROGRAM |"
480 PRINT "| ----------------------- | ----------------- |"
490 PRINT USING INVAL1$;RS
500 PRINT USING INVAL2$;RL
510 PRINT USING INVAL3$;K
520 PRINT USING INVAL4$;Q
530 PRINT USING INVAL5$;F
540 PRINT "|______________________________|_____________________________________________|"
550 IF DFLTR <> CFLTR THEN CFLTR = DFLTR:GOSUB 2620
560 PRINT FLTNAM$
570 PRINT
580 PRINT " REACTANCES COMPONENT VALUES FILTER CONFIGURATION"
590 PRINT " ---------- ----------------"
600 PRINT USING FLTRVAL$;"X1",X1,VX1,VX1$,FCNFG1$
610 PRINT USING FLTRVAL$;"X2",X2,VX2,VX2$,FCNFG2$
620 PRINT USING FLTRVAL$;"X'",XP,VXP,VXP$,FCNFG3$
630 PRINT USING FLTRVAL$;"XA",XA,VXA,VXA$,FCNFG4$
640 PRINT USING FLTRVAL$;"XB",XB,VXB,VXB$,FCNFG5$
650 PRINT
660 PRINT BOTLINE$
670 PRINT
680 PRINT "COMMAND (1..16,I,P,D,X)";
690 INPUT ANS$
700 IF ANS$ = "" GOTO 440
710 ANS = INT(VAL(ANS$))
720 IF ANS = 0 GOTO 760
730 IF ANS < 0 OR ANS => 17 GOTO 440
740 DFLTR = ANS 'SET DISPLAYED FILTER TO REQUESTED
750 GOTO 440
760 ANS$ = CHR$(ASC(LEFT$(ANS$,1)) AND NOT 32) '1 U/C LETTER
770 IF ANS$ = "P" THEN GOSUB 1630:GOTO 440
780 IF ANS$ = "I" THEN GOSUB 820:GOTO 440
790 IF ANS$ = "D" THEN GOSUB 2490:GOTO 440
800 IF ANS$ = "X" THEN GOTO 50100
810 GOTO 440
820 '------------ GET INPUT VALUES SUBROUTINE -------------
830 Y = 11:GOSUB 50300:X=1:Y=11:GOSUB 50400 'LINE 11 COL 1
840 PRINT " CHANGE INPUT VALUES MENU (0)-DONE (RETURN AND RECALCULATE FILTER)"
850 PRINT " --------------------------"
860 PRINT " INPUT VALUE RANGE .__________."
870 PRINT "(1)- RS (SOURCE RESISTANCE) .1 TO 10000000 OHMS | NOTE: |"
880 PRINT "(2)- RL (LOAD RESISTANCE) .1 TO 10000000 OHMS | RS <= RL |"
890 PRINT "(3)- K (COEFFICIENT OF COUPLING) .001 TO Kmax `----------'"
900 PRINT "(4)- Q (LOADED CIRCUIT Q) .1 TO 1000
910 PRINT "(5)- F (CENTER FREQUENCY) .000001 TO 10000 MHZ"
920 PRINT
930 PRINT
940 PRINT BOTLINE$
950 Y=22:GOSUB 50300 'ERASE INPUT AREA
960 X=1:Y=23:GOSUB 50400 'GOTO LINE 23 COLUMN 1
970 INPUT "COMMAND (0,1,2,3,4,5) ";ANS$
980 IF ANS$ = "0" THEN GOTO 1050
990 IF ANS$ = "1" THEN GOSUB 1080:GOTO 950
1000 IF ANS$ = "2" THEN GOSUB 1190:GOTO 950
1010 IF ANS$ = "3" THEN GOSUB 1300:GOTO 950
1020 IF ANS$ = "4" THEN GOSUB 1410:GOTO 950
1030 IF ANS$ = "5" THEN GOSUB 1520:GOTO 950
1040 GOTO 950
1050 IF RS > RL THEN PRINT " CAN'T EXIT ..... RS > RL, PLEASE CORRECT";:GOTO 960
1060 IF K > SQR(RS/RL)+.001 THEN PRINT "CAN'T EXIT .... K > Kmax, PLEASE CORRECT";:GOTO 960
1070 CFLTR = 0: RETURN 'CAUSE RECALCULATION
1080 ' SUBROUTINE TO SET VALUE OF RS
1090 Y=22:GOSUB 50300
1100 PRINT USING "PRESENT RS = ########.# OHMS";RS
1110 INPUT "NEW VALUE = ";ANS$
1120 IF ANS$ = "" THEN RETURN
1130 ANS = VAL(ANS$)
1140 IF ANS =< 9.000001E-02 OR ANS => 10000000.1# THEN 1180
1150 RS = ANS 'SET RS TO INPUT
1160 X=1:Y=5:GOSUB 50400
1170 PRINT USING INVAL1$;RS:RETURN 'UPDATE INPUT VALUE
1180 PRINT "INPUT OUTSIDE RANGE";:Y=23:GOSUB 50500:GOTO 1110
1190 'SUBROUTINE TO SET VALUE OF RL
1200 Y=22:GOSUB 50300
1210 PRINT USING "PRESENT RL = ########.# OHMS";RL
1220 INPUT "NEW VALUE = ";ANS$
1230 IF ANS$ = "" THEN RETURN
1240 ANS = VAL(ANS$)
1250 IF ANS =< 9.000001E-02 OR ANS => 10000000.1# THEN 1290
1260 RL = ANS 'SET RL TO INPUT VALUE
1270 X=1:Y=6:GOSUB 50400
1280 PRINT USING INVAL2$;RL:RETURN 'UPDATE INPUT VALUE
1290 PRINT "INPUT OUTSIDE RANGE";:Y=23:GOSUB 50500:GOTO 1220
1300 'SUBROUTINE TO SET VALUE OF K
1310 Y=22:GOSUB 50300
1320 PRINT USING "PRESENT K = ####.### Kmax WITH PRESENT RS AND RL = ####.###";K;SQR(RS/RL)
1330 INPUT "NEW VALUE = ";ANS$
1340 IF ANS$ = "" THEN RETURN
1350 ANS = VAL(ANS$)
1360 IF ANS =< .0009 OR ANS > SQR(RS/RL)+.001 THEN 1400
1370 K = ANS 'SET K TO INPUT VALUE
1380 X=1:Y=7:GOSUB 50400
1390 PRINT USING INVAL3$;K:RETURN 'UPDATE INPUT VALUE
1400 PRINT "INPUT OUTSIDE RANGE";:Y=23:GOSUB 50500:GOTO 1330
1410 'SUBROUTINE TO SET VALUE OF Q
1420 Y=22:GOSUB 50300
1430 PRINT USING "PRESENT Q = ####.#";Q
1440 INPUT "NEW VALUE = ";ANS$
1450 IF ANS$ = "" THEN RETURN
1460 ANS = VAL(ANS$)
1470 IF ANS =< 9.000001E-02 OR ANS => 1000.01 THEN 1510
1480 Q = ANS 'SET Q TO INPUT VALUE
1490 X=1:Y=8:GOSUB 50400
1500 PRINT USING INVAL4$;Q:RETURN 'UPDATE INPUT VALUE
1510 PRINT "INPUT OUTSIDE RANGE";:Y=23:GOSUB 50500:GOTO 1440
1520 'SUBROUTINE TO SET FREQUENCY
1530 Y=22:GOSUB 50300
1540 PRINT USING "PRESENT FREQUENCY = #####.###### MHZ";F
1550 INPUT "NEW FREQUENCY = ";ANS$
1560 IF ANS$ = "" THEN RETURN
1570 ANS = VAL(ANS$)
1580 IF ANS =< .0000009 OR ANS => 10000! THEN 1620
1590 F = ANS 'SET FREQ TO INPUT VALUE
1600 X=1:Y=9:GOSUB 50400
1610 PRINT USING INVAL5$;F:RETURN 'UPDATE INPUT VALUE
1620 PRINT "INPUT OUTSIDE RANGE";:Y=23:GOSUB 50500:GOTO 1550
1630 ' ------------- PRINTER CONTROL SUBROUTINE ------------
1640 Y = 11:GOSUB 50300:X=1:Y=11:GOSUB 50400 'LINE 11 COL 1
1650 PRINT " PRINTER CONTROL MENU (0)-DONE (RETURN AND RECALCULATE FILTER)"
1660 PRINT " ----------------------"
1670 PRINT
1680 PRINT "(1)- PRINT RESULTS OF ALL 16 FILTER CALCULATIONS"
1690 PRINT "(2)- PRINT RESULTS OF 1 FILTER CALCULATION"
1700 PRINT
1710 PRINT "(3)- SEND FORMFEED TO PRINTER"
1720 PRINT
1730 PRINT
1740 PRINT
1750 PRINT BOTLINE$
1760 Y=22:GOSUB 50300 'ERASE BOTTOM OF SCREEN
1770 X=1:Y=23:GOSUB 50400 'GOTO LINE 23 COLUMN 1
1780 INPUT "COMMAND (0,1,2,3) ";ANS$
1790 ANS$ = LEFT$(ANS$,1)
1800 IF ANS$ = "0" THEN RETURN
1810 IF ANS$ = "1" THEN GOSUB 1850:GOTO 1760
1820 IF ANS$ = "2" THEN GOSUB 2410:GOTO 1760
1830 IF ANS$ = "3" THEN LPRINT CHR$(12):PLINES = 1:GOTO 1760
1840 GOTO 1760
1850 ' SUBROUTINE TO PRINT RESULTS FOR ALL FILTERS
1860 PFLTR = 0 'SET FILTER TO BE PRINTED FLAG TO 0 (ALL)
1870 Y=22:GOSUB 50300:X=1:GOSUB 50400
1880 PRINT "PRESENT TITLE IS: ";TITLE$
1890 Y=24:GOSUB 50400
1900 PRINT "(SPACE) = NO TITLE | (RETURN) = SAME TITLE | DON'T USE QUOTE OR COMMA";
1910 Y=23:GOSUB 50500
1920 LINE INPUT;"TYPE IN NEW TITLE ";ANS$
1930 IF ANS$ = "" THEN GOTO 1950
1940 TITLE$ = LEFT$(ANS$,60)
1950 'PRINT FILTER RESULTS ON PRINTER
1960 IF PLINES => LPP-14 THEN LPRINT CHR$(12);:PLINES = 1
1970 LPRINT MARGIN$;" ";TITLE$
1980 LPRINT:LPRINT
1990 LPRINT MARGIN$;" INPUT VALUES"
2000 LPRINT MARGIN$;" --------------"
2010 LPRINT
2020 LPRINT MARGIN$;:LPRINT USING " RS = #########,.# OHMS";RS
2030 LPRINT MARGIN$;:LPRINT USING " RL = #########,.# OHMS";RL
2040 LPRINT MARGIN$;:LPRINT USING " K = ###.###";K
2050 LPRINT MARGIN$;:LPRINT USING " Q = ####.#";Q
2060 LPRINT MARGIN$;:LPRINT USING " F = ####.###### MHz";F
2070 LPRINT:LPRINT:LPRINT
2080 PLINES = PLINES + 14 '14 MORE LINES PRINTED ON PAGE
2090 'PRINT SELECTED FILTER OR ALL
2100 IF PFLTR = 0 OR PFLTR = 1 THEN CFLTR = 1:GOSUB 2270
2110 IF PFLTR = 0 OR PFLTR = 2 THEN CFLTR = 2:GOSUB 2270
2120 IF PFLTR = 0 OR PFLTR = 3 THEN CFLTR = 3:GOSUB 2270
2130 IF PFLTR = 0 OR PFLTR = 4 THEN CFLTR = 4:GOSUB 2270
2140 IF PFLTR = 0 OR PFLTR = 5 THEN CFLTR = 5:GOSUB 2270
2150 IF PFLTR = 0 OR PFLTR = 6 THEN CFLTR = 6:GOSUB 2270
2160 IF PFLTR = 0 OR PFLTR = 7 THEN CFLTR = 7:GOSUB 2270
2170 IF PFLTR = 0 OR PFLTR = 8 THEN CFLTR = 8:GOSUB 2270
2180 IF PFLTR = 0 OR PFLTR = 9 THEN CFLTR = 9:GOSUB 2270
2190 IF PFLTR = 0 OR PFLTR = 10 THEN CFLTR = 10:GOSUB 2270
2200 IF PFLTR = 0 OR PFLTR = 11 THEN CFLTR = 11:GOSUB 2270
2210 IF PFLTR = 0 OR PFLTR = 12 THEN CFLTR = 12:GOSUB 2270
2220 IF PFLTR = 0 OR PFLTR = 13 THEN CFLTR = 13:GOSUB 2270
2230 IF PFLTR = 0 OR PFLTR = 14 THEN CFLTR = 14:GOSUB 2270
2240 IF PFLTR = 0 OR PFLTR = 15 THEN CFLTR = 15:GOSUB 2270
2250 IF PFLTR = 0 OR PFLTR = 16 THEN CFLTR = 16:GOSUB 2270
2260 LPRINT:PLINES=PLINES+1:RETURN 'RETURN TO PRINTER MENU
2270 'ROUTINE TO PRINT FILTER VALUES
2280 GOSUB 2620 ' CALCULATE VALUES FOR FILTER
2290 IF PLINES > LPP - 9 THEN PLINES = 1:LPRINT CHR$(12);
2300 LPRINT MARGIN$;FLTNAM$
2310 LPRINT
2320 LPRINT MARGIN$;:LPRINT USING FLTRVAL$;"X1",X1,VX1,VX1$,FCNFG1$
2330 LPRINT MARGIN$;:LPRINT USING FLTRVAL$;"X2",X2,VX2,VX2$,FCNFG2$
2340 LPRINT MARGIN$;:LPRINT USING FLTRVAL$;"X'",XP,VXP,VXP$,FCNFG3$
2350 LPRINT MARGIN$;:LPRINT USING FLTRVAL$;"XA",XA,VXA,VXA$,FCNFG4$
2360 LPRINT MARGIN$;:LPRINT USING FLTRVAL$;"XB",XB,VXB,VXB$,FCNFG5$
2370 LPRINT
2380 LPRINT
2390 PLINES = PLINES+9
2400 RETURN
2410 'SUBROUTINE TO PRINT RESULTS FOR SELECTED FILTER
2420 Y=22:GOSUB 50300
2430 Y=23:X=1:GOSUB 50400
2440 INPUT;"WHICH FILTER DO YOU WISH TO PRINT (1..16) ";ANS$
2450 ANS = INT(VAL(ANS$))
2460 IF ANS =< 0 OR ANS => 17 THEN RETURN
2470 PFLTR = ANS
2480 GOTO 1870 'FINISH UP IN PRINT FILTERS SUBROUTINE
2490 ' ------------ DISK FILES MENU SUBROUTINE -------------
2500 Y = 11:GOSUB 50300:X=1:Y=11:GOSUB 50400 'LINE 11 COL 1
2510 PRINT " DISK FILES MENU (0)-DONE (RETURN AND RECALCULATE FILTER)"
2520 PRINT " ------------------"
2530 PRINT:PRINT:PRINT
2540 PRINT " THERE ARE NO DISK OPERATIONS DEFINED"
2550 PRINT:PRINT:PRINT:PRINT
2560 PRINT BOTLINE$
2570 Y=22:GOSUB 50300 'ERASE INPUT AREA
2580 X=1:Y=23:GOSUB 50400 'GOTO LINE 23 COLUMN 1
2590 INPUT "COMMAND (0) ";ANS$
2600 IF ANS$ = "0" THEN RETURN
2610 GOTO 2570
2620 '------- SUBROUTINE TO CALCULATE FILTER VALUES --------
2630 'SELECT FILTER CONFIGURATION PICTURE
2640 ON CFLTR GOSUB 2750,2750,2750,2750,2810,2810,2810,
2810,2870,2870,2930,2930,2750,2750,2810,2810
2650 'SELECT CALCULATION SUBROUTINE
2660 ON CFLTR GOSUB 3000,3040,3080,3120,3160,3200,3240,
3280,3320,3360,3400,3440,3480,3520,3560,3600
2670 'CALCULATE COMPONENT VALUES
2680 XI=X1:GOSUB 3640:VX1=VXI:VX1$=VXI$
2690 XI=X2:GOSUB 3640:VX2=VXI:VX2$=VXI$
2700 XI=XP:GOSUB 3640:VXP=VXI:VXP$=VXI$
2710 XI=XA:GOSUB 3640:VXA=VXI:VXA$=VXI$
2720 XI=XB:GOSUB 3640:VXB=VXI:VXB$=VXI$
2730 RETURN
2740 '------- FILTER CONFIGURATION PICTURES ----------
2750 FCNFG1$ = " *---*---XA---*---XB---*---*"
2760 FCNFG2$ = " | | | | |"
2770 FCNFG3$ = "RS X1 X' X2 RL"
2780 FCNFG4$ = " | | | | |"
2790 FCNFG5$ = " *---*--------*--------*---*"
2800 RETURN
2810 FCNFG1$ = " *---X1---*---X'---*---X2---*"
2820 FCNFG2$ = " | | | |"
2830 FCNFG3$ = "RS XA XB RL"
2840 FCNFG4$ = " | | | |"
2850 FCNFG5$ = " *--------*--------*--------*"
2860 RETURN
2870 FCNFG1$ = " *---X1---XA---*---XB---X2---*"
2880 FCNFG2$ = " | | |"
2890 FCNFG3$ = "RS X' RL"
2900 FCNFG4$ = " | | |"
2910 FCNFG5$ = " *-------------*-------------*"
2920 RETURN
2930 FCNFG1$ = " *---*---*----X'---*---*---*"
2940 FCNFG2$ = " | | | | | |"
2950 FCNFG3$ = "RS X1 XA XB X2 RL"
2960 FCNFG4$ = " | | | | | |"
2970 FCNFG5$ = " *---*---*---------*---*---*"
2980 RETURN
2990 '---------FILTER CALCULATION SUBROUTINES -------------
3000 FLTNAM$ = " FILTER #1 COUPLED LP STANDARD PI"
3010 X1=-RS/Q: X2=-RL/Q: XP=-K*SQR(X1*X2)
3020 XA=-X1-XP: XB=-X2-XP
3030 RETURN
3040 FLTNAM$ = " FILTER #2 COUPLED HP STANDARD PI"
3050 X1=-(-RS/Q): X2=-(-RL/Q): XP=-(-K*SQR(X1*X2))
3060 XA=-X1-XP: XB=-X2-XP
3070 RETURN
3080 FLTNAM$ = " FILTER #3 COUPLED LP MIXED PI"
3090 X1=-RS/Q: X2=-RL/Q: XP=K*SQR(X1*X2)
3100 XA=-XP-X1: XB=-XP-X2
3110 RETURN
3120 FLTNAM$ = " FILTER #4 COUPLED HP MIXED PI"
3130 X1=RS/Q: X2=RL/Q: XP=-K*SQR(X1*X2)
3140 XA=-XP-X1: XB=-XP-X2
3150 RETURN
3160 FLTNAM$ = " FILTER #5 COUPLED LP STANDARD TEE"
3170 X1=RS*Q: X2=RL*Q: XP=SQR(X1*X2)/K
3180 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3190 RETURN
3200 FLTNAM$ = " FILTER #6 COUPLED HP STANDARD TEE"
3210 X1=-RS*Q: X2=-RL*Q: XP=-SQR(X1*X2)/K
3220 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3230 RETURN
3240 FLTNAM$ = " FILTER #7 COUPLED LP MIXED TEE"
3250 X1=RS*Q: X2=RL*Q: XP=-SQR(X1*X2)/K
3260 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3270 RETURN
3280 FLTNAM$ = " FILTER #8 COUPLED HP MIXED TEE"
3290 X1=-RS*Q: X2=-RL*Q: XP=SQR(X1*X2)/K
3300 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3310 RETURN
3320 FLTNAM$ = " FILTER #9 COUPLED LP SERIES ENHANCED-Q L"
3330 X1=RS*Q: X2=RL*Q: XP=-K*SQR(X1*X2)
3340 XA=-X1-XP: XB=-X2-XP
3350 RETURN
3360 FLTNAM$ = " FILTER #10 COUPLED HP SERIES ENHANCED-Q L"
3370 X1=-RS*Q: X2=-RL*Q: XP=K*SQR(X1*X2)
3380 XA=-X1-XP: XB=-X2-XP
3390 RETURN
3400 FLTNAM$ = " FILTER #11 COUPLED LP SHUNT ENHANCED-Q L"
3410 X1=-RS/Q: X2=-RL/Q: XP=SQR(X1*X2)/K
3420 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3430 RETURN
3440 FLTNAM$ = " FILTER #12 COUPLED HP SHUNT ENHANCED-Q L"
3450 X1=RS/Q: X2=RL/Q: XP=-SQR(X1*X2)/K
3460 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3470 RETURN
3480 FLTNAM$ = " FILTER #13 COUPLED LP STANDARD PI / HP MIXED PI"
3490 X1=-RS/Q: X2=RL/Q: XP=-K*SQR(-X1*X2)
3500 XA=-X1-XP: XB=-X2-XP
3510 RETURN
3520 FLTNAM$ = " FILTER #14 COUPLED HP STANDARD PI / LP MIXED PI"
3530 X1=RS/Q: X2=-RL/Q: XP=K*SQR(X1*-X2)
3540 XA=-X1-XP: XB=-X2-XP
3550 RETURN
3560 FLTNAM$ = " FILTER #15 COUPLED LP STANDARD TEE / HP MIXED TEE"
3570 X1=RS*Q: X2=-RL*Q: XP=SQR(-X1*X2)/K
3580 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3590 RETURN
3600 FLTNAM$ = " FILTER #16 COUPLED HP STANDARD TEE / LP MIXED TEE"
3610 X1=-RS*Q: X2=RL*Q: XP=-SQR(-X1*X2)/K
3620 XA=-1/((1/X1)+(1/XP)): XB=-1/((1/X2)+(1/XP))
3630 RETURN
3640 '------- COMPONENT VALUE CALCULATOR SUBROUTINE --------
3650 IF XI <= 0 THEN GOTO 3690
3660 VXI$ = "uH"
3670 VXI = (XI/(2*PI*F))
3680 RETURN
3690 VXI$ = "pF"
3700 VXI = (1/(2*PI*F*-XI))*1000000!
3710 RETURN
50000 '----------- USER CUSTOMIZATION SECTION --------------
50005 '----SUBROUTINES FOR ZENITH Z19, Z89, Z100 CP/M-----
50010 '---TERMINAL OR LANGUAGE DEPENDANT INITIALIZATION----
50020 WIDTH 255
50030 PRINT CHR$(27);"E";
50090 RETURN
50100 '------EXIT AND DE-INITIALIZATION SUBROUTINE------
50110 PRINT CHR$(27);"E";
50120 WIDTH 80
50190 END 'END OR RUN "MENU" IF USING MENU SYSTEM
50200 '------CLEAR SCREEN AND HOME CURSOR SUBROUTINE------
50210 PRINT CHR$(27);"E";
50290 RETURN
50300 '----ERASE LINE Y TO BOTTOM OF SCREEN SUBROUTINE-----
50310 PRINT CHR$(27);"Y";CHR$(Y+31);CHR$(32);CHR$(27);"J";
50390 RETURN
50400 '------SET CURSOR TO POSITION X,Y SUBROUTINE------
50410 PRINT CHR$(27);"Y";CHR$(Y+31);CHR$(X+31);
50490 RETURN
50500 '---ERASE LINE AT Y AND SET CURSOR TO 1,Y SUBROUTINE--
50510 PRINT CHR$(27);"Y";CHR$(Y+31);CHR$(32);CHR$(27);"K";
50590 RETURN