Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Regulars » Regulars/StarInfo/Marshall/!Any/!Help

Regulars/StarInfo/Marshall/!Any/!Help

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Regulars
Filename: Regulars/StarInfo/Marshall/!Any/!Help
Read OK:
File size: 085B bytes
Load address: 0000
Exec address: 0000
File contents
Any RC
~~~~~~~

by P.E.Marshall


Only a finite number of different resistor values are manufactured. 
Low cost ranges in common use have only 12 'preferred' values per 
decade, thus there is a difference between adjacent values of 20%,
although the resistors themselves may have a tolerance of 5% or 
even 2%.

Virtually any intermediate value can be obtained by using two 
resistors in series or in parallel. A parallel pair is usually more
convenient for a printed circuit board layout, while series is better
for high voltage applications.

The value of resistors in parallel is given by R = 1/(1/r1+1/r2) and
in series simply by   R = r1 + r2.                  

This program calculates the two values required to obtain a given 
target resistance. It may be desirable to keep the two values as 
close to each other as possible to aid power sharing or voltage 
distribution, so the option is provided to acheive this, provided
the tolerance of the target value can be relaxed. 

In 'Highest Accuracy' mode, the results are only displayed when closer
than 20%, but usually the results are surprisingly accurate.
Another mode allows one of the values to be chosen by the user. This
can be faster if you know near enough what one value will be.

The program also the user if a single value would be closer than a pair.

Select the various options, then enter the target value in the 'required'
box. Press return, or click on the 'Calculate' icon. The displayed 
results can also be altered to see the result of changing one or both
values.

The algorithm used is rather crude - the program simply tries every
combination to see which is best and so is therefore rather slow. No
doubt a proper mathematician could come up with something better!

Capacitors can also be calculated, and 12 or 24 values per decade
selected.  When entering the value to be calculated the suffix K, M, 
n or u (for �) may be used. Ohms or pf are used by default. Notice 
I didn't use the omega symbol for ohms because there isn't one! The
program redefines system font character 191 to omega (normally an
upside-down question mark!)


P.E.Marshall   21/11/94.
00000000  41 6e 79 20 52 43 0a 7e  7e 7e 7e 7e 7e 7e 0a 0a  |Any RC.~~~~~~~..|
00000010  62 79 20 50 2e 45 2e 4d  61 72 73 68 61 6c 6c 0a  |by P.E.Marshall.|
00000020  0a 0a 4f 6e 6c 79 20 61  20 66 69 6e 69 74 65 20  |..Only a finite |
00000030  6e 75 6d 62 65 72 20 6f  66 20 64 69 66 66 65 72  |number of differ|
00000040  65 6e 74 20 72 65 73 69  73 74 6f 72 20 76 61 6c  |ent resistor val|
00000050  75 65 73 20 61 72 65 20  6d 61 6e 75 66 61 63 74  |ues are manufact|
00000060  75 72 65 64 2e 20 0a 4c  6f 77 20 63 6f 73 74 20  |ured. .Low cost |
00000070  72 61 6e 67 65 73 20 69  6e 20 63 6f 6d 6d 6f 6e  |ranges in common|
00000080  20 75 73 65 20 68 61 76  65 20 6f 6e 6c 79 20 31  | use have only 1|
00000090  32 20 27 70 72 65 66 65  72 72 65 64 27 20 76 61  |2 'preferred' va|
000000a0  6c 75 65 73 20 70 65 72  20 0a 64 65 63 61 64 65  |lues per .decade|
000000b0  2c 20 74 68 75 73 20 74  68 65 72 65 20 69 73 20  |, thus there is |
000000c0  61 20 64 69 66 66 65 72  65 6e 63 65 20 62 65 74  |a difference bet|
000000d0  77 65 65 6e 20 61 64 6a  61 63 65 6e 74 20 76 61  |ween adjacent va|
000000e0  6c 75 65 73 20 6f 66 20  32 30 25 2c 0a 61 6c 74  |lues of 20%,.alt|
000000f0  68 6f 75 67 68 20 74 68  65 20 72 65 73 69 73 74  |hough the resist|
00000100  6f 72 73 20 74 68 65 6d  73 65 6c 76 65 73 20 6d  |ors themselves m|
00000110  61 79 20 68 61 76 65 20  61 20 74 6f 6c 65 72 61  |ay have a tolera|
00000120  6e 63 65 20 6f 66 20 35  25 20 6f 72 20 0a 65 76  |nce of 5% or .ev|
00000130  65 6e 20 32 25 2e 0a 0a  56 69 72 74 75 61 6c 6c  |en 2%...Virtuall|
00000140  79 20 61 6e 79 20 69 6e  74 65 72 6d 65 64 69 61  |y any intermedia|
00000150  74 65 20 76 61 6c 75 65  20 63 61 6e 20 62 65 20  |te value can be |
00000160  6f 62 74 61 69 6e 65 64  20 62 79 20 75 73 69 6e  |obtained by usin|
00000170  67 20 74 77 6f 20 0a 72  65 73 69 73 74 6f 72 73  |g two .resistors|
00000180  20 69 6e 20 73 65 72 69  65 73 20 6f 72 20 69 6e  | in series or in|
00000190  20 70 61 72 61 6c 6c 65  6c 2e 20 41 20 70 61 72  | parallel. A par|
000001a0  61 6c 6c 65 6c 20 70 61  69 72 20 69 73 20 75 73  |allel pair is us|
000001b0  75 61 6c 6c 79 20 6d 6f  72 65 0a 63 6f 6e 76 65  |ually more.conve|
000001c0  6e 69 65 6e 74 20 66 6f  72 20 61 20 70 72 69 6e  |nient for a prin|
000001d0  74 65 64 20 63 69 72 63  75 69 74 20 62 6f 61 72  |ted circuit boar|
000001e0  64 20 6c 61 79 6f 75 74  2c 20 77 68 69 6c 65 20  |d layout, while |
000001f0  73 65 72 69 65 73 20 69  73 20 62 65 74 74 65 72  |series is better|
00000200  0a 66 6f 72 20 68 69 67  68 20 76 6f 6c 74 61 67  |.for high voltag|
00000210  65 20 61 70 70 6c 69 63  61 74 69 6f 6e 73 2e 0a  |e applications..|
00000220  0a 54 68 65 20 76 61 6c  75 65 20 6f 66 20 72 65  |.The value of re|
00000230  73 69 73 74 6f 72 73 20  69 6e 20 70 61 72 61 6c  |sistors in paral|
00000240  6c 65 6c 20 69 73 20 67  69 76 65 6e 20 62 79 20  |lel is given by |
00000250  52 20 3d 20 31 2f 28 31  2f 72 31 2b 31 2f 72 32  |R = 1/(1/r1+1/r2|
00000260  29 20 61 6e 64 0a 69 6e  20 73 65 72 69 65 73 20  |) and.in series |
00000270  73 69 6d 70 6c 79 20 62  79 20 20 20 52 20 3d 20  |simply by   R = |
00000280  72 31 20 2b 20 72 32 2e  20 20 20 20 20 20 20 20  |r1 + r2.        |
00000290  20 20 20 20 20 20 20 20  20 20 0a 0a 54 68 69 73  |          ..This|
000002a0  20 70 72 6f 67 72 61 6d  20 63 61 6c 63 75 6c 61  | program calcula|
000002b0  74 65 73 20 74 68 65 20  74 77 6f 20 76 61 6c 75  |tes the two valu|
000002c0  65 73 20 72 65 71 75 69  72 65 64 20 74 6f 20 6f  |es required to o|
000002d0  62 74 61 69 6e 20 61 20  67 69 76 65 6e 20 0a 74  |btain a given .t|
000002e0  61 72 67 65 74 20 72 65  73 69 73 74 61 6e 63 65  |arget resistance|
000002f0  2e 20 49 74 20 6d 61 79  20 62 65 20 64 65 73 69  |. It may be desi|
00000300  72 61 62 6c 65 20 74 6f  20 6b 65 65 70 20 74 68  |rable to keep th|
00000310  65 20 74 77 6f 20 76 61  6c 75 65 73 20 61 73 20  |e two values as |
00000320  0a 63 6c 6f 73 65 20 74  6f 20 65 61 63 68 20 6f  |.close to each o|
00000330  74 68 65 72 20 61 73 20  70 6f 73 73 69 62 6c 65  |ther as possible|
00000340  20 74 6f 20 61 69 64 20  70 6f 77 65 72 20 73 68  | to aid power sh|
00000350  61 72 69 6e 67 20 6f 72  20 76 6f 6c 74 61 67 65  |aring or voltage|
00000360  20 0a 64 69 73 74 72 69  62 75 74 69 6f 6e 2c 20  | .distribution, |
00000370  73 6f 20 74 68 65 20 6f  70 74 69 6f 6e 20 69 73  |so the option is|
00000380  20 70 72 6f 76 69 64 65  64 20 74 6f 20 61 63 68  | provided to ach|
00000390  65 69 76 65 20 74 68 69  73 2c 20 70 72 6f 76 69  |eive this, provi|
000003a0  64 65 64 0a 74 68 65 20  74 6f 6c 65 72 61 6e 63  |ded.the toleranc|
000003b0  65 20 6f 66 20 74 68 65  20 74 61 72 67 65 74 20  |e of the target |
000003c0  76 61 6c 75 65 20 63 61  6e 20 62 65 20 72 65 6c  |value can be rel|
000003d0  61 78 65 64 2e 20 0a 0a  49 6e 20 27 48 69 67 68  |axed. ..In 'High|
000003e0  65 73 74 20 41 63 63 75  72 61 63 79 27 20 6d 6f  |est Accuracy' mo|
000003f0  64 65 2c 20 74 68 65 20  72 65 73 75 6c 74 73 20  |de, the results |
00000400  61 72 65 20 6f 6e 6c 79  20 64 69 73 70 6c 61 79  |are only display|
00000410  65 64 20 77 68 65 6e 20  63 6c 6f 73 65 72 0a 74  |ed when closer.t|
00000420  68 61 6e 20 32 30 25 2c  20 62 75 74 20 75 73 75  |han 20%, but usu|
00000430  61 6c 6c 79 20 74 68 65  20 72 65 73 75 6c 74 73  |ally the results|
00000440  20 61 72 65 20 73 75 72  70 72 69 73 69 6e 67 6c  | are surprisingl|
00000450  79 20 61 63 63 75 72 61  74 65 2e 0a 41 6e 6f 74  |y accurate..Anot|
00000460  68 65 72 20 6d 6f 64 65  20 61 6c 6c 6f 77 73 20  |her mode allows |
00000470  6f 6e 65 20 6f 66 20 74  68 65 20 76 61 6c 75 65  |one of the value|
00000480  73 20 74 6f 20 62 65 20  63 68 6f 73 65 6e 20 62  |s to be chosen b|
00000490  79 20 74 68 65 20 75 73  65 72 2e 20 54 68 69 73  |y the user. This|
000004a0  0a 63 61 6e 20 62 65 20  66 61 73 74 65 72 20 69  |.can be faster i|
000004b0  66 20 79 6f 75 20 6b 6e  6f 77 20 6e 65 61 72 20  |f you know near |
000004c0  65 6e 6f 75 67 68 20 77  68 61 74 20 6f 6e 65 20  |enough what one |
000004d0  76 61 6c 75 65 20 77 69  6c 6c 20 62 65 2e 0a 0a  |value will be...|
000004e0  54 68 65 20 70 72 6f 67  72 61 6d 20 61 6c 73 6f  |The program also|
000004f0  20 74 68 65 20 75 73 65  72 20 69 66 20 61 20 73  | the user if a s|
00000500  69 6e 67 6c 65 20 76 61  6c 75 65 20 77 6f 75 6c  |ingle value woul|
00000510  64 20 62 65 20 63 6c 6f  73 65 72 20 74 68 61 6e  |d be closer than|
00000520  20 61 20 70 61 69 72 2e  0a 0a 53 65 6c 65 63 74  | a pair...Select|
00000530  20 74 68 65 20 76 61 72  69 6f 75 73 20 6f 70 74  | the various opt|
00000540  69 6f 6e 73 2c 20 74 68  65 6e 20 65 6e 74 65 72  |ions, then enter|
00000550  20 74 68 65 20 74 61 72  67 65 74 20 76 61 6c 75  | the target valu|
00000560  65 20 69 6e 20 74 68 65  20 27 72 65 71 75 69 72  |e in the 'requir|
00000570  65 64 27 0a 62 6f 78 2e  20 50 72 65 73 73 20 72  |ed'.box. Press r|
00000580  65 74 75 72 6e 2c 20 6f  72 20 63 6c 69 63 6b 20  |eturn, or click |
00000590  6f 6e 20 74 68 65 20 27  43 61 6c 63 75 6c 61 74  |on the 'Calculat|
000005a0  65 27 20 69 63 6f 6e 2e  20 54 68 65 20 64 69 73  |e' icon. The dis|
000005b0  70 6c 61 79 65 64 20 0a  72 65 73 75 6c 74 73 20  |played .results |
000005c0  63 61 6e 20 61 6c 73 6f  20 62 65 20 61 6c 74 65  |can also be alte|
000005d0  72 65 64 20 74 6f 20 73  65 65 20 74 68 65 20 72  |red to see the r|
000005e0  65 73 75 6c 74 20 6f 66  20 63 68 61 6e 67 69 6e  |esult of changin|
000005f0  67 20 6f 6e 65 20 6f 72  20 62 6f 74 68 0a 76 61  |g one or both.va|
00000600  6c 75 65 73 2e 0a 0a 54  68 65 20 61 6c 67 6f 72  |lues...The algor|
00000610  69 74 68 6d 20 75 73 65  64 20 69 73 20 72 61 74  |ithm used is rat|
00000620  68 65 72 20 63 72 75 64  65 20 2d 20 74 68 65 20  |her crude - the |
00000630  70 72 6f 67 72 61 6d 20  73 69 6d 70 6c 79 20 74  |program simply t|
00000640  72 69 65 73 20 65 76 65  72 79 0a 63 6f 6d 62 69  |ries every.combi|
00000650  6e 61 74 69 6f 6e 20 74  6f 20 73 65 65 20 77 68  |nation to see wh|
00000660  69 63 68 20 69 73 20 62  65 73 74 20 61 6e 64 20  |ich is best and |
00000670  73 6f 20 69 73 20 74 68  65 72 65 66 6f 72 65 20  |so is therefore |
00000680  72 61 74 68 65 72 20 73  6c 6f 77 2e 20 4e 6f 0a  |rather slow. No.|
00000690  64 6f 75 62 74 20 61 20  70 72 6f 70 65 72 20 6d  |doubt a proper m|
000006a0  61 74 68 65 6d 61 74 69  63 69 61 6e 20 63 6f 75  |athematician cou|
000006b0  6c 64 20 63 6f 6d 65 20  75 70 20 77 69 74 68 20  |ld come up with |
000006c0  73 6f 6d 65 74 68 69 6e  67 20 62 65 74 74 65 72  |something better|
000006d0  21 0a 0a 43 61 70 61 63  69 74 6f 72 73 20 63 61  |!..Capacitors ca|
000006e0  6e 20 61 6c 73 6f 20 62  65 20 63 61 6c 63 75 6c  |n also be calcul|
000006f0  61 74 65 64 2c 20 61 6e  64 20 31 32 20 6f 72 20  |ated, and 12 or |
00000700  32 34 20 76 61 6c 75 65  73 20 70 65 72 20 64 65  |24 values per de|
00000710  63 61 64 65 0a 73 65 6c  65 63 74 65 64 2e 20 20  |cade.selected.  |
00000720  57 68 65 6e 20 65 6e 74  65 72 69 6e 67 20 74 68  |When entering th|
00000730  65 20 76 61 6c 75 65 20  74 6f 20 62 65 20 63 61  |e value to be ca|
00000740  6c 63 75 6c 61 74 65 64  20 74 68 65 20 73 75 66  |lculated the suf|
00000750  66 69 78 20 4b 2c 20 4d  2c 20 0a 6e 20 6f 72 20  |fix K, M, .n or |
00000760  75 20 28 66 6f 72 20 b5  29 20 6d 61 79 20 62 65  |u (for .) may be|
00000770  20 75 73 65 64 2e 20 4f  68 6d 73 20 6f 72 20 70  | used. Ohms or p|
00000780  66 20 61 72 65 20 75 73  65 64 20 62 79 20 64 65  |f are used by de|
00000790  66 61 75 6c 74 2e 20 4e  6f 74 69 63 65 20 0a 49  |fault. Notice .I|
000007a0  20 64 69 64 6e 27 74 20  75 73 65 20 74 68 65 20  | didn't use the |
000007b0  6f 6d 65 67 61 20 73 79  6d 62 6f 6c 20 66 6f 72  |omega symbol for|
000007c0  20 6f 68 6d 73 20 62 65  63 61 75 73 65 20 74 68  | ohms because th|
000007d0  65 72 65 20 69 73 6e 27  74 20 6f 6e 65 21 20 54  |ere isn't one! T|
000007e0  68 65 0a 70 72 6f 67 72  61 6d 20 72 65 64 65 66  |he.program redef|
000007f0  69 6e 65 73 20 73 79 73  74 65 6d 20 66 6f 6e 74  |ines system font|
00000800  20 63 68 61 72 61 63 74  65 72 20 31 39 31 20 74  | character 191 t|
00000810  6f 20 6f 6d 65 67 61 20  28 6e 6f 72 6d 61 6c 6c  |o omega (normall|
00000820  79 20 61 6e 0a 75 70 73  69 64 65 2d 64 6f 77 6e  |y an.upside-down|
00000830  20 71 75 65 73 74 69 6f  6e 20 6d 61 72 6b 21 29  | question mark!)|
00000840  0a 0a 0a 50 2e 45 2e 4d  61 72 73 68 61 6c 6c 20  |...P.E.Marshall |
00000850  20 20 32 31 2f 31 31 2f  39 34 2e                 |  21/11/94.|
0000085b