Blinky fonts

Hi. I love the blinky. I love your documentation as well. Could you guys explain a bit how you encoded a font in a single byte? I have playing around with a 5x7 matrix driven straight off micro pins in a POV strobe. But I can’t figure out how to do it in less than 17 bytes. Thanks for your work guys!

Hey there, glad you like the blinky, we like it too! There are a couple things involved:

  1. For the POV, we just tie the 8 LEDs to 8 pins on the microcontroller. For the Grid, we use Charlieplexing in order to control 56 LEDs with 8 pins.
  2. We created a font table inside the microcontroller code that provides a mapping from a single byte (the character code) to an array of five bytes (which LEDs should be lit for that character). This allows us to improve two things:
    A. Blinky transmission time is reduced since we only need to transmit one byte per character instead of five bytes per character.
    B. Blinky message storage is increased, allowing for longer messages to be stored, again because of only storing one byte per character instead of five.

For your 5x8 matrix, you should be able to make each character in your font take up 5 bytes, with each byte specifying which LEDs should be lit in each of the five columns.

Let us know if you have other questions or need more info, we’re happy to help!

Thanks for your response.

What is the maximum number of LEDs do you turn on at once in your Blinky Grid?

In my code, I only have one LED lit at a time. It certainly saves the chip from being over-driven, but takes up much more code space to do so. It also causes the LEDs to be dimmer than I would like, due to the many loops I am using.

With Charlieplexing, you can only light one LED at a time. Do this fast enough and the human eye is totally ok with it. How are the pins connected on your 5x7 display? Row/column? If you have 5+7 pins you could probably do a whole row at a time which should be better in terms of code complexity and speed.

The Blinky Grid non-bootloader code is in our github repository if you are interested to see how we did it. It’s all in assembly (we were running out of code space) but not terribly confusing.