Guido Socher: homepage

Guido's RPN calculators

shortcuts: HP15c collection :: HP15c programs :: RPN Tutorials :: Mixed collection :: HP12c programs :: DM42 programs

RPN calculators are not so common because it takes a bit of learning until you can use them. However once you have understood the logic and used them for a while you would never want a different calculator again.

The algebraic notation as used by most calculators LOOKS simpler. Telling a student "Just type it in as you find it in the textbook" is easier than explaining how RPN works. Have however a look at this interessting experiment that compares calculators with RPN and algebraic notation.

Online Javascript implementations and computer desktop versions of RPN calculators


I have been using HP RPN calculators since the beginning of my university years. Now that PCs and Laptops are one every office table I have been looking for a good calculator that just runs independent of the operating system on any computer out there. I did not find one so I wrote one my self. Beginning of 1997 I started to write rpnjcalc. I have used it once in a while but it never really felt like a real HP pocket calculator. I always found my self looking for a real HP pocket calculator when I had to do some calculations. So finally in March 2008 I decided that it must be possible to write a more usable calculator in Javascript and I developed gsrpn. While my calculators work with any old browser (pre 2010) you can find now calculators written for more modern web browsers and they look and work like authentic HP calculators.

My collection of HP15c pocket calculators

Originally I did not collect RPN calculators. I bought them because I used them. Later I bought some just to have them.

The original HP-15c

This calculator was introduced by HP in the summer of 1982. I bought my hp15c in 1988 and it was my first RPN calculator. It has the right size and is robust. I am using it a lot but it is still as good as new. I really like this calculator. There are others calculators which are more powerful and faster but out of all the calculators I have I am mostly using this one. The HP15c is the best calculator. I just love it. You will never use another calculator once you get used to its logic and the HP bevelled keys with this rotate-and-click effect.

It's interessting that this calculator is "1 * π inch" high and "Φ * π inch" wide (where Φ=1.61803...=(1+sqrt(5))/2 prounouce: phi, Φ is also known as the "golden ratio", π=3.141... prounouce: pi, Φ*π=5.083).

The handbook of the HP15c suggest that the expected battery life should be around 2 years but most people were able to use it for more than 10 years on one set of batteries despite intense use. If battery life it important to you then nothing can beat the original HP15c.

original hp15c original hp15c

The HP-15c LE (30 year anniversary edition)

For several month a petition was circulating on the internet to bring back the hp15c and it seems HP took notice and produced at the end of 2011 a "15c Limited Edition", the HP15c-LE. It does not only look similar to the original. It is very much like the original with some small differences. On the down side are a number of firmware faults: hpmuseum.org, list of 15c LE bugs (local pdf copy) but on the up side is the advantage that the 15c-LE runs faster than the original 15c and it has the same good quality keyboard with an excellent "click".

The list of faults of the HP15c-LE might look long list but the only real problem is the fact that the PSE (pause) function can only be called once per program execution. The non working low battery indicator is pretty bad too but you can just use a voltmeter and test the batteries once in a while as described in my hp15c-le battery test article. There is no need to take the batteries out for testing.

All programs that I have ever written are however not affected by that PSE bug.

It's a bit unfortunate that the HP company of today is not any more the company that took pride in producing high quality measurement equipment and calculators. They have not provided a firmware update until a year later and I don't think they will.

I have investigated the HP15c-le power and battery problems and written about them at http://tuxgraphics.org/npa/hp15c-le-power-test/

HP15c LE

The DM15 by swissmicros.com

www.swissmicros.com (previously known as www.rpn-calc.ch) produces a hp15c compatible calculator. It's emulating the original Voyager processor on new hardware and runs runs original HP15c firmware. The hardware is designed with firmware updates in mind. It has therefore, as opposed to the HP15c-LE, no software bugs. I like the fact that the color scheme follows the original hp15c. The calculator is roughly the size of a credit card. The keyboard could however be improved a lot. You have to really watch what you type. If you have big fingers then you have to use a pencil with a soft rubber eraser and type with the rubber end of the pencil. Those rubber eraser tips that you can put onto the end of a pencil give the best results. The credit card sized swissmicros from 2014 and earlier do, unlike the original HP15c, not provide visual key-press feedback in terms of display flashing (blanking and re-drawing). You can however update the firmware to fix this.

The keyboard of these credit card sized calculators consists of a plastic foil that is coated with a metal film on the back. It degrades over time. The metal coating on the inside of the foil flakes off and the glue holding the foil detaches. The keyboard of the calculator lasts only a few years and after that it becomes very difficult to use.

dm15 dm15 dm15 dm15
The DM15 HP clone, I bought this one in November of 2012

Swissmicros.com produces since Oct 2015 a new model called DM-15L. That calculator is really the best looking HP-15C clone that I have seen to this date. The keyboard is better than the one of the credit card sized editions. The case is super strong, has the same dimensions as the original and weighs approximately the same as the original. The keys are flat and not bevelled.

DM15L DM15L DM15L DM15L
The Swissmicros DM-15L

The DM-15L has a serial number on the case. I have three DM-15L with the S/N 430, 554 and 532.

Swissmicros has different keyboard switches under the hood and there is no easy way to know what you have unless you open the calculator. I bought all my DM-15L calculators in 2015. The 2015 version keyboards cause you to make typos. You can get the tactile feedback of a key-press without it registering. It's not as bad as the credit card sized calculators. Swissmicros sent me in 2022, after reporting a completely different problem, one new board and to my big surprise it had now large metal tactile switch buttons. They have must have improved the keyboard during 2016. I have now seen two different 2015 board versions and this 2016 version. The first 2015 keyboard has small soft domes (plastic with silver ink), the second generation 2015 keyboard has small metal domes. The 2016 keyboard has nice large tactile switch buttons with the typical 3 dots on the outside and one dot in the center of the dome. This design is supposed to ensure that the center dot hits the contact once you reach the click-point. It's a significant improvement but it's still not as good as the keyboard of the original hp15c because some of the keyboard problems relate to the plastic keys on top of the keyboard. They have not changed that design and there is no easy way to retrofit different plastic keys. The keys are permanently attached to the case.

DM15L keyboard generations DM15L keyboard generations component side
Left: 2016 keyboard switches, center: 2015 small metal switches, right: 2015 plastic domes

The DM-15L has a number of features to provide visual feedback and this does compensate for some of the problems that the keyboard has:
With these features in place it is possible to complete complex calculations without any error but you have to keep an eye on the display.

For more details about the keyboard see also the chapter HP15C Keyboard comparison further down.

The Swissmicros calculators have a few key combinations that are specific to Swissmicros. The most important ones are:
CHS and then ON: change LCD contrast with + or - keys
1/x (E) and then ON: show firmware version and battery voltage
 Note: 1/X is the key left of CHS and is called E on the DM-16
7   and then ON: change the font
9   and then ON: change clock speed, 48MHz should be the normal speed

Power OFF comsumption can be an issue with some Swissmicros. They can consume anywhere between 4μA to 20μA when they are off and sitting on the shelf. This can give you a battery life between 1 year and 5 years depending on the actual power consumption of your specific model. The off power consumption of the calculator could go up over the years and that is often due to a capacitor labeled as C6 on the board. This capacitor is a 100uF/4V capacitor parallel to the battery. Low voltage capacitors have very thin insulation layers. They are so thin that ambient natural radioactivity can create holes in the insulation. This capacitor was leaking about 10μA on one of my calculators. Replacing the capacitor requires good soldering skills. You don't need 100μF. 10μF is enough and it is better to use a ceramic capacitor with a voltage rating of 25V or more.

The PX15c by Alejandro Garza (Alex Garza)

This calculator has its homepage at https://paxer.net/voyager/ and Alejandro Garza from Mexico sells it via various sites (ebay, etsy, tindie, ...). Its really an achievement from an engineering point of view because he managed to get the entire software into an ATMEGA328P 8-bit AVR microcontroller. It has the full precission and all the capabilities of the original HP15c. It is actually faster than the original and has more program memory. The sleep state power consumption of the ATMEGA328P is 1μA but since the px15c has a clock inside it needs to wake-up every second. The average power consumption is therefore in "off state" about 2μA. This should still result in a theoretical battery life of 14 years if you keep it mostly on the shelf. In practice it will probably be somewhere between 7 years and 10 year. We have to see what happens. The px15c has an optional back-light feature and it can beep at key press. Both are very power consuming features and you should not use them if you care about battery life.

I bought this calculator in October of 2022.

px15c

Small round keys on a calculator seems strange but they do the job without any problems. These tactile switches have real metal domes which are similar to the ones used in the original HP15C. The labels next to the keys are all white and a bit difficult to read. I recommend to print the keyboard of the original HP15c on paper and have that handy when you are looking for a key that you don't often use (You can print this hp15c-kbd-labels.png image). The dimensions of the calculator are not the same as the original HP15c but the difference is small.

The PX15C has a built-in clock and shows the time/date at the top of the screen. A neat feature of the PX15C is the display of program steps not only in the traditional numeric form but also as human readable text at the top of the display. This makes it so much easier to debug programs.

It's possible to change the keyboard on the PX15C and have HP like bevelled keys. Case and keys are 3d-printed. The labels are individually attached to the keys. For more details on this see: http://tuxgraphics.org/npa/px15c-with-bevelled-keys/.

the px15c with bevelled keys

The PX15C has the following special key combinations to change display settings and hardware related settings:

With the calculator turned off, press the '0' button and turn it on. Keep holding the '0' button but release the ON button. You see a page with the version number and other information. Now release the '0' to get the settings menu.
If you don't want to change anything then press the 'ON' button to exit the settings menu.
Options that can be customized:
    BKLT: Backlight intensity (0-9)
    BKTM: Backlight timeout in sec (0-255)
    CONT: Contrast (0-15)
    SLPT: Sleep timer (0-255)
    BEEP: Audible feedback
    1224: Hour format (12hr or 24hr)
    Time and Date: Hours are set in 24hr format

Use the 'divide' and 'multiply' buttons to select an option.
Use the '+' and '-' buttons to increase or decrease value by 1.
Use the '3' and 'Sum' buttons to increase or decrease value by 10.
Advanced Settings Options:
Pressing the '9' key will toggle between normal settings and advanced settings.

    RUNC: Number of cycles to execute at a time
    KEYC: Key cycles to wait before processing it
    DBOU: Key debounce time
    DISC: Number of cycles to add before redrawing display (41C only)
    SSPC: 41C only, number of slow speed cycles before speedup
    BATL: Current battery level, can't be modified
    BATT: Low battery indicator threshold

How to hold the HP15c in your hand

A lot of calculators are "portrait" shaped and you hold them with one hand while you type with the index finger of the other hand. This is not how the HP15c is supposed to be used. You hold the HP15c in both hands and you type with both of your thumbs. It's a much faster then just typing with one finger.

Note that you can't do this with the Swissmicros calculators from 2015. You need to put those Swissmicros calculators on a firm surface and type with just one finger.

holding a hp15c

HP15C keyboard benchmark

It's very important for a calculator to register the key press properly. That is: when you feel a click then it should also happen. This way you can have your eyes on the problem that you would like to solve while you just trust your fingers and the tactile click feedback.

To test a calculator keyboard I came up with the following benchmark. Type the expression at normal speed without pauses while looking at the formula and then check the result. Do it 5 times and see how often you see "1" on the screen (that's the correct result).

Formula: ((3+4)/2+0.5)/(6*6+4)*10
Suggested key sequence: 3 Enter 4 + 2 ÷ . 5 + 6 Enter 6 * 4 + ÷ 10 *
Expected result: 1

ModelNumber of correct results (max 5)
original HP15c5 out of 5
credit card dm15, swissmicros0 out of 5
full size dm15l, swissmicros first generation, 2015 keyboard1 out of 5
full size dm15l, swissmicros second generation, original firmware, 2015 keyboard2 out of 5
full size dm15l, swissmicros second generation, 2021 firmware, 2015 keyboard2-3 out of 5
full size dm15l, swissmicros third generation, 2016 keyboard4 out of 5
HP-15c LE5 out of 5
PX15c with round tactile buttons5 out of 5
PX15c with HP like buttons buttons5 out of 5


Part of the problem of the DM15L is the physical button shape and the fact that the keys are part of the front plastic case. It is one piece of plastic and there is no way to replace just the keys. The keys have quite a bit of slag. They need to go down about 0.5mm before they hit the switches and much of the force applied to a key goes to the front where it disappears simply in the hinge. I believe that swissmicros does understand this because they fixed it in the DM42. You can improve things a bit if you tilt the calculator up with the display area towards you. You can e.g put a pencil under the back feet. This will cause your fingers to touch first the upper part of the keys and fewer forces disappear in the hinges of the keys. On top of the hardware problems swissmicros had also software issues with the scanning of the keys. I noticed a bit of an improvement when I did a firmware update on my DM15L from 2015.

HP15c programs (HP15c program library)

This is a collection of my HP15c programs. The HP15c is easy to use and program but the program code is hard to read (a bit like assembly language) without explanations. I include therefore the algorithm with examples. All programs are freeware (Use them as you like. No warranty).

To enter or exit programing mode you type: g P/R
If you want enter a new program after any existing programs then you type: g RTN, g P/R to enter programming mode and then g BST to go to the very end of the last program.

  1. convert a floating point number into a fraction (numerator and denominator) (uses LBL E)
  2. quadratic equation solver, x2+p*x+q=0 (uses LBL C)
  3. number conversion dec->binary (uses LBL D)
  4. Euclidean algorithm, Greatest Common Divisor (GCD) (uses LBL B), this can also be use to find the LCD (Least Common Multiple)
  5. A dice (uses LBL B)
  6. Generic unit conversion (uses LBL B and LBL A)
  7. number conversion binary->dec (uses LBL A)
  8. Calculate Canadian sales tax (GST/PST) (uses LBL A)
  9. Small program to calculate the modulus: Y mod X (uses LBL B)
  10. Parallel Impedance calculator (uses LBL D)

To run a program at a given label:
- GSB LabelName, e.g: GSB E (shortcut, same as typing GSB f E)
- If the label is a letter then you can also use the shortcut: f LabelName, e.g: f E

To go to a specific program in order to review the code you do this:
- Go to the program label (here E): GTO f E
- Enter program mode: g P/R (now you are at the spot of LBL E)
- Step through the program code one step at a time: SST
- ...
- Exit program mode: g P/R

To go to a specific program line number you can type "GTO CHS nnn" where nnn is a three digit number representing the line number. You can not use this as a programmable instruction in the code but you can use this to jump around to review or debug code.
- Example: go to the line number 11 and then enter program mode to look at that line number: GTO CHS 011 , g P/R
- Example: enter program mode and then jump to line number 5: g P/R , GTO CHS 005
It's important to not make a typo while using GTO CHS in programming mode because doing so can modify the code at the current position.

HP15c RPN tutorials and other HP15c resources

HP15c and the CHS stack lift with zero

There is an inconsistent behavior in the HP15c and other HP calculators with regards to the behavior of the CHS key. Consider this example:
3 Enter                   resulting stack: 3
2 Enter                                    2
CHS                                       -2
1                                          1
This results in the stack as shown on the right. The -2 is considered "computed" and we get an automatic stack lift when the next number is entered, 1 in this case. If we enter however "0" instead of the two then we get a different behavior.
3 Enter                   resulting stack: 
0 Enter                                    3
CHS                                        0
1                                          1
This is the only known bug in the original HP15c and you can work around it by always pressing an extra enter if the number you want to CHS on is already entered or computed. This would keep at least the X and Y registers (bottom two) the same even if there is a zero.

HP15c good to know

If you accidently press g or f then you can't really get out of that. You can switch between g or f but you can not undo the shift keys. The way to get out of this without changing anything in the stack is to type f PREFIX (this button sometimes known as "f CLEAR PREFIX" because it is in the row of CLEAR keys).

HP15c case/pouch

HP15c pouch HP15c pouch
I have long been looking for a good replacement pouch for the 15c. Especially the HP15c-LE pouch is too hard and too sturdy. My old one is on the other hand wearing out and getting too loose. After trying several options I made some pouches out of neoprene and they are really good. If you want one, you can order them here: http://shop.tuxgraphics.org/fan/hp15c-hp12c-pouch.html.

My collection of other RPN pocket calculators

HP-11c

The HP-11c is basically the predecessor of the HP-15c. HP added, after the success of the HP-11c, a number of additional features to the HP-11c and released it 10 month later as the HP-15c. I bought this HP-11c on ebay just for nostalgic reasons.

hp-11c calculator



HP-33c

This HP33c was my second RPN calculator and I got it second hand from a friend who did not want to use it anymore. Unfortunately I don't have the original battery pack.

hp33c


Swissmicros DM42

I bought this calculator from swissmicros.com in June of 2018. This is a good calculator. It has a nice weight of 175g. It is mechanically very solid and the keyboard is good. It is an improvement over the DM15L keyboard not only because of better tactile switches but also because of the shape of the keys. The back of the key is slightly higher than the front which causes most of the force from your finger to go to the area where it is needed.

The DM42 is based on the code of Free42 (http://thomasokken.com/free42/ by Thomas Okken). In other words it is a complete rewrite, not using any HP code. It does not have any of the bugs that the original HP42s had. I can recommend this calculator. It's very good. The display is very interesting. It is a digital paper display that can display images even when the calculator is off. The DM42 comes with a collection of "off-images". Those images are displayed when you turn the calculator off. Every time a different image. The display is quite large and the calculator can therefore show the entire stack and any software menus. The original HP42s had only two display lines. The DM42 calculator is about the same size as the original HP42s (a bit smaller) despite the larger display and an extra row of function keys.


The HP42s and the DM42 can store complex numbers in registers if those are named registers (STO, shiftkey ALPHA, type a few letters, Enter).

A cool feature of the DM42 is the ability to display the actual battery voltage in the status bar instead of just a battery icon. You can do this via   SETUP - Settings - Status Bar. I have always felt that an actual battery reading is more meaningful than an abstract icon.

swissmicros dm42 swissmicros dm42

DM42/HP42S program library:


HP-42s

I bought the HP42s in 1991. A very powerful calculator with a lot of functions.

hp42s


HP-48sx

I bought the HP48 in 1992 but I did not use it too much. It was good at the time but has too many functions for which you would not use a pocket calculator but rather some Math-software on a PC. Over time I found that a pocket calculator has to be just handy and compact.

hp48sx


There is a HP48 emulator for linux but it is quite old and you may encounter problems with regards to keyboard mapping and usability.

HP-35s

This is a 2008 hp-35s. For many years HP did not produce anymore any good scientific RPN calculators. They had only bulky graphing calculators in ugly metallic designs. This is, after many years, the first scientific RPN calculator which comes close to the successful classic RPN calculators. I like it.

This calculator can store a complete complex number in a normal storage register.

hp35s


HP12c platinum, special edition

This is a 2008 hp12c platinum. The HP12c financial calculator has been in continuous production since its introduction in 1981. The platinum version has some extra features such as more program memory and higher internal precision.

hp12c platinum

HP12c

This is a hp12c which I bought on ebay. It's in pretty good condition and it must be from the 90's.

hp12c front hp12c back

The HP12c has no trigonometric functions but you could use the following approximations if you ever need those functions.

WP-34s

This is a very interessting machine. It is based on the HP30b calculator with a keyboard overlay and a different firmware. There is a well an additional clock crystal installed. It's all open source apart from the hardware. It was designed by Walter Bonin and Paul Dale. You can order it at http://commerce.hpcalc.org/34s.php. The manual and other documents are available at http://sourceforge.net/projects/wp34s/files/ and there is a wiki at http://www.wiki4hp.com/doku.php?id=34s:repurposing_project. It is packed with functionallity and has 3 shift keys (f, g and h). I love the idea. It's like a hp42s++.

wp34s


HP-prime

This is basically the successor of the HP-48sx but made in 2013. It's a very powerful graphing calculator. It has unfortunately a problem with the standby time on its rechargable litium battery (the same battery as used in a Galaxy S3 cell phone, 2100 mAh or 1500 mAh, note the bigger versions with 3Ah and more don't fit). If you use it every day then the standby current that the processor draws is neglectable compared to its "on" power consumption. If you are on the other hand an occasional user like me who has the calculator on the shelf and uses it only once every month then you will find that you can newer use it. The battery is always discharged and needs charging before the calculator can be used. Oh, how I love my HP-15c: 3 LR44 batteries last more than 10 years....

HP-prime
It's not clear why anybody with access to a PC would use this calculator. It's a bulky device that requires a lot of regular battery maintenance. Students will not be allowed to use it during exams due to its alphanumeric and graphical capabilities.


Links



© Guido Socher