librelist archives

« back to archive

Atreus with Teensy 3

Atreus with Teensy 3

From:
Phil Hagelberg
Date:
2014-10-12 @ 21:15
One of my original goals with the Atreus was to write the firmware in
the Forth programming language rather than in C. I bootstrapped myself
with the TMK firmware project originally, and once I got it working, I
started writing a Forth implementation for the Teensy 2.

Unfortunately while I did eventually get my Forth implemenation running
on the Teensy 2, the memory requirements meant that it couldn't execute
anything but the most trivial of programs in the 2.5kb of RAM the Teensy
2 possessed. I put the project on hold and switched over to a simple
C-based firmware. However, I had a spare Teensy 3 lying around, which
boasts a much higher memory capacity. A while back I built a prototype
keyboard around this microcontroller:

  https://www.flickr.com/photos/technomancy/14654421878

I figured this might be a decent time to dust off my Forth
implementation. First I ported the Teensy 2 firmware to the ARM chip on
the Teensy 3, and after a few weeks of hacking, I got it to the point
where while the bulk of the code was implemented in C, the outer matrix
scanning loop was actually implemented in Forth.

  https://github.com/technomancy/orestes/tree/teensy3

I've been using this firmware every so often on my prototype board, and
while it still has a few debouncing issues that need tuning, it's
perfectly serviceable for me when I need to type without making a Cherry
MX Blue racket, due to the Matias Quiet Click switches I put in the board.

I would like to pick back up the development and move more of the
logic out of C and into Forth, but I've been sidetracked by a few other
projects. I'm not sure when I'll get back to this codebase, but I
thought I'd mention it in case anyone else is interested in using a
Teensy 3 for their board or wants to do some keyboard hacking in a
language that isn't C.

cheers,
Phil