The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

MCODE - Unit Conversion
Message #1 Posted by 聲gel Martin on 25 Mar 2010, 4:35 p.m.

Good news for those interested in archeological achievements :)

I finally cracked the unit conversion functions implemented in the Thermal-1A module - a very nice implementation that I always regarded as a great example of the 41 system capabilities.

I've added the electrical units to the built-in ones, more for the sake of completion than for actual practical purposes - given that SI units are the only practical ones used in electricity.

I love its homogeneity checks, like Horse Power -> Ohm x Amp^2

Will post it at TOS shortly, but I just thought someone out there will be interested in a heads-up.

Best, 簍

      
Re: MCODE - Unit Conversion
Message #2 Posted by Geir Isene on 25 Mar 2010, 6:17 p.m.,
in response to message #1 by 聲gel Martin

Yeay!! Kudos.

Eagerly awaiting TOS upload.

      
Re: MCODE - Unit Conversion
Message #3 Posted by PeterP on 26 Mar 2010, 12:14 a.m.,
in response to message #1 by 聲gel Martin

Awesome! Will you post it with comments? (pretty please, pretty please...)

Cheers

Peter

      
Re: MCODE - Unit Conversion
Message #4 Posted by 聲gel Martin on 26 Mar 2010, 2:36 a.m.,
in response to message #1 by 聲gel Martin

Here are the new units added:

A - AMP
CB - COULOMB
FAD - FARAD
GSS - GAUSS
HY - HENRY
MAX - MAXWELL
OED - OERSTED
O - OHM
V - VOLT
TS - TESLA
WB - WEBER

There's still room for some more - any wishes??

            
Re: MCODE - Unit Conversion
Message #5 Posted by PeterP on 26 Mar 2010, 9:17 a.m.,
in response to message #4 by 聲gel Martin

AU, Lightyear, lightminute

does it have gauss/tesla ?

                  
Re: MCODE - Unit Conversion
Message #6 Posted by Geir Isene on 26 Mar 2010, 11:19 a.m.,
in response to message #5 by PeterP

Parsec

      
Re: MCODE - Unit Conversion
Message #7 Posted by H嶡an Th顤ngren on 26 Mar 2010, 7:58 a.m.,
in response to message #1 by 聲gel Martin

Cool! I have never tried the unit conversion feature before, though I know it exists in various modules.

This sparks my interest to take a look at it.

            
Re: MCODE - Unit Conversion
Message #8 Posted by 聲gel Martin on 26 Mar 2010, 3:21 p.m.,
in response to message #7 by H嶡an Th顤ngren

guys, there's enough units to fill a 32k rom with them :)

I meant to ask about "electrical" units - call it my tribute to my EE years, I still remember longing gor them when I was in college, so this is payback time in some regard.

But not to worry, you can add your own after you see how it works - just give me a couple of days to finish the "blueprints".

Here's the alphabetical list of new units I've added:

AMP
COULOMB
FARAD
FARADAY
GAUSS
HENRY
KiloOHM
MAXWELL
MiliHENRY
OERSTED
OHM
PicoFARAD
VOLT
TESLA
WEBER

next on my list is a catalog function that shows the unit names in sequence... anybody wants to help?

Best, AM

Edited: 26 Mar 2010, 3:22 p.m.

                  
Re: MCODE - Unit Conversion
Message #9 Posted by Eric Smith on 27 Mar 2010, 9:07 p.m.,
in response to message #8 by 聲gel Martin

Did you really have to add KiloOHM, MilliHENRY, and PicoFARAD? I thought they already handled SI prefixes? (Or was that a feature that was added for the 28/48 unit conversions?)

                        
Re: MCODE - Unit Conversion
Message #10 Posted by 聲gel Martin on 28 Mar 2010, 5:19 p.m.,
in response to message #9 by Eric Smith

No support for multiple/submultiple chars in the implementation exists - so yes, they have to be added individually.

mH, pF, and kOhm are more typical than their |proper| SI counterparts and therefore the addition...

      
Re: MCODE - Unit Conversion
Message #11 Posted by Jake Schwartz on 26 Mar 2010, 1:06 p.m.,
in response to message #1 by 聲gel Martin

The fabulous HP Unit Management system was first presented by HP's Eric Vogel on 3/28/81 at the 1981 HP Handheld Conference in Rockville, Maryland. A full 32 pages of the conference proceedings consisted of Eric's material, presented as it first appeared in the HP41 Petroleum Fluids Pac. I remember the audience being amazed. Following the dinner after the one-day affair, Richard Nelson, Irv Weiner (the Providence, RI PPC chapter coordinator), Eric and I returned to the conference meeting room to chat and wound up staying there until 6:30AM the next morning. Fun times.

Jake Schwartz

            
Re: MCODE - Unit Conversion
Message #12 Posted by 聲gel Martin on 26 Mar 2010, 3:11 p.m.,
in response to message #11 by Jake Schwartz

oh my, did those proceedings survive the passing of time or are they lost forever??

it's not that I would have liked having them before, I've had a great time deciphering this rosetta stone - one of the best ones so far!

I'm curious to see if the assumptions I've made align with the original designer goals.- after all reverse-engineering code is always tricky.-

The main unknown was which code to give to the new primary magnitude (the electric current), as all dimensional checks will use it and should be uniquely characterized. I opted for a nice prime -unlucky for some- number and it seems to work quite well :)

And sure I agree, there's nothing short to fabulous in this implementation, still today!

Best, 'AM

                  
[NT] - You've got mail
Message #13 Posted by PeterP on 26 Mar 2010, 11:01 p.m.,
in response to message #12 by 聲gel Martin

Peter

                  
Re: MCODE - Unit Conversion
Message #14 Posted by Jake Schwartz on 26 Mar 2010, 11:06 p.m.,
in response to message #12 by 聲gel Martin

Quote:
oh my, did those proceedings survive the passing of time or are they lost forever??

They survive in the PPC CD#4 disk of conference proceedings from 1979-1999 along with all the Australian HP calc newsletters, but I just put up a copy of that proceedings (around 10 MB) here for viewing or downloading if anybody is interested. None of the pdf bookmarks in the left column will work except for the "contents" one, but Eric's material can be found from pages 13 to 44.

Jake

                        
Re: MCODE - Unit Conversion
Message #15 Posted by 聲gel Martin on 27 Mar 2010, 6:21 a.m.,
in response to message #14 by Jake Schwartz

Got it , many thanks. I guess I should be placing an order for the new DVD to have the complete story.

Best, 簍

            
Re: MCODE - Unit Conversion
Message #16 Posted by Eric Smith on 27 Mar 2010, 9:09 p.m.,
in response to message #11 by Jake Schwartz

I thought Petroleum Fluids ROM had the latest and greatest version, following after the Machine Design ROM and the Thermal Transport ROM. Do I have the history wrong?

      
Re: MCODE - Unit Conversion
Message #17 Posted by Eric Smith on 27 Mar 2010, 9:05 p.m.,
in response to message #1 by 聲gel Martin

HP's most complete implementation of unit conversion for the 41 was in the Petroleum Fluids ROM.

It was extremely clever how they tracked the dimensionality. The general idea was to multiply and divide by prime numbers, so if length (m) was assigned 2, and time (s) was assigned 3, then m/s^2 would be 2/9. However, since multiplication and division are relatively expensive on the Nut processor, they added and subtracted logarithms instead, using a 10 bit field. It is possible to find inconsistent conversions that they won't detect, but it is extremely unlikely in practice.

Edited: 27 Mar 2010, 9:07 p.m.

            
Re: MCODE - Unit Conversion
Message #18 Posted by 聲gel Martin on 28 Mar 2010, 5:22 p.m.,
in response to message #17 by Eric Smith

Yes, I figured that already. I have used 19 (13 Hex) for the Ampere and so far it seems to be uniquely differentiated in all the derived dimensions I've tried.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall