sandy47@.ucsc.edu (Larry McElhiney) (02/28/91)
Article posted for a fellow engineer (Larry Hoppis). Larry ------- The following HP48 program which finds parallel resistance elements will be useful for both electronics technicians and hobbyists. USE: Put the value of the resistance you want on the stack and press PARAL (softkey 'A' in the 'CST' menu). PARAL presents a list of values (standard 1%) which when paralleled will yield the desired value. The accuracy of each combination is also displayed. The required accuracy is specified by the variable ACCU. The soft key ACCUR ('B') stores and retrieves this accuracy variable. Pressing any key while PARAL is running will advance the display to the next 'page' of values. The previous 'page' may be displayed by pressing the soft key PREV ('E'). The program may be exited by pressing softkey QUIT ('F'). Note that the soft key functions will not be visible during the execution of the program but will continue to function normally. THEORY: PARAL uses an equation derived with the HP48 from a list of valid 1% values. This list was created using the formula INV(96) X = X*10 for all values between 1 ohm and 1 G ohm 0.0239852613838*X The HP48 found 0.976300098965*e This equation and its inverse form the basis of PARAL. When X is any integer a unique one percent value will be found. The values created with this equation must then be rounded to 3 digits in order to represent the standard one percent value set. The inverse of this equation creates n 'bins' which, when integer, represent the nth one percent value. PARAL is accurate to at least 4 decimal places for all values from 1 ohm to 9.76E499 ohms (now that's a big resistor *:-)). SPECIAL LOADING INSTRUCTIONS: The GROB element must be edited and turned into a single line before it can be loaded into the calculator. If you are loading this program by hand :( get a cable! (or create a blank GROB and store in in BLNK). %%HP: T(3)A(D)F(.); @ PARAL - Large Version L. Hoppis 2/25/91 DONE Rev 1.1 DIR RPAR \<< DUP .976300098965 / LN 2.39852613838E-2 / CEIL \-> r x \<< PICT { # 0d # 0d } BLNK REPL { # 0d # 0d } PVIEW x 'INDX' STO 0 'y' STO DO INDX 2.39852613838E-2 * EXP .976300098965 * DUP MANT 2 RND SWAP XPON ALOG * DUP r OVER * SWAP r - / .976300098965 / LN 2.39852613838E-2 / IF DUP FP .5 < THEN FLOOR ELSE CEIL END 2.39852613838E-2 * EXP .976300098965 * DUP MANT 2 RND SWAP XPON ALOG * DUP2 DUP2 * ROT ROT + / r %CH IF ABS DUP ACCU < THEN 2 RND \->STR " % -- " + ROT DSP " || " + ROT DSP + + PICT SWAP 1 \->GROB # 16d y # 7d * # 2d + 2 \->LIST SWAP GOR ELSE 3 DROPN END 'y' 1 STO+ 'INDX' 1 STO+ IF y 8 > THEN 0 'y' STO TONE 0 WAIT CASE DUP 15.1 == THEN IF x 9 + INDX < THEN 'INDX' 18 STO- END END END PICT { # 0d # 0d } BLNK REPL ELSE 0 END UNTIL 16.1 == END 'y' PURGE r \>> \>> DSP \<< DUP MANT SWAP XPON CASE DUP 6 \>= THEN 6 - "M\GW" END DUP 3 \>= THEN 3 - "k\GW" END " \GW" END SWAP ALOG ROT * \->STR CASE DUP SIZE 2 < THEN ".00" + END DUP SIZE 3 < THEN ".0" + END DUP SIZE 4 < THEN IF DUP "." POS THEN "0" + END END END SWAP + \>> TONE \<< 5000 .02 BEEP 3000 .01 BEEP \>> ACCU .5 BLNK GROB 131 64 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF701000000000000000000000000000 00004010000000000000000000000000000000401000000000000000000000 00000000004010000000000000000000000000000000401000000000000000 00000000000000004010000000000000000000000000000000401000000000 000000000000000000000E4010000000000000000000000000000002401000 000000000000000000000000000E4010000000000000000000000000000002 401000000000000000000000000000000E4010000000000000000000000000 00000040100000000000000000000000000000024010000000000000000000 00000000000240100000000000000000000000000000024010000000000000 000000000000000002401000000000000000000000000000000E4010000000 00000000000000000000000040100000000000000000000000000000024010 00000000000000000000000000000240100000000000000000000000000000 02401000000000000000000000000000000240100000000000000000000000 00000002401000000000000000000000000000000040100000000000000000 00000000000002501000000000000000000000000000000650100000000000 0000000000000000000E501000000000000000000000000000000A50100000 00000000000000000000000002501000000000000000000000000000000040 1000000000000000000000000000000E401000000000000000000000000000 0002401000000000000000000000000000000E401000000000000000000000 0000000002401000000000000000000000000000000E401000000000000000 00000000000000004010000000000000000000000000000002401000000000 00000000000000000000024010000000000000000000000000000002401000 0000000000000000000000000002401000000000000000000000000000000E 40100000000000000000000000000000004010000000000000000000000000 00000040100000000000000000000000000000004010000000000000000000 00000000000040100000000000000000000000000000004010000000000000 00000000000000000040100000000000000000000000000000004010000000 00000000000000000000000C40100000000000000000000000000000024010 00000000000000000000000000000240100000000000000000000000000000 02401000000000000000000000000000000C40100000000000000000000000 00000000401000000000000000000000000000000040100000000000000000 00000000000000401000000000000000000000000000000040100000000000 00000000000000000000401000000000000000000000000000000040100000 00000000000000000000000000401000000000000000000000000000000040 1000000000000000000000000000000040FFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFF70 INDX 299 CST { { "PARAL" { RPAR } } { "ACCUR" {\<< ACCU \>> \<< 'ACCU'STO \>> } } { "" { } } { "NEXT" { } } { "PREV" { } } { "QUIT" { } } } PPAR { (-6.5,-3.1) (6.5,3.2) X 0 (0,0) FUNCTION Y } END -- Larry L. Hoppis PO Box 472, Mt. Hermon, CA 95041 USA quality!hoppis@ucscc.UCSC.edu (408) 336-3651