2008-01-27

HyperPlex lives!

Digi-Key shipped my back-ordered LEDs on Thursday, and USPS delivered them mid-day on Saturday, so I was able to complete the HyperPlex prototype last night.

It works!



I had confidence in the theory, but I'm still thrilled and somewhat surprised to see it translated faithfully into concrete physical form.

HyperPlex construction album

The main purpose of this experiment was to demonstrate the viability of "hyperplexing", which is a topology for multiplexing LEDs using symmetric complementary drive. Using 16 tri-state microprocessor I/O pins and no other support hardware (no resistors, even), this board drives 64 LEDs without any pin needing to source or sink more than about 15 mA of current. At any given time, up to 8 LEDs are lit, so it uses 1/8th duty cycle multiplexing; visually and electrically, it's similar to the standard 8x8 row/column multiplexing, but it doesn't require any transistors or high current sources or sinks.

Might it be of practical use? Sure! If you want to drive more LEDs than you have pins, but you don't want to add extra driver chips or transistors, and you want more brightness than you'd get out of "weak charlieplexing", then one of the hyperplex topologies might be just the ticket. I'll post more on the math and the design space soon. Or if you want to build a dot-matrix display using through-hole techniques, and you don't want to solder any more components than you have to, then the HyperPlex board in its current form might appeal to you.

Since the 16 output lines used up nearly all the pins of the 20-pin ATtiny2313 microcontroller I'm using, I needed a demonstration program that would be interesting without any interactivity. The program also needed to fit comfortably into less than 1k, because the auto-generated display multiplexing code alone takes up half of the 2kBytes of flash memory in the AVR.

Life to the rescue! I'm a life-long (ha) fan of Conway's Game of Life, and it can be coded quite compactly. To keep things from dying out too quickly, I added an implicit constant checkerboard border around the display, so the boundaries and corners are hospitable to life cells. The life board is seeded from a 23-bit maximum-period Linear-Feedback Shift Register, and the tortoise-and-hare algorithm is used to detect cycles. In my early tests, it seems to go quite a long time between resets; at 5 minutes per life experiment, that's 80 years before a repeat. There are many more things to play with in the software, but I'm tempted to design and build a second revision of the hardware with an In-System Programming header before going too crazy with software -- it's hazardous to my fingers to keep pulling and re-inserting the chip every time I want to try new software.

No comments: