Back to Hardware

Seven Segment Scroller

20 Apr 2016
Progress: Complete

This project is quick enough that it maybe doesn't even qualify for a project page here. For a birthday present, I had a very specific request, to build a tiny device that scrolls a single bit of text. You can probably buy these, but the advantage here is that a) it's homemade, and b) the message can't be changed by the recipient.

I grabbed whatever parts I had available. I have a bunch of these small 7-seg displays which are common anode (I ordered them by mistake). Seven segments by three digits means we need ten pins to light up the matrix. I grabbed a microcontroller that had enough, an ATtiny26. It's slightly inconvenient because the power pins are in the centre, not at the corners, but I aimed to attach the display directly to the chip.

On one side the pins are in the breadboard, on the near side they're just jammed up against the chip. With the message working I could then solder the display in place.

The programming was extremely simple. I worked out on paper what pins did what, and defined a few numbers which correspond to the state of ports A and B that display a given character. For instance, the letter E:

  #define A_E 0b11000001
  #define B_E 0b11011001
I then need to OR the A value with the pin for the anode of the digit I want to light up.
  PORTA = A_E | d2 ;
  PORTB = B_E ;
This illuminates an E on the middle digit. To matrix them, if you can even call it that, just light up the first digit, wait a bit, light up the second, wait, third, wait, loop a few hundred times. Then load the next part of the message. The message, and the display, were so short that I just copied and pasted the frames and changed the letters in them.

Next up, a power source. I have a few coin cell batteries, but they were all large and flat. Then I remembered this thing I pulled out of a lighter.

I pulled the LED, trimmed off the excess and superglued this to the chip.

Leaded solder sure does make gorgeous joints.

The bent bit of metal is still used as a switch, just reshaped a little.

Done. Total thing took less than an hour. Superbly satisfying.

Boo! Can you guess what message it says? Hint: it's extremely immature.