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 >
Commodore BASIC  |  2022-10-26  |  5KB  |  200 lines

  1. 100 ifda=0thenda=1:load"formel.co",8,1
  2. 110 data"parallel-schwingkreis"
  3. 120 data"reihen-schwingkreis  "
  4. 130 data"      tiefpass       "
  5. 140 data"      hochpass       "
  6. 150 data"      bandpass       "
  7. 160 poke55,0:poke56,56:clr
  8. 170 fori=0to4:reada$(i):next
  9. 180 sy=49152+3
  10. 190 sys49152+6
  11. 200 sys49152
  12. 210 poke198,0:wait198,1
  13. 220 print"[147][159]"
  14. 230 print"                                        ";
  15. 240 print"                                        [158]"
  16. 250 sys 49152+9,a
  17. 260 print""tab(8)a$(a)
  18. 270 print"[150]<crsr auf/ab>= waehlen  <return>= start[158]"
  19. 280 poke198,0:wait198,1:getz$
  20. 290 ifz$=""thena=a+1:ifa>4thena=0
  21. 300 ifz$="[145]"thena=a-1:ifa<0thena=4
  22. 310 ifz$=chr$(13)then340
  23. 320 goto220
  24. 330 :
  25. 340 ifa=0then450
  26. 350 ifa=1then440
  27. 360 ifa=2then790
  28. 370 ifa=3then1080
  29. 380 ifa=4then1300
  30. 390 goto220
  31. 400 :
  32. 410 :
  33. 420 rem ******* schwingkreise *********
  34. 430 :
  35. 440 as%=1
  36. 450 gosub740:print"wert des kondensators [pf]:   ";:syssy:input"[157][157][157]";c
  37. 460 ifc=<0then450
  38. 470 ifa=0thenprint""tab(23)c"pf[158]"
  39. 480 ifa=1thenprint""tab(17)c"pf[158]"
  40. 490 gosub740:print"wert der spule [uh]:          ";:syssy:input"[157][157][157]";l
  41. 500 ifl=<0then490
  42. 510 ifa=0thenprint""l"uh[158]"
  43. 520 ifa=1thenprint""tab(17)l"uh[158]"
  44. 530 gosub740:print"widerstand der spule [ohm]:   ";:syssy:input"[157][157][157]";r
  45. 540 ifr=<0then530
  46. 550 ifa=0thenprint""r"ohm[158]"
  47. 560 ifa=1thenprint""tab(17)r"ohm[158]"
  48. 570 c=c*10^(-12):l=l*10^(-6):
  49. 580 fo=int(1/(2*(NULL)*sqr(l*c))):w0=1/fo
  50. 590 f1=fo/1000
  51. 600 gosub740:print"[145][145][145]resonanzfrequenz   :";f1;"khz"
  52. 610 b=r/(2*(NULL)*l)
  53. 620 print"bandbreite         :";(int(b*1000))/1000;"hz"
  54. 630 d=b/fo
  55. 640 print"daempfung          :";(int(d*1000))/1000
  56. 650 q=1/d
  57. 660 print"guete              :";(int(q*1000))/1000
  58. 670 ifas%thenr0=r:goto690
  59. 680 r0=q^2*r
  60. 690 print"resonanzwiderstand :";(int(r0*1000))/1000;"ohm"
  61. 700 printtab(16)"[150]<taste>[158]";
  62. 710 poke198,0:wait198,1:goto220
  63. 720 :
  64. 730 print"":return
  65. 740 gosub730:print"                                       ":print"[145]";:return
  66. 750 :
  67. 760 :
  68. 770 rem ********** tiefpass **********
  69. 780 :
  70. 790 fo=0:v=0:c2=0
  71. 800 gosub740:print"grenzfrequenz [khz]:       ";:syssy:input"[157][157][157]";fo
  72. 810 iffo=<0then790
  73. 820 gosub740:print"verstaerkung:              ";:syssy:input"[157][157][157]";v
  74. 830 ifv<1then820
  75. 840 gosub740:print"kondensator c2 [nf]:       ";:syssy:input"[157][157][157]";c2
  76. 850 ifc2=<0then840
  77. 860 :
  78. 870 fo=fo*10^3:c2=c2*10^(-9):v=int(v)
  79. 880 c1=2*c2*(v+1)
  80. 890 r1=(2/(4*(NULL)*fo*c1*v))
  81. 900 r2=v*r1
  82. 910 r3=v*r1/(v+1)
  83. 920 :
  84. 930 gosub740:o=fo:gosub1680:print"[145][145][145]grenzfrequenz"f$
  85. 940 o$="":o=v:gosub1780:print"verstaerkung:"f$"[158]"
  86. 950 o=r1:gosub1520
  87. 960 gosub740:print"r1 :";f$
  88. 970 o=r2:gosub1520
  89. 980 print"r2 :";f$
  90. 990 o=r3:gosub1520
  91. 1000 print"r3 :";f$
  92. 1010 gosub730:o=c1:gosub1830:printtab(20)"c1 :";f$
  93. 1020 o=c2:gosub1830:printtab(20)"c2 :";f$
  94. 1030 print:goto700
  95. 1040 :
  96. 1050 :
  97. 1060 rem ********** hochpass ***********
  98. 1070 :
  99. 1080 fo=0:v=0:c1=0
  100. 1090 gosub740:print"grenzfrequenz [khz]:       ";:syssy:input"[157][157][157]";fo
  101. 1100 iffo=<0then1090
  102. 1110 gosub740:print"verstaerkung:              ";:syssy:input"[157][157][157]";v
  103. 1120 ifv=<0then1110
  104. 1130 gosub740:print"kondensatoren  c1=c2 [nf]  ";:syssy:input"[157][157][157]";c1
  105. 1140 ifc1=<0then1130
  106. 1150 :
  107. 1160 fo=fo*10^3:c1=c1*10^(-9):c2=c1:v=int(v)
  108. 1161 r2=(v+1)/(sqr(2)*(NULL)*fo*c1)
  109. 1170 r1=sqr(2)/(2*(NULL)*fo*c1*(2+1/v))
  110. 1171 c3=c1/v
  111. 1172 :
  112. 1173 gosub740:o=fo:gosub1680:print"[145][145][145][145]grenzfrequenz:"f$
  113. 1174 o$="":o=v:gosub1780:print"verstaerkung: "f$"[158]"
  114. 1180 gosub740:o=r1:gosub1520:print"[145]r1 :"f$
  115. 1200 o=r2:gosub1520:print"r2 :"f$
  116. 1220 gosub730:o=c1:gosub1830:printtab(20)"[145]c1 :"f$
  117. 1230 o=c2:gosub1830:printtab(20)"c2 :"f$
  118. 1240 o=c3:gosub1830:printtab(20)"c3 :"f$
  119. 1250 print:goto700
  120. 1260 :
  121. 1270 :
  122. 1280 rem ********** bandpass **********
  123. 1290 :
  124. 1300 fo=0:b=0:v=0:c1=0
  125. 1310 gosub740:print"mittenfrequenz [khz]:      ";:syssy:input"[157][157][157]";fo
  126. 1320 iffo<=0then1310
  127. 1330 gosub740:print"bandbreite [hz] :          ";:syssy:input"[157][157][157]";b
  128. 1340 ifb<=0then1310
  129. 1350 gosub740:print"verstaerkung :             ";:syssy:input"[157][157][157]";v
  130. 1360 ifv<=0then1350
  131. 1370 gosub740:print"kondensatoren c1=c2 [nf] : ";:syssy:input"[157][157][157]";c1
  132. 1380 ifc1<=0then1370
  133. 1390 gosub740
  134. 1400 fo=fo*10^3:c1=c1*10^(-9):c2=c1:v=int(v)
  135. 1401 :
  136. 1410 r1=1/(v*2*(NULL)*c1*b)
  137. 1411 r2=1/(((2*fo^2)/(b^2)-v)*2*(NULL)*c1*b)
  138. 1412 r3=1/((NULL)*b*c1)
  139. 1413 :
  140. 1417 o=fo:gosub1680:gosub730:print"[145][145][145][145]mittenfrequenz:"f$
  141. 1418 o=b:gosub1680:print"bandbreite:    "f$
  142. 1419 o$="":o=v:gosub1780:print"verstaerkung:  "f$"[158]"
  143. 1420 gosub730:o=r1:gosub1520:print"r1 :";f$
  144. 1440 o=r2:gosub1520:print"r2 :"f$
  145. 1460 o=r3:gosub1520:print"r3 :"f$
  146. 1480 gosub730:o=c1:gosub1830:printtab(20)"c1 :"f$
  147. 1490 o=c2:gosub1830:printtab(20)"c2 :"f$
  148. 1500 print:goto700
  149. 1510 :
  150. 1520 o$=" ohm"
  151. 1530 ifo>=1thenifo<1000then1620
  152. 1540 ifo<1then1620
  153. 1550 o$="kohm"
  154. 1560 o=o*10^-3
  155. 1570 ifo>=1thenifo<1000then1620
  156. 1580 o$="mohm"
  157. 1590 o=o*10^-3
  158. 1600 ifo>=1thenifo<1000then1620
  159. 1610 :
  160. 1620 o=int(o*100):o=o/100
  161. 1630 f$=str$(o)
  162. 1640 iflen(f$)<7thenf$=" "+f$:goto1640
  163. 1650 f$=f$+" "+o$:return
  164. 1660 ifo>1thenifo<1000then1780
  165. 1670 :
  166. 1680 o$=" hz"
  167. 1690 ifo>=1thenifo<1000then1620
  168. 1700 ifo<1then1780
  169. 1710 o$="khz"
  170. 1720 o=o*10^-3
  171. 1730 ifo>=1thenifo<1000then1780
  172. 1740 o$="mhz"
  173. 1750 o=o*10^-3
  174. 1760 ifo>=1thenifo<1000then1780
  175. 1770 :
  176. 1780 o=int(o*100):o=o/100
  177. 1790 f$=str$(o)
  178. 1800 iflen(f$)<7thenf$=" "+f$:goto1800
  179. 1810 f$=f$+" "+o$:return
  180. 1820 :
  181. 1830 o$=" f"
  182. 1840 ifo>=1then1980
  183. 1850 o$="mf"
  184. 1860 o=o*10^3
  185. 1870 ifo>=1then1980
  186. 1880 o$="uf"
  187. 1890 o=o*10^3
  188. 1900 ifo>=1then1980
  189. 1910 o$="nf"
  190. 1920 o=o*10^3
  191. 1930 ifo>=1then1980
  192. 1940 o$="pf"
  193. 1950 o=o*10^3
  194. 1960 ifo>=1then1980
  195. 1970 :
  196. 1980 o=int(o*100):o=o/100
  197. 1990 f$=str$(o)
  198. 2000 iflen(f$)<7thenf$=" "+f$:goto1800
  199. 2010 f$=f$+" "+o$:return
  200.