Oscillator Design

Date: 198x
Type: Program
Platform(s): TS 2068

Works out component values for six oscillator circuits: transistor phase-shift, op-amp phase-shift, Wien-bridge, twin-tee, bridged-tee and the 555 timer. Each choice draws the circuit diagram on screen from a custom UDG set (wires, junctions, resistors, capacitors and the ohm sign), with PLOT, DRAW and CIRCLE for transistor bodies, op-amp triangles and output terminals. For the first five you pick a fixed oscillator, entering a frequency and a capacitance, or a variable one, entering the lower and upper frequency limits. The program then prints the resistor values or resistor range under the diagram. The 555 section offers astable and monostable calculations, and any result screen can be sent to the printer with COPY.

The program comes from the TTSUC collection of electronics programs, many of which were submitted by Ronald Ginardi. Its 555 section is the same code published separately as 555 Timer Calculations.

Program Analysis

Program Structure

  • Lines 10–60: load oscudg.Cd (336 bytes at 65200, two sets of 21 UDGs) and point the UDG system variable at the first set.
  • Lines 100–150: the menu. Line 140 dispatches with one computed GO SUB 1000+(a=1)*0+(a=2)*170+…, reaching the diagram routines at 1000, 1170, 1310, 1480 and 1620 and the 555 section at 4090.
  • Lines 160–450: fixed-oscillator calculations, using R=1/(15.391*C*f) for the phase-shift types and R=1/(2*PI*C*f) for the others; the transistor and op-amp versions also give a feedback resistor R4=30*R.
  • Lines 460–670: variable-oscillator calculations, which warn when the range is more than 10:1 and suggest splitting it into two bands.
  • Lines 800–990: input, screen-clearing and keypress subroutines. On the bridged-tee screen, V steps through four circuit variations (lines 900–930, 1770–1800).
  • Lines 1000–1800: the diagrams. The Wien-bridge diagram is drawn almost entirely with short DRAW runs, using small subroutines (1430–1470) for the resistor zigzags and junction dots.
  • Lines 4090–5300: the 555 section, which switches to the second UDG set at 65368. It covers astable mode (find R2, C1 or frequency, using 1.44/((R1+2*R2)*C)) and monostable mode (find T, R or C from T=1.1*R*C), each over a drawn IC diagram.

Notable Techniques

  • Two UDG sets live in one 336-byte block, and the program switches between them by changing the UDG pointer at 23675/23676.
  • Boolean arithmetic replaces IF chains in the menu dispatch, the GO TO targets and the per-circuit print row d.
  • PRINT #0 puts the "Press Z to COPY" prompt in the lower screen so the diagram and results stay untouched.
  • Line 1998 is a leftover utility that prints each UDG next to its letter.

Potential Issues

  • The resistance formulas multiply the capacitance in uF by 10e-6, which is 10-5, not 10-6. The resistor values therefore appear to come out a tenth of what the standard formulas give.
  • Line 500 tests a, which in the variable path always holds 2 (the fixed/variable choice), not the circuit type a1. Every variable design gets the phase-shift constant, and line 510 never runs.
  • In monostable mode, R1=T/1.1*C1*1e06 and C1=T/1.1*R1*1e-06 evaluate left to right, multiplying by the other component instead of dividing by it.
  • An invalid answer at the fixed/variable prompt goes to line 10, which tries to load the UDG file from tape again.
  • The twin-tee screen shares the keypress routine that handles V, so pressing V there draws the bridged-tee variations over it.

This program comes from a Larken disk in the TS User Group collection. For tape, the LKDOS prefixes were removed and the 16-bit LKDOS POKEs of the UDG pointer were replaced with pairs of ordinary POKEs. It was tested in ZEsarUX.

Related Content

Image Gallery

Source Code

   10 RANDOMIZE USR 100: LOAD "oscudg.Cd"CODE 
   40 INK 0: PAPER 7: BORDER 7: CLS : GO TO 60
   60 PRINT #4: POKE 23675,65200: REM setup #2 set of udg's
  100 PRINT "This program will help to solve for component values for many   types of oscillators. Choose thetype of oscillator that you wantto use at this time." 
  110 PRINT ''"1. Transistor Phase Shift       2. Op-amp Phase Shift           3. Wein-Bridge                  4. Twin-Tee                     5. Bridged-Tee                  6. 555 Multivibrator            7. Quit"
  120 INPUT "Select one ... ";a: LET a1=a: LET e=0
  130 BORDER 0: PAPER 0: INK 6: CLS : IF a=7 THEN STOP 
  140 GO SUB 1000+(a=1)*0+(a=2)*170+(a=3)*310+(a=4)*480+(a=5)*620+(a=6)*3090
  150 IF a1=6 THEN LET a1=0: GO TO 60
  160 PRINT ''"1. Fixed oscillator             2. Variable oscillator"
  170 INPUT "Selection ";a: IF a=1 OR a=2 THEN GO TO 190
  180 GO TO 10
  190 LET d=(a1=1)*17+(a1=2)*15+(a1=3)*16+(a1=4)*16+(a1=5)*17: IF a=1 THEN GO SUB 800
  200 IF a=2 THEN GO TO 460
  210 GO TO (a1=1)*220+(a1=2)*220+(a1=3)*300+(a1=4)*360+(a1=5)*410
  220 LET r=INT (1/(15.391*c*10e-6*f)): LET r4=30*r
  230 GO SUB 830
  240 PRINT AT 16,0;"Operating frequency: ";f;" Hz"
  250 PRINT "Capacitors C1=C2=C3= ";c;" uf"
  260 PRINT "Resistors R1=R2=R3= ";r;" o"
  270 IF a1=1 THEN GO TO 290
  280 PRINT "Feedback Resistor R4= ";r4;" o"
  290 GO SUB 960: GO TO 100
  300 LET r=INT (1/(2*PI*c*10e-6*f))
  310 GO SUB 830: PRINT AT d,0;"Operating frequency: ";f;" Hz"
  320 PRINT "Capacitor C1=C2= ";c;" uF"
  330 PRINT "Resistor R3=R4= ";r;"o"
  340 PRINT "Resistor R2 may be a 40ma lamp"
  350 GO SUB 960: GO TO 100
  360 LET r=INT (1/(2*PI*c*10e-6*f))
  370 GO SUB 830: PRINT AT d,0;"Operating frequency: ";f;" Hz"
  380 PRINT "Capacitor C1=C2=C3 ";c;" uF"
  390 PRINT "Resistor R1=R2=R3 ";r;"o"
  400 GO SUB 840: GO TO 100
  410 LET r=INT (1/(2*PI*c*10e-6*f))
  415 PRINT AT d-3,22;"Press ""V""";AT d-2,21;"for circuit";AT d-1,22;"variations"
  420 GO SUB 830: PRINT AT d,0;"Freq: ";f;" Hz"
  430 PRINT "Capacitor C1=C2= ";c;" uF"
  440 PRINT "Resistor R2=R3 ";r;"o"
  450 GO SUB 840: GO TO 100
  460 BORDER 1: PAPER 1: INK 6: CLS : PRINT "Variable Frequency Option       Selected...Set upper and lower  frequency limits."
  470 INPUT "Lower Frequency limit? ";fl: INPUT "Upper Frequency limit? ";fh
  480 IF fh>11*fl THEN PRINT ''"Frequency range is greater than 10:1.  It would be better to    break the range into two bands. Do you want to continue? y/n": INPUT a$: IF a$="n" OR a$="N" THEN GO TO 100
  490 INPUT "Capacitance in uF?",c
  500 IF a=1 OR a=2 THEN LET rl=INT (1/(15.39*c*10e-6*fl)): LET rh=INT (1/(15.39*c*10e-6*fh)): LET r4=30*rh
  510 IF a=3 OR a=4 OR a=5 THEN LET rl=INT (1/(2*PI*c*10e-6*fl)): LET rh=INT (1/(2*PI*c*10e-6*fh))
  520 BORDER 1: PAPER 1: INK 6: LET a=a1: GO SUB 1000+(a1=1)*0+(a1=2)*170+(a1=3)*310+(a1=4)*480+(a1=5)*620: GO TO (a1=1)*530+(a1=2)*530+(a1=3)*580+(a1=4)*530+(a1=5)*630
  530 PRINT AT d,0;"Freq range: ";fl;" to ";fh;" Hz."
  540 PRINT "Capacitors C1=C2=C3= ";c;" uF"
  550 PRINT "Res range: ";rh;" to ";rl;"o"
  560 IF a1=2 THEN PRINT "Feedback resistor R4 = ";r4;"o"
  570 GO SUB 960: GO TO 100
  580 PRINT AT d,0;"Freq range: ";fl;" to ";fh;" Hz."
  590 PRINT "Capacitor C1=C2= ";c;" uF"
  600 PRINT "R3, R4 range: ";rh;" to ";rl;"o"
  610 PRINT "Resistor R2 may be 30ma lamp"
  620 GO SUB 960: GO TO 100
  630 PRINT AT d-3,22;"Press ""V""";AT d-2,21;"for circuit";AT d-1,22;"variations"
  640 PRINT AT d,0;"Freq= ";fl;" to ";fh
  650 PRINT "C1=C2= ";c;" uF"
  660 PRINT "Res range= ";rh;" to ";rl;"o"
  670 GO SUB 840: GO TO 100
  799 STOP 
  800 GO SUB 830
  810 PRINT AT d,0;"Frequency in Hz= ";: INPUT "Frequency ? ";f: PRINT f
  820 PRINT "Capacitance in uF= ";: INPUT "Capacitance ? ";c: RETURN 
  830 PRINT AT d,0;" ";: FOR i=0 TO 127: PRINT " ";: NEXT i: RETURN 
  840 PRINT #0;"Press ""Z"" to COPY               Press ""ENTER"" to CONTINUE"
  850 IF INKEY$="z" OR INKEY$="Z" THEN COPY : RETURN 
  860 IF INKEY$="v" OR INKEY$="V" THEN GO TO 900
  870 IF INKEY$=CHR$ 13 THEN RETURN 
  880 IF INKEY$="" THEN GO TO 850
  890 GO TO 850
  900 IF e=0 THEN LET e=1: GO SUB 1780: GO TO 850
  910 IF e=1 THEN LET e=2: GO SUB 1770: GO TO 850
  920 IF e=2 THEN LET e=3: GO SUB 1740: PAUSE 20: GO TO 850
  930 IF e=3 THEN LET e=0: GO SUB 1800: GO SUB 1740: GO TO 850
  939 STOP 
  960 PRINT #0;"Press ""Z"" to COPY               Press ""ENTER"" to CONTINUE"
  970 IF INKEY$="z" OR INKEY$="Z" THEN COPY : RETURN 
  980 IF INKEY$=CHR$ 13 THEN RETURN 
  990 GO TO 970
  999 STOP 
 1000 CLS : PRINT "   TRANSISTOR Phase Shift Osc."
 1010 PRINT AT 2,13;"tnnnnfnnnnn +V"
 1020 PRINT AT 3,10;"C4 a    e R "
 1030 PRINT AT 4,13;"l    e 4 "
 1040 PRINT AT 5,18;"m"
 1050 PRINT AT 6,3;"tnnnnnnnnnnnnnnh"
 1060 PRINT AT 7,3;"m";TAB 18;"m"
 1070 PRINT AT 8,3;"m C1  C2  C3";TAB 18;"mQ1"
 1080 PRINT AT 9,3;"pninfninfninfnk   C5"
 1090 PRINT AT 10,7;"m   m   m  dnnin  Output"
 1100 PRINT AT 11,6;"Re  Re  Re  eR"
 1110 PRINT AT 12,6;"1e  2e  3e  e5"
 1120 PRINT AT 13,7;"pnnnbnnnbnnh"
 1130 PRINT AT 14,18;"l"
 1140 PLOT 144,101: DRAW 4,0: DRAW 0,2
 1150 PLOT 144,97: DRAW 4,0: DRAW 0,-3
 1160 CIRCLE 139,99,7: CIRCLE 186,91,2: RETURN 
 1170 CLS : PRINT AT 0,1;"OP-AMP Phase Shift Oscillator"
 1180 PRINT AT 2,4;"tnnnnnnnnnnjjnnnnnr"
 1190 PRINT AT 3,4;"m           R4    m"
 1200 PRINT AT 4,4;"dnnnnnn-          m"
 1210 PRINT AT 5,4;"e R         nnnnnngn  Output"
 1220 PRINT AT 6,4;"e 1tnnn+          m"
 1230 PRINT AT 7,4;"m  l              a C3"
 1240 PRINT AT 8,4;"pinfninnnnnnnnnnnnh"
 1250 PRINT AT 9,5;"C1m C2           m"
 1260 PRINT AT 10,7;"e R";TAB 22;"e R" 
 1270 PRINT AT 11,7;"e 2";TAB 22;"e 3" 
 1280 PRINT AT 12,7;"l";TAB 22;"l"
 1290 PLOT 87,115: DRAW 0,32: DRAW 39,-16: DRAW -39,-16: CIRCLE 194,131,2
 1300 RETURN 
 1310 CLS : PRINT TAB 4;"Wein-Bridge Oscillator"
 1320 PRINT AT 2,8;"nnnnnnnnnnnnnnnr"
 1330 PLOT 63,155: GO SUB 1430: DRAW 17,-17: GO SUB 1440: DRAW 17,-17
 1340 GO SUB 1430: DRAW -17,-17: GO SUB 1450: DRAW -17,-17
 1350 DRAW -7,7: GO SUB 1430: DRAW -10,10: GO SUB 1460: DRAW -10,10: GO SUB 1420: GO SUB 1430: DRAW -7,7
 1360 GO SUB 1430: DRAW 12,12: DRAW -3,3: DRAW 6,-6: PLOT 33,121: DRAW -1,0: DRAW -5,5: DRAW 0,1: PLOT 30,124: DRAW 8,8: GO SUB 1470: DRAW 11,11
 1370 PRINT AT 8,18;"-";AT 10,18;"+"
 1380 PRINT AT 15,1;"nnnnnnnnnnnnnnq";AT 14,15;"m";AT 13,15;"m";AT 12,15;"m";AT 11,15;"m";AT 10,15;"tnn";AT 9,23;"bn";AT 8,26;"Output";AT 8,23;"m";AT 7,23;"m";AT 6,23;"m";AT 5,23;"m";AT 4,23;"m";AT 3,23;"m"
 1390 PLOT 14,110: DRAW -10,0: DRAW 0,-59: DRAW 3,0: PLOT 111,107: DRAW 32,0: DRAW 0,8: DRAW 39,-16: DRAW -39,-16: DRAW 0,23
 1400 CIRCLE 202,99,2: PRINT AT 12,24;"R1=R2";AT 13,24;"R3=R4";AT 14,24;"C1=C2"
 1410 PRINT AT 4,2;"R3";AT 5,12;"R1";AT 6,1;"C1";AT 11,6;"R4";AT 11,12;"R2";AT 13,1;"C2";AT 14,28;"": RETURN 
 1420 PLOT 54,69: DRAW -10,-10: DRAW -15,15: PLOT 26,71: DRAW 0,1: DRAW 5,5: DRAW 1,0: PLOT 30,79: DRAW -6,-6: DRAW 3,3: DRAW -15,15: DRAW 11,11: DRAW 0,1: RETURN 
 1430 DRAW 0,-1: DRAW -1,0: DRAW 0,2: DRAW 2,0: DRAW 0,-2: DRAW -1,1: RETURN 
 1440 DRAW 4,1: DRAW -3,-8: DRAW 7,3: DRAW -3,-8: DRAW 7,3: DRAW -1,-5: RETURN 
 1450 DRAW 1,-4: DRAW -8,3: DRAW 3,-7: DRAW -8,3: DRAW 3,-7: DRAW -4,1: RETURN 
 1460 DRAW -4,-1: DRAW 3,8: DRAW -7,-3: DRAW 3,8: DRAW -7,-3: DRAW 1,5: RETURN 
 1470 DRAW -1,4: DRAW 8,-3: DRAW -3,7: DRAW 8,-3: DRAW -3,7: DRAW 4,-1: RETURN 
 1480 CLS : PRINT "      TWIN-TEE Oscillator"
 1490 PRINT AT 2,2;"tnnnnninnnfnnninnnfnnjjnnn +V"
 1500 PRINT AT 3,2;"m    C1  Re   C2  m  R4"
 1510 PRINT AT 4,2;"m        1e       m"
 1520 PRINT AT 5,2;"m    R2   l   R3  m"
 1530 PRINT AT 6,2;"dnnnnjjnnnfnnnjjnngnn  Output"
 1540 PRINT AT 7,2;"m        Ca       m"
 1550 PRINT AT 8,2;"m        3m       m"
 1560 PRINT AT 9,2;"m         l       m"
 1570 PRINT AT 10,2;"m     Q1    nnnnnnq"
 1580 PRINT AT 11,2;"pnnnnnnnnnc"
 1590 PRINT AT 13,13;"l"
 1600 PLOT 103,80: DRAW 5,-5: DRAW 0,-5: PLOT 103,88: DRAW 3,3: DRAW 5,0
 1610 CIRCLE 100,83,7: CIRCLE 185,123,2: RETURN 
 1620 CLS : PRINT "    BRIDGED-TEE Oscillator"
 1630 PRINT AT 2,3;"tnnnnnnnjjnnnnnnnnr"
 1640 PRINT AT 3,3;"m       R3        m"
 1650 PRINT AT 4,3;"dnnnninnnfnnninnnnh"
 1660 PRINT AT 5,3;"m   C1  Re  C2    m"
 1670 PRINT AT 6,3;"m       2e        m"
 1680 PRINT AT 7,3;"m        l        m"
 1690 PRINT AT 8,3;"pnnnnnn-          m"
 1700 PRINT AT 9,15;"nnnnnngnn  Output"
 1710 PRINT AT 10,3;"tnnnnnn+          m"
 1720 PRINT AT 11,3;"m                 m"
 1730 PRINT AT 12,3;"dnnnnnnnnjjnnnnnnnq"
 1740 PRINT AT 13,3;"eR       R1"
 1750 PRINT AT 14,3;"e4 ";AT 15,3;"l  ";AT 16,3;" "
 1760 PLOT 79,83: DRAW 0,32: DRAW 39,-16: DRAW -39,-16: CIRCLE 194,99,2: RETURN 
 1770 PRINT AT 2,11;"in";AT 3,11;"C1";AT 4,7;"jj";AT 4,15;"jj";AT 5,7;"R2";AT 5,15;"R3";AT 5,11;"Ca";AT 6,11;"2m": RETURN 
 1780 PRINT AT 13,3;"  ";AT 14,3;"  ";AT 15,3;" ";AT 16,3;"l"
 1790 PLOT 29,71: DRAW 13,-10,2.5*PI/3: DRAW -13,-10,2.5*PI/3: DRAW -1,0: DRAW 0,-4: CIRCLE 35,61,9: RETURN 
 1800 PRINT AT 2,11;"jj";AT 3,11;"R3";AT 4,7;"in";AT 4,15;"in";AT 5,7;"C1";AT 5,15;"C2";AT 5,11;"Re";AT 6,11;"1e": RETURN 
 1997 STOP 
 1998 FOR i=0 TO 19: PRINT CHR$ (144+i);"  ";CHR$ (97+i): NEXT i
 1999 STOP 
 4090 LET v$="                                "
 4100 REM 555 timer calculations
 4105 CLS : PRINT #4: POKE 23675,65368
 4110 FOR i=5 TO 15 STEP 2
 4120 PRINT PAPER i/2-2; INK 9;AT i,i-5;"555 timer calculations"
 4130 NEXT i
 4140 INPUT "Astable Monostable Quit A/M/Q   ";a$
 4150 IF a$="q" OR a$="Q" OR a$="" THEN RETURN 
 4160 IF a$="m" OR a$="M" THEN GO TO 4580
 4170 IF a$="a" OR a$="A" THEN GO TO 4190
 4180 GO TO 4100
 4190 REM Do astable calculations
 4200 GO SUB 5000
 4230 PRINT AT 16,0;"0  to quit                      "
 4240 PRINT "1 find R2 given R1=1K & input C1"
 4250 PRINT "2 find C1 given R1=1K & input R2"
 4260 PRINT "3 find C1 given input R1 & R2"
 4270 PRINT "4 find F  given input R1, R2, C1"
 4280 INPUT "Choose a number. ";IN
 4285 OVER 0: PRINT AT 16,0;v$;v$;v$;v$;v$
 4290 IF IN=0 THEN CLS : GO TO 4140
 4295 IF IN=1 THEN GO SUB 4330
 4300 IF IN=2 THEN GO SUB 4390
 4305 IF IN=3 THEN GO SUB 4450
 4310 IF IN=4 THEN GO SUB 4510
 4320 GO TO 4220
 4330 REM find R2 given R1=1K,            C1 entered
 4340 LET R1=1000
 4345 INPUT "Frequency= ";F
 4350 INPUT "Give value for C1 ";C1
 4360 LET R2=(1.44/(F*C1/1e06)-R1)/2
 4370 GO SUB 4870
 4380 RETURN 
 4390 REM find C1 given R1=1K,            R2 entered
 4400 LET R1=1000
 4405 INPUT "Frequency= ";F
 4410 INPUT "R2= ";R2
 4420 LET C1=1.44/(F*(R1+2*R2))*1e06
 4430 GO SUB 4870
 4440 RETURN 
 4450 REM find C1 given R1,               R2 input
 4455 INPUT "Frequency= ";F
 4460 INPUT "R1= ";R1
 4470 INPUT "R2= ";R2
 4480 LET C1=1.44/(F*(R1+2*R2))*1e06
 4490 GO SUB 4870
 4500 RETURN 
 4510 REM find F given C1, R1, R2
 4520 INPUT "C1= ";C1
 4530 INPUT "R1= ";R1
 4540 INPUT "R2= ";R2
 4550 LET F=1.44/(C1*.000001*(R1+2*R2))
 4560 GO SUB 4870
 4570 RETURN 
 4580 REM monostable calculations
 4590 GO SUB 5200
 4600 PRINT AT 16,0;"0  to quit                      "
 4610 PRINT "1 find T, given R & C"
 4620 PRINT "2 find R, given T & C"
 4630 PRINT "3 find C, given R & T"
 4640 INPUT "Choose a number. ";IN
 4645 OVER 0: PRINT AT 16,0;v$;v$;v$;v$;v$
 4650 IF IN=0 THEN CLS : GO TO 4140
 4655 IF IN=1 THEN GO SUB 4720
 4660 IF IN=2 THEN GO SUB 4770
 4665 IF IN=3 THEN GO SUB 4820
 4690 PRINT AT 16,10;"C= ";C1;" uf";AT 17,10;"R= ";R1;" ohms";AT 18,10;"T= ";T*1000;" msec"
 4700 GO SUB 4920
 4710 GO TO 4600
 4720 REM find T given R&C
 4730 INPUT "R1=  ";R1
 4740 INPUT "C1=  ";C1
 4750 LET T=1.1*R1*C1*1e-06
 4760 RETURN 
 4770 REM find R given T & C
 4780 INPUT "T=  ";T
 4790 INPUT "C1=  ";C1
 4800 LET R1=T/1.1*C1*1e06
 4810 RETURN 
 4820 REM find C1 given R & T
 4830 INPUT "R1=  ";R1
 4840 INPUT "T=  ";T
 4850 LET C1=T/1.1*R1*1e-06
 4860 RETURN 
 4869 STOP 
 4870 REM print astable variables
 4880 PRINT AT 16,5;"Freq= ";f;" Hz"
 4890 PRINT TAB 5;"C1= ";C1;" uf"
 4900 PRINT TAB 5;"R1= ";R1;" ohms"
 4910 PRINT TAB 5;"R2= ";R2;" ohms"
 4920 INPUT "Press any key to continue       ""Z"" to COPY ";a$
 4930 IF a$="Z" OR a$="z" THEN COPY : RETURN 
 4940 IF a$="" THEN RETURN 
 4950 RETURN 
 4999 STOP 
 5000 CLS : OVER 1
 5010 PLOT 79,152: DRAW 97,0: DRAW 0,-73: DRAW -97,0: DRAW 0,71: PLOT 79,151: DRAW 96,0: DRAW 0,-71: DRAW -95,0: DRAW 0,70
 5020 FOR i=1 TO 9: PRINT PAPER 4;AT 2+i,10;"            ": NEXT i
 5030 PRINT AT 6,15;"IC1";AT 6,19;"out";AT 7,15;"555"
 5040 PRINT AT 3,11;"Vc";AT 3,15;"rst";AT 5,10;"dsch";AT 7,10;"thr";AT 9,10;"trg";AT 9,16;"bypass";AT 11,13;"Vs"
 5050 PRINT AT 2,16;"4m";AT 1,5;"tnnnnnnfnnbnr";AT 0,13;"+5V";AT 2,11;"8m"
 5060 PRINT AT 2,5;"m";AT 3,5;"e";AT 4,5;"e";AT 5,5;"dnnnn";AT 3,2;"R1"
 5070 PRINT AT 4,9;7;AT 6,5;"m";AT 7,5;"e";AT 8,5;"e"
 5080 PRINT AT 7,2;"R2";AT 7,7;"tnn";AT 9,5;"dnbnn";AT 6,9;6;AT 8,7;"m 2"
 5090 PRINT AT 10,5;"m";AT 11,5;"a";AT 11,3;"C1";AT 12,5;"m";AT 13,5;"pnnnnnnnnbnnnnnnnnnq"
 5100 PRINT AT 12,13;"1m";AT 11,24;"a";AT 12,24;"m .1";AT 11,26;"C2"
 5110 PRINT AT 9,22;"nnr";AT 10,24;"m";AT 8,22;5
 5120 PRINT AT 5,22;3;AT 6,22;"nn": CIRCLE 194,123,2: PRINT AT 5,25;"Astable";AT 6,26;"Output"
 5130 OVER 0
 5140 RETURN 
 5200 CLS : OVER 1
 5210 PLOT 87,152: DRAW 97,0: DRAW 0,-73: DRAW -97,0: DRAW 0,71: PLOT 87,151: DRAW 96,0: DRAW 0,-71: DRAW -95,0: DRAW 0,70
 5220 FOR i=1 TO 9: PRINT PAPER 5;AT 2+i,11;"            ": NEXT i
 5230 PRINT AT 6,16;"IC1";AT 6,20;"out";AT 7,16;"555"
 5240 PRINT AT 3,12;"Vc";AT 3,16;"rst";AT 5,11;"dsch";AT 7,11;"thr";AT 9,11;"trg";AT 9,17;"bypass";AT 11,14;"Vs"
 5250 PRINT AT 0,14;"+5V";AT 1,8;"tnnnnfnbnnr";AT 2,12;"8m   4m"
 5260 PRINT AT 2,8;"m";AT 3,6;"R1e";AT 4,8;"e 7";AT 5,8;"dnn";
 5270 PRINT AT 6,8;"m 6";AT 7,0;"Trigger dnn";AT 8,0;"Input   m 2": CIRCLE 45,99,2: PRINT AT 9,6;"nngnn"
 5280 PRINT AT 10,8;"m";AT 11,6;"C1a";AT 12,8;"m     1m";AT 13,8;"pnnnnnnbnnnnnnnnnq"
 5290 PRINT AT 11,25;"a C2";AT 12,25;"m .1";AT 9,23;"nnr";AT 10,25;"m";AT 8,23;"5";AT 5,23;"3";AT 6,23;"nn  Pulse";AT 7,26;"Output": CIRCLE 202,123,2
 5300 OVER 0: RETURN 
 9000 PRINT #4: SAVE "oscltr.Ba" LINE 4: PRINT #4: SAVE "oscudg.Cd"CODE 65200,336

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.