Joldosh's Electronics Projects
Wednesday, May 8, 2024
MSP430 Development on Linux
Saturday, March 9, 2024
Calculator Keypads
As described in my 2023 goals post, my plan for the year was to finish enough projects to give a presentation at the 2023 Hewlett-Packard Handheld Conference (HHC). Even though I didn't finish everything on my list, there were still enough interesting things to give a presentation on including my Blinky Robot and 6507 Calculator Forth Virtual Machine. The largest part of the presentation was about building calculator keypads.
While building a circuit board or writing the firmware for a calculator are achievable goals for a hobbyist or amateur, building a keypad tends to be much more challenging. The keys themselves can be made on a 3D printer, but getting good quality labels on the keys is very difficult. Since none of my calculator projects so far have had really good keypads, I decided to try every method available for making keys to compare the results.
3D Model
The 3D model for the test consists of eight rows of five keys each designed in OpenSCAD for my still unfinished 6507 Graphing Calculator. OpenSCAD has been my go-to program for modeling since I started with 3D printing a few years ago. The biggest advantage of this program is that the entire model is specified by a script so nothing needs to be manipulated or placed by hand. This works well for people like me who don't have a lot of artistic talent but feel comfortable with programming. It's cheap and relatively quick to print out a set of these keys on my Ender 3.
Sunday, December 31, 2023
IRC Forth Chatbot
Sunday, January 29, 2023
6507 Graphing Calculator: Forth Virtual Machine
As my last post explains, my goal for 2023 is to finish enough projects to give a presentation at HHC 2023. One of the biggest jobs will be finishing the 6507 Graphing Calculator I've been working on the past few years. The latest stage of the project was rewriting part of the firmware in Forth to save space, which turned out to be a failure.
When I last worked on this project, the firmware had reached 9.3K which well exceeds the calculator's 8K EEPROM. This wasn't so concerning since it seemed plausible at the time to implement a tiny Forth core and shrink the firmware by rewriting parts of it in Forth. Also, some parts of the existing firmware, which is all written in assembly, could be improved to save space. With this plan in mind, I started implementing a preprocessor in Python that scans all of the project's assembly files for Forth code and converts it into bytes to embed in the assembly source code. The Forth core uses token threading so each Forth word in the source produces just one byte rather than two as in direct and indirect threading or three with subroutine threading. The Forth system is initiated with a BRK instruction which jumps to the software interrupt handler and begins interpreting the bytes following the BRK. This saves two bytes for every invocation of the Forth system over using JMP or JSR. One of the tokens in the Forth system is assigned the same number as the BRK op code and increments a counter when executed. A corresponding token at the end of each function decrements the counter and switches from Forth back to assembly when the counter reaches zero. With this setup, the program can jump from assembly or Forth to a function written in Forth and continue executing seamlessly.
Sunday, December 25, 2022
2023 Project Goals
Not much to say here. There just wasn't enough time to get to this one.
Monday, December 19, 2022
PIC32/6502 Blinky Robot
As far as robots go, this is not a very useful one since all it does is blink its eyes every few seconds. The interesting part is how it does the blinking. Rather than switching the LEDs on then delaying a while before switching them off, the robot runs several layers of emulation with the innermost emulated system blinking the LEDs as fast as possible. All the layers of emulators within emulators combine to produce enough overhead to slow the blinking down to a rate that is visible.