home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 81
/
64er_Magazin_Sonderheft_81_19xx_Markt__Technik_de_Side_B.d64
/
formelsammlung
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
200 lines
100 ifda=0thenda=1:load"formel.co",8,1
110 data"parallel-schwingkreis"
120 data"reihen-schwingkreis "
130 data" tiefpass "
140 data" hochpass "
150 data" bandpass "
160 poke55,0:poke56,56:clr
170 fori=0to4:reada$(i):next
180 sy=49152+3
190 sys49152+6
200 sys49152
210 poke198,0:wait198,1
220 print"[147][159]"
230 print" ";
240 print" [158]"
250 sys 49152+9,a
260 print""tab(8)a$(a)
270 print"[150]<crsr auf/ab>= waehlen <return>= start[158]"
280 poke198,0:wait198,1:getz$
290 ifz$=""thena=a+1:ifa>4thena=0
300 ifz$="[145]"thena=a-1:ifa<0thena=4
310 ifz$=chr$(13)then340
320 goto220
330 :
340 ifa=0then450
350 ifa=1then440
360 ifa=2then790
370 ifa=3then1080
380 ifa=4then1300
390 goto220
400 :
410 :
420 rem ******* schwingkreise *********
430 :
440 as%=1
450 gosub740:print"wert des kondensators [pf]: ";:syssy:input"[157][157][157]";c
460 ifc=<0then450
470 ifa=0thenprint""tab(23)c"pf[158]"
480 ifa=1thenprint""tab(17)c"pf[158]"
490 gosub740:print"wert der spule [uh]: ";:syssy:input"[157][157][157]";l
500 ifl=<0then490
510 ifa=0thenprint""l"uh[158]"
520 ifa=1thenprint""tab(17)l"uh[158]"
530 gosub740:print"widerstand der spule [ohm]: ";:syssy:input"[157][157][157]";r
540 ifr=<0then530
550 ifa=0thenprint""r"ohm[158]"
560 ifa=1thenprint""tab(17)r"ohm[158]"
570 c=c*10^(-12):l=l*10^(-6):
580 fo=int(1/(2*(NULL)*sqr(l*c))):w0=1/fo
590 f1=fo/1000
600 gosub740:print"[145][145][145]resonanzfrequenz :";f1;"khz"
610 b=r/(2*(NULL)*l)
620 print"bandbreite :";(int(b*1000))/1000;"hz"
630 d=b/fo
640 print"daempfung :";(int(d*1000))/1000
650 q=1/d
660 print"guete :";(int(q*1000))/1000
670 ifas%thenr0=r:goto690
680 r0=q^2*r
690 print"resonanzwiderstand :";(int(r0*1000))/1000;"ohm"
700 printtab(16)"[150]<taste>[158]";
710 poke198,0:wait198,1:goto220
720 :
730 print"":return
740 gosub730:print" ":print"[145]";:return
750 :
760 :
770 rem ********** tiefpass **********
780 :
790 fo=0:v=0:c2=0
800 gosub740:print"grenzfrequenz [khz]: ";:syssy:input"[157][157][157]";fo
810 iffo=<0then790
820 gosub740:print"verstaerkung: ";:syssy:input"[157][157][157]";v
830 ifv<1then820
840 gosub740:print"kondensator c2 [nf]: ";:syssy:input"[157][157][157]";c2
850 ifc2=<0then840
860 :
870 fo=fo*10^3:c2=c2*10^(-9):v=int(v)
880 c1=2*c2*(v+1)
890 r1=(2/(4*(NULL)*fo*c1*v))
900 r2=v*r1
910 r3=v*r1/(v+1)
920 :
930 gosub740:o=fo:gosub1680:print"[145][145][145]grenzfrequenz"f$
940 o$="":o=v:gosub1780:print"verstaerkung:"f$"[158]"
950 o=r1:gosub1520
960 gosub740:print"r1 :";f$
970 o=r2:gosub1520
980 print"r2 :";f$
990 o=r3:gosub1520
1000 print"r3 :";f$
1010 gosub730:o=c1:gosub1830:printtab(20)"c1 :";f$
1020 o=c2:gosub1830:printtab(20)"c2 :";f$
1030 print:goto700
1040 :
1050 :
1060 rem ********** hochpass ***********
1070 :
1080 fo=0:v=0:c1=0
1090 gosub740:print"grenzfrequenz [khz]: ";:syssy:input"[157][157][157]";fo
1100 iffo=<0then1090
1110 gosub740:print"verstaerkung: ";:syssy:input"[157][157][157]";v
1120 ifv=<0then1110
1130 gosub740:print"kondensatoren c1=c2 [nf] ";:syssy:input"[157][157][157]";c1
1140 ifc1=<0then1130
1150 :
1160 fo=fo*10^3:c1=c1*10^(-9):c2=c1:v=int(v)
1161 r2=(v+1)/(sqr(2)*(NULL)*fo*c1)
1170 r1=sqr(2)/(2*(NULL)*fo*c1*(2+1/v))
1171 c3=c1/v
1172 :
1173 gosub740:o=fo:gosub1680:print"[145][145][145][145]grenzfrequenz:"f$
1174 o$="":o=v:gosub1780:print"verstaerkung: "f$"[158]"
1180 gosub740:o=r1:gosub1520:print"[145]r1 :"f$
1200 o=r2:gosub1520:print"r2 :"f$
1220 gosub730:o=c1:gosub1830:printtab(20)"[145]c1 :"f$
1230 o=c2:gosub1830:printtab(20)"c2 :"f$
1240 o=c3:gosub1830:printtab(20)"c3 :"f$
1250 print:goto700
1260 :
1270 :
1280 rem ********** bandpass **********
1290 :
1300 fo=0:b=0:v=0:c1=0
1310 gosub740:print"mittenfrequenz [khz]: ";:syssy:input"[157][157][157]";fo
1320 iffo<=0then1310
1330 gosub740:print"bandbreite [hz] : ";:syssy:input"[157][157][157]";b
1340 ifb<=0then1310
1350 gosub740:print"verstaerkung : ";:syssy:input"[157][157][157]";v
1360 ifv<=0then1350
1370 gosub740:print"kondensatoren c1=c2 [nf] : ";:syssy:input"[157][157][157]";c1
1380 ifc1<=0then1370
1390 gosub740
1400 fo=fo*10^3:c1=c1*10^(-9):c2=c1:v=int(v)
1401 :
1410 r1=1/(v*2*(NULL)*c1*b)
1411 r2=1/(((2*fo^2)/(b^2)-v)*2*(NULL)*c1*b)
1412 r3=1/((NULL)*b*c1)
1413 :
1417 o=fo:gosub1680:gosub730:print"[145][145][145][145]mittenfrequenz:"f$
1418 o=b:gosub1680:print"bandbreite: "f$
1419 o$="":o=v:gosub1780:print"verstaerkung: "f$"[158]"
1420 gosub730:o=r1:gosub1520:print"r1 :";f$
1440 o=r2:gosub1520:print"r2 :"f$
1460 o=r3:gosub1520:print"r3 :"f$
1480 gosub730:o=c1:gosub1830:printtab(20)"c1 :"f$
1490 o=c2:gosub1830:printtab(20)"c2 :"f$
1500 print:goto700
1510 :
1520 o$=" ohm"
1530 ifo>=1thenifo<1000then1620
1540 ifo<1then1620
1550 o$="kohm"
1560 o=o*10^-3
1570 ifo>=1thenifo<1000then1620
1580 o$="mohm"
1590 o=o*10^-3
1600 ifo>=1thenifo<1000then1620
1610 :
1620 o=int(o*100):o=o/100
1630 f$=str$(o)
1640 iflen(f$)<7thenf$=" "+f$:goto1640
1650 f$=f$+" "+o$:return
1660 ifo>1thenifo<1000then1780
1670 :
1680 o$=" hz"
1690 ifo>=1thenifo<1000then1620
1700 ifo<1then1780
1710 o$="khz"
1720 o=o*10^-3
1730 ifo>=1thenifo<1000then1780
1740 o$="mhz"
1750 o=o*10^-3
1760 ifo>=1thenifo<1000then1780
1770 :
1780 o=int(o*100):o=o/100
1790 f$=str$(o)
1800 iflen(f$)<7thenf$=" "+f$:goto1800
1810 f$=f$+" "+o$:return
1820 :
1830 o$=" f"
1840 ifo>=1then1980
1850 o$="mf"
1860 o=o*10^3
1870 ifo>=1then1980
1880 o$="uf"
1890 o=o*10^3
1900 ifo>=1then1980
1910 o$="nf"
1920 o=o*10^3
1930 ifo>=1then1980
1940 o$="pf"
1950 o=o*10^3
1960 ifo>=1then1980
1970 :
1980 o=int(o*100):o=o/100
1990 f$=str$(o)
2000 iflen(f$)<7thenf$=" "+f$:goto1800
2010 f$=f$+" "+o$:return