This article contains some reference data– pinouts and the font table– relevant to the LED Micro-readerboard, version 2.0.
To build your own kit from scratch, you need an a Atmel ATtiny2313 microcontroller, an AVR programming setup, the code downloaded from here, instructions downloaded from here, a battery box for two AA batteries with a switch (Digi-Key SBH-321AS-ND), and an alphanumeric display, e.g., Kingbright PSC08-11EWA.
Our microcontroller is the Atmel ATtiny2313; you can find the details about it and the data sheet on Atmel’s site.
This is a simplified drawing of the microcontroller pinouts, showing the pins as they are configured for the LED Micro-Readerboard project. All of the lines shown, except power, ground, and reset, are configured as general purpose outputs, and are capable of sourcing plenty of current to drive LEDs.
The alphanumeric LED display that we are using for the micro-readerboard is an industry standard size, a 0.8″ digit 16-segment (plus decimal point) display with 18 pins on the back and common-cathode configuration. A typical model is the Kingbright PSC08-11EWA, available here for $3.72 each. You can find the detailed datasheet for that display here.
(The display that we’ve actually sourced for the latest kits is a harder to get but extremely bright member of the same family: FYS-8013AUHR-11, by Foryard optoelectronics.)
Here are the pinouts for the alphanumeric display, following the naming conventions of the Kingbright displays:
In our assembled ornament, the microcontroller sits on the back side of the LED display such that most of the ATtiny2313 output pins go to inputs of the LED display. The microcontroller has 20 pins while the display only has 18, so microcontroller pins 1 and 20 do not directly line up with any pins on the display.
Pin 2 of the ATtiny2313 goes to pin 18 of the display,
pin 11 of the ATtiny2313 goes to pin 9 of the display,
and pin 19 of the ATtiny2313 goes to pin 1 of the display.
More completely, the layout looks like this:
The only tricky part is that the order of pins 9 and 10 on the microcontroller effectively need to be swapped to line up with the pins on the display; take a look at the assembly instructions to see how to deal with that problem. If you switch to a common anode display, the important point to note is that the positive voltage (+V) needs to be delivered to the common pin. This requires an extra wire in the project and some care to avoid short circuiting. (You will also need to flip a “switch” in the firmware to use a common anode display.)
With the default firmware, the decimal point (DP) is not actually used. Instead, that pin of the chip can optionally be connected to ground. The firmware senses that ground connection and uses that as a trigger to activate the “holiday” phrases in its program.
For each letter that might be displayed on the readerboard, we determined which segments should be lit up. Those segments to be lit are marked by a binary #1, and those to be dark are marked with a binary #0. The sixteen binary digits that determine the state of the sixteen segments comprise two bytes worth of data, the order of the bits in the two bytes is determined by the physical location of the pins on the microcontroller and the pins on the LED display. For example, segment ‘a’ of the display is controlled by pin 1 of the display. Pin 1 of the display touches pin 19 of the microcontroller, which is output B7. Following similar logic, the format of the two bytes is as follows:
|Byte High||Byte Low|
With this definition of the two data bytes, it was possible to construct the data table, with its 16-bit binary representation of each letter. The decimal value (unsigned integer) corresponding to the binary number is also given; these are the ‘practical’ values that were used in the C code.
|Character||ASCII #d||Segments Lit||Byte High||Byte Low||Decimal Val.|
Note about kit versions: Although the “big picture” of how the LED Micro-readerboard works has not changed much since the first version, there has been one important change to the hardware: Instead of using a common-anode LED display (the Kingbright PSA08-11HWA) as we were before, we now default to using a common-cathode display. The principal reason for this is just that of conceptual simplicity– if you want a segment to turn on, you now send a logical “on” signal instead of an “off” signal.
The two types of display are equally common, and if you’re building your own readerboards from scratch you can use either type. Note that if you want to change from one design to the other, you need to make minor changes to both the wiring and the firmware– wire the common pin to +V instead of ground, and invert the bits of the font table.