Yow Revisited (in Txtzyme)

The HDLx-2416 is a neat little four-character ASCII display that just happens to fit, pin-for-pin, on top of a Teensy as if the Teensy were made for it. I snagged one from the DorkbotPDX spare parts bin after Dave showed me now neatly his Yow! project fit together. Of course, while testing the limits of Txtzyme, I had to put a Yow clone together.

Yow Revisited from Ward Cunningham on Vimeo.

I wrote the driver for this part in four steps corresponding to four distinct levels of abstraction required of such an application. These are:

  • Signals on pins
  • Registers within the part
  • Methods, like flashing or scrolling
  • Specific messages to be scrolled
  • I wrote perl functions for each pin, each register, each method and each application of those methods that make up the demo in the movie. Here are some sample functions pulled from each section of the code:

    # HDLx-2416 Pins
    sub wr_ { tz "4f 0o 1o"; }
    # HDLx-2416 Registers
    sub ch  { my ($a, $ch) = @_; a $a; cue 0; cu_ 1; d ord($ch); wr_; }
    # Application Helpers
    sub txt { my ($t) = @_; for my $i (0..60) { msg (substr $t, $i, 4); tz "_wait_100m" }}
    # Scroll Application
    txt "Now is the time for all good men to come to Dorkbot.";
    

    With the rest of the pins, registers, helpers and applications, the program runs a full page. As always, you can find it in the Yow Project page on GitHub.