Scrolling LED sign based on Atmel ATtiny2313 AVR microcontrolle



On this page you will find a scrolling LED sign based on the ATtiny2313 AVR microcontroller, which you can build yourself (when finished) Other names for this device can be: Moving message sign, Message crawler, Scrolling message, message display, etc.
The idea is to let a text scroll over the LED dot-matrix displays. A dot-matrix display is a display which contains 5x7 dots (LEDs) in one case, the LEDs are connected like a matrix, there are two types CC and CA, the LEDs are simply put the other way around, here the drawings (inside and front):
If you put 1.8 Volt e.g. at the lines 4 and 10, that LED (dot) will lit, the trick of multiplexing is to scan the columns (5) and set the data on the rows (7) (or visa-versa), the multiplex-frequency must be greater than approx. 40Hz else you will see the flickering of the LEDs to much (take about 5 msec per column, thats about 25 msec for one frame)
The scanning goes as follows, first set the rows data on the 7 rows e.g. 1010010, then activate (0 or 1 -> depends on which type CA = common cathode, or CC = common anode) the first column, now these LEDs (dots) will lit, wait 5 msec, then switch the column off, now load the next rows data, and set the second column on, wait 5 msecs again, and switch it off again, if you repeat this sequence very fast, you will see the data (character data) appear on the display (refresh frequency 40 - 70Hz is ok, don't take twice or half the artificial light-frequency of 50/60 Hz)
The rows data comes e.g. from the EEPROM or flash memory of the AVR, you can also take an external EEPROM/flash IC, the ATtiny2313 has 128 bytes EEPROM and 2k of flash memory, what you can do is put the character data (ASCII) into the flash memory (read below for more details) Next the test-diagram:


The 74HC595 is an 8-bit shift-register IC, with this IC you can shift 8 bits to the outputs with only 3 wires, that are Data (Ds), and 2 shift inputs (SHcp, STcp), connect like the diagram. How does the 74HC595 works? First shift the 8 bits into the stages with SHcp, then shift the stages to the outputs with STcp, this causes the outputs to switch in one go, with e.g. a 74HCT164 you can only shift the bits into the outputs, the advantage of the 74HC595 is the storage register. Don't forget that multiplexing causes the LEDs only lit up for a fraction, so if you want the same intensity you must put more current through them, this diagram is for practice and programming, wants you have it working you can put transistors and resistors on. Here I put the letter R on the display as you can see, using a little breadboard: (next: How the scrolling is done...)

How to scroll a character accross the display ? The trick is to build one character on the display by scanning the columns very fast, and let say each 20 times (20 frames) scroll it one position to the left, this will give the effect of a walking text accross the dot-matrix display. So first build one frame, repeat this 20 times, and after that, read the data one address later, if you do this 5 times (5 columns) the character scroll from right to left from the display. (the refresh goes so fast that your brain can't keep up, and what you see is the R scrolling over the display) Btw, I will take five 74HC595's shiftregisters IC's, that are 5 x 8 bit = 40 bits / 5 columns = 8 dot-matrix displays, making it a nice tiny message sign.

What I am going to do is putting ASCII data (thats 128 x 5 bytes = 640 bytes) into the 2k flash memory of the ATtiny2313, then I have 704 words left for my program, that can really be a huge program!, because I used only 69 lines (69 instructions) of program so far, and that scrolls characters fluently accross the dot-matrix display. I made the program so that you can set the scroll-speed, from 0 - 255, so 256 speeds, 25 fps (frames/second) is a nice speed. On one of my pages (this page) I am using a 2-bit Gray code rotary encoder, with this encoder I will make an edit function in the software, so you can edit messages, without a keyboard, this save space, this type of rotary encoder has a push-function in the shaft, so e.g. after you select a character you can store that in memory.

 

/* EOT ----------------------------------------- */