In lots of circumstances, folks now carry out advanced calculations on computer systems and even via apps for smartphones and tablets. However when computer systems have been nonetheless massive, cumbersome, and costly, specialised calculators have been rather more frequent. Firms like Hewlett-Packard even constructed calculators particularly for programmers, which is an odd idea in our fashionable coding environments. One standard calculator mannequin was the HP-16C Laptop Scientist and Redditor someyob recreated it as a DIY calculator constructed with a Raspberry Pi Pico improvement board.
Like different programmer’s calculators, the HP-16C featured features helpful for programming duties. It might, as an illustration, convert numbers from one base to a different (comparable to from hexadecimal to binary). It might additionally deal with floating-point decimal numbers and will show numbers with many digits by scrolling. Importantly, customers might set the phrase measurement to match their programming language. The thought was for programmers to rapidly assemble algorithms on the HP-16C that they might then replicate of their code with the information that they’d work as supposed.
The Raspberry Pi Pico improvement board with its RP2040 microcontroller has much more processing energy and reminiscence than the HP-16C did, together with accessible libraries that may deal with rather more advanced mathematical operations. However someyob’s objective wasn’t to construct a greater calculator; moderately, they needed to duplicate the performance of the HP-16C as a studying expertise. This undertaking helps them get a deal with on Adafruit’s CircuitPython, low-level programming methods from the previous, classic programmable calculator operation, and fundamental {hardware} ideas.
Along with the Pico, this undertaking required three keypads, a backlit 1602 LCD, and a stage shifter. The extent shifter was essential 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 which contained 16 keys). These keypads are standard matrices, so someyob needed to dedicate 14 of the Pico’s I/O pins to keypad scanning.
On the firmware aspect, someyob continues to be engaged on the code. They’re planning on implementing the entire HP-16C’s features, however they’ve to show themselves CircuitPython alongside the way in which to do this. We assume that they’ll transfer from a breadboard to a perfboard or customized PCB as soon as they end the firmware. For calculator nerds, that is the proper undertaking to study with.