A DIY HP 16C Programmer’s Calculator Built with a Raspberry Pi Pico
Redditor someyob recreated the HP-16C Computer Scientist as a DIY calculator built with a Raspberry Pi Pico development board.
In many cases, people now perform complex calculations on computers or even through apps for smartphones and tablets. But when computers were still large, cumbersome, and expensive, specialized calculators were much more common. Companies like Hewlett-Packard even built calculators specifically for programmers, which is an odd concept in our modern coding environments. One popular calculator model was the HP-16C Computer Scientist and Redditor someyob recreated it as a DIY calculator built with a Raspberry Pi Pico development board.
Like other programmer’s calculators, the HP-16C featured functions useful for programming tasks. It could, for instance, convert numbers from one base to another (such as from hexadecimal to binary). It could also handle floating-point decimal numbers and could display numbers with many digits by scrolling. Importantly, users could set the word size to match their programming language. The idea was for programmers to quickly construct algorithms on the HP-16C that they could then replicate in their code with the knowledge that they would work as intended.
The Raspberry Pi Pico development board with its RP2040 microcontroller has far more processing power and memory than the HP-16C did, along with available libraries that can handle much more complex mathematical operations. But someyob’s goal wasn’t to build a better calculator; rather, they wanted to replicate the functionality of the HP-16C as a learning experience. This project is helping them get a handle on Adafruit’s CircuitPython, low-level programming techniques from the past, vintage programmable calculator operation, and basic hardware principles.
In addition to the Pico, this project required three keypads, a backlit 1602 LCD, and a level shifter. The level shifter was necessary to convert the logic voltage between the Pico and the LCD. The HP-16C had 39 keys, which someyob replicated with the three keypads (two of which contained 12 keys, and one that contained 16 keys). Those keypads are conventional matrices, so someyob had to dedicate 14 of the Pico’s I/O pins to keypad scanning.
On the firmware side, someyob is still working on the code. They’re planning on implementing all of the HP-16C’s functions, but they have to teach themselves CircuitPython along the way to do that. We assume that they’ll move from a breadboard to a perfboard or custom PCB once they finish the firmware. For calculator nerds, this is the perfect project to learn with.