Pocket Calculator Emulates Pocket Calculator

msp430 Calc Emu

[Chris] has built a pocket calculator that emulates… a pocket calculator. Two pocket calculators, in fact. Inspired by [Ken Shirriff's] incredible reverse engineering of the Sinclair scientific calculator, [Chris] decided to bring [Ken's] Sinclair and TI Datamath 2500II simulators to the physical world.

Both of these classic 70’s calculators are based on the TMS0805 processor. The 0805 ran with 320 11-bit words of ROM and only three storage registers. Sinclair’s [Nigel Searle] performed the real hack by implementing scientific calculator operations on a chip designed to be a four function calculator.

[Chris] decided to keep everything in the family by using a Texas Instruments msp430 microcontroller for emulation. He adapted [Ken's] simulator code to run on a MSP430G2452. 256 bytes of RAM and a whopping 8KB of flash made things almost too easy.[Chris'] includes ROMs for both the TI and the Sinclair calculators. The TI Datamath ROM is default, but by holding the 7 key down during boot, the Sinclair ROM is loaded. The silk screen includes key icons for both calculators, as well as some Doge-inspired wisdom on the back.

All joking aside, these really are amazing little calculators. Children of the 60’s and 70’s will be taken back when they see the LEDs flash as the emulated TMS0805 performs algorithmic arithmetic. [Chris'] code is up on Github. While he hasn’t released gerbers yet, he does have images of his PCB layout on the 43oh.com forums.

Comments

  1. nixieguy says:

    Awesome, altough what really wins me are the micro 7 segment displays…so beautiful.
    (I would have added some smd buttons instead of those bigh through hole, but that’s personal preference over everything small XD )

    • Greenaum says:

      Could probably even have done Capsense if he’d wanted to. And the letters are already laid out there for when he upgrades it to a word processor. Spell out 5318008 the easy way!

      • chris chung says:

        Thru-hole parts by choice. SMT was not common in the 70’s. There is barely any I/O pins left and I have to dual-purpose LED multiplexing and key scanning. The project uses less I/O pins than the original calculators it emulated. I would not use Capsense even if there are enough I/Os. Just live the clickery touch of real buttons.

        • scubascratch says:

          can this also emulate the sinclair programmable calculator? I think it had the same button and display layout. It was super primitive, like only 35 programming steps & no NV memory. Each digit in a constant was a step…

          • chris chung says:

            Yes, the msp430 can be in circuit re-programmed into emulating something else. The version 1 pcb actually have 28 keys capability where I reserved them for a MK14 clone. The hack however, in this case, is the emulation of the full TMS080x CPU instruction set and loading of virtual ROM images from the DataMath and Sinclair Scientific.
            I actually don’t quite understand the calculators logic. I just make sure the TMS080x instructions are done correctly, and the ROM images do the magic.

          • Greenaum says:

            How did you get the ROMs from the calculators in the first place? Or, if it wasn’t you, how was it done? Surely they were in the same chip as the CPU. Did someone peel the top off a chip, or get the original source from a factory?

          • chris chung says:

            I got the ROM contents off Ken Sherriff’s emulator code (web emulators). From what I understand, the Sinclair ROM was like you said, peeled off / acid dissolved and the gates read w/ a microscope to read out the firmware content. Please see Ken’s page righto.com/sinclair for details.
            For the DataMath, the ROM I believe is from the related TI patent. So this may not be the same as a DataMath II calculator ROM (which should have a % key). But TI’s patent was in so much detail that they even throw in an “example” calculator firmware. You can find links from Ken’s page righto.com/ti. The patent is really interesting and made a good read.

  2. charliex says:

    really nice

  3. vonskippy says:

  4. yeti says:

    Someone knows emulators foe SR52/56 and TI59?

  5. hboy007 says:

    Dave Jones will want one, that’s for sure!

  6. Kaspokas says:

    “wow, very TI, much msp430, such calculator”

  7. Aztraph says:

    i remember a trick on several different models of TI calculators that I had, on the ones I had that didn’t have a power switch, but an on and separate button, if you made any square or rectangle with the on or off button and pushed the other three corners of that shape, it would turn the calculator on or off. anyone else know of this trick?

    • ddjem says:

      I do recall something about mashing buttons and corners to do that, but I was hardly four feet tall at the time.

    • Greenaum says:

      That works (I discovered it myself years ago, just messing about) on most cheap modern calculators. Dunno if they’re all running the same code and CPU. Wasn’t even sure calculators ran code, til I heard about it on here.

      The trick is, hold down 4, 5, and 6, then press “ON”. Switches it off. Several combinations of keys + ON will work. Maybe you don’t even need ON. That’s the method I first tried years ago, as a kid, but there’s lots of room for experiment. I’d like to know why it works, if anyone knows.

      First tried it on a solar calculator that had no off button. Couldn’t stand the idea of it sat there, wasting all that sunlight. Yes I DO have OCD, why’d you ask?

      • Greenaum says:

        Actually I think Aztraph’s trick is slightly different, now I think. Dunno how mine works, but on a matrix keyboard you can cause a keypress by holding down others on the same row and column as the target key, with perhaps the other “corner” making the circuit. Just think about how a row x column keyboard matrix works, no diodes in there, just conductive contacts in a grid printed on plastic.

        Should work on many simple single-matrix type printed-plastic keypads. Maybe not on PC keyboards where the scanning and on-board CPU are a bit different, with sophisticated software. 8-bit computers would be likely to do it though.

    • Aztraph says:

      Keep in mind that was about 30 years ago, technology has improved immensely since then.

  8. Les-M says:

    Really neat to use the 430 for this. Other micros could do it just as well, of course, but the 430 core architecture has a certain minimalism that appeals. Ditto the Kraftwerk clip too, BTW. I am almost tempted to build this one, just to run it alongside my Sinclair original.

    • chris chung says:

      I cannot agree more. When I 1st saw Ken Sherriff emulator, I decided to do it on a msp430. No external crystal, factory calibrated clock, able to switch clock speed on the fly, low power design, etc makes it a good choice.

  9. hpux735 says:

    Screw it, I have to build this. I already have almost all the parts (need the buttons). I love almost everything about it.

  10. ka1axy says:

    Screw it. I’ll just haul out my HP-25. Same LEDs, programmable, RPN and that great HP key feel!

    Seriously – nice job! Kids today with their LCDs and graphing calculators don’t know what they’re missing.

    5318008

  11. John Kocurek says:

    Ah. My first calculator was a Sinclair Scientific…

  12. BillBrasskey says:

    Sold my Casio ML-90 last year :( It was actually kinda cool to hear the decimals play out. The thing liked to explode into three wafers at the slightest thing(aka reading it a haiku), sending all 60 or so chicklet metal keys all over the desk. Put it together one last time and waited months to sell it because I felt like a caregiver for the beast. Finally met a kindred soul thru another sale online and he took over responsibilities. The worst part was hearing the hourly chime (only @ 330 am-dunno ok) and it was so warbled from the batteries like the thing crying out “hey buddy”. It was really neat all in all and glad it found a good home-my csb

    For the lovers of Kraftwerk, I would suggest looking up Kraftwelt or Audioscience. Not the same but a good musician in their own right :)
    Have a happy 4th folks!

  13. KC_GR says:

    Does pressing on a special key play a little melodie?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,687 other followers