Close
0%
0%

RPN Integer Calculator from Smart Response PE

The surplused (eBay) device contains a microcontroller, a keyboard, and a mono graphic screen and screams to be hacked!

Similar projects worth following
RPN 4-function Calculator in C ... just for fun
Surplus Smart Response-PE devices are available on eBay from $1 to $10 based upon quantity. These devices have a TI CC2533 uC, numeric keypad, and mono graphic display and all the development tools are open source.

There are numerous RPN calculator projects on Hackaday.com but surely there is room for another?  The Smart Response PE surplused devices are old-tech but they are just as capable as any low-end Arduino, the UNO for example.

I have owned several HP RPN scientific calculators; the HP-67 got me through my EE engineering classes.  I still have that device and I love it, but in my daily (retired) life, there is little need to throw exponential numbers and transcendental functions into the HP grinder.  Mostly, I hunt around the kitchen drawers for a cheap 4-function calculator that uses the boring algebraic input ...  have to remember to press that "=" equal sign.

While the cheap-o 4 function dollar-store calculator gets the everyday job done, I really miss the RPN methodology; however, leaving my antique HP-67 out for general usage in the yard, shop, or garage is simply not going to happen.  Thus, when I got my hands on a few Smart Response PE devices, the idea of writing a RPN calculator for the candy bar device seemed like a useful thing to do.  It is nice to think of something useful to do with my time which has not been suggested by my wife.

All of the development tools for the 8051-based TI CC2533 microcontroller are free.  The flash programmer can be purchased as a TI (compatible) CCDebugger or there are instructions on the Internet for building a programming device from an old Arduino.  GitHub - stormbard/CCDebugger: CCDebugger Arduino Implementation

The bulk of the uC HAL core code was written by TI as part of their evaluation tools and support kit (RemoTI ZigBee Remote Control).  For a compiler, the SDCC free software is utilized and works well for this project and installs easily on Windows 10/11 64-bit systems.  Github user "serisman" wrote the bulk of the keyboard/display functions.

My software implementation follows the RPN as implemented on the HP-12C: the buffer, X, Y, Z, and T registers conform to that methodology.  The Web contains numerous explanations, but a short summary can be read here: RPN Tutorial (lehigh.edu)

Having a full 5-line display (4 lines for X, Y, Z, T) and the 5th line for the keyboard buffer display makes using or learning RPN a delightful experience.  The specific hardware being used does require some changes in the RPN input.

Notes regarding implementation for this project: 

1)  Power button is not functional at present, the unit is always on unless modifications are made to include a power-off physical switch. (My hardware mod installed a switch and a LED where the silicon power-switch was located as shown in the picture gallery.)

3) Selection buttions are used to rotate the stack, this differs from the HP as official calculators have only roll-down

4) The checkmark button is used to select the math operation: +, /, *, -

4a) The 'X' key to the right of checkmark is the "eXecute key" and performs the math requested on registers X, Y

5) Alphanumeric keys are numeric only

6) + and - button works only on the "X" register and will change sign alternately

7) The ENTER key is the RPN Enter key: the keyboard buffer (text) is copied into the X register as a floating point number

8) The '?' key displays HH:MM:SS since the device was turned-on

9) The 'home' key clears the keyboard buffer; use this key if backspacing more that a character or two

10) The 'backspace' key is intended to remove one or two displayed characters from the keyboard buffer; use the 'home' key to quicky (and completely) clear the keyboard buffer

11) The 'x/y' key exchanges registers "X" and "Y" repeatedly.

11a) The period key is not implemented within the keyboard buffer at this time; to create a decimal number, input the number without a decimal, press ENTER, input the 10's number which represents the decimal place: 10 for one decimal, 100 for 2 decimals, 1000 for 3 decimals, 10000 for 4 decimals; then Press the...

Read more »

main.c

Here for browsing, but included in the main ZIP download.

C Source File - 9.79 kB - 06/28/2023 at 17:55

Download

RPNcalc.zip

Contains COMMAND files for Windows: Compile, Link, and "GO" which combines all steps. To upload the resulting HEX file to the Smart Response-PE, you will need a TI CCDebugger or equivalent device. Please note that to keep things easy, all the .H and .C files are kept 'flat' in one directory structure; but, if you are offended, you can organize and utilize MAKE.

x-zip-compressed - 136.67 kB - 06/28/2023 at 17:50

Download

  • 1 × Smart Response PE Handheld (surplus) which contains TI CC2533 microcontroller, keyboard, LCD
  • 1 × Pogo Pins Optional for building a battery door programming connector
  • 1 × Ti CC Debugger Flash Programming USB unit (or compatible)
  • 1 × SDCC https://sdcc.sourceforge.net/ C-compiler for microcontrollers

View project log

  • 1
    Physical Considerations

    The installatiion of a "real" power switch is recommended.  I utilized a push-on, push-off switch which was in my parts bin.  A liberal amount of hot-melt glue will secure the device and allow some minor physical adjustment to ensure the button/slide does not rub the hole that was made in the plastic case.

  • 2
    Removal of original soft-key power button

    I elected to remove this and utilize the space for a real power-on LED - strictly optional.  The pix is out of focus, but the LED placement does require the use of a drill and the addition of a current limiting resistor.

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates