Summary of Dotmatrix using ATtiny2313 microcontroller
This article describes a DIY scrolling LED sign using an ATtiny2313 microcontroller. It explains multiplexing techniques for 5x7 dot-matrix displays (CC/CA types) to prevent flickering by scanning columns at over 40Hz. The system utilizes shift registers like the 74HC595 to manage data efficiently via three wires, storing character ASCII data in the microcontroller's flash memory or external EEPROM.
Parts used in the Scrolling LED Sign:
- ATtiny2313 AVR microcontroller
- 5x7 LED dot-matrix display
- 74HC595 8-bit shift-register IC
- Breadboard
- Resistors
- Transistors
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 5×7 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):
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…)

For more detail: Dotmatrix using ATtiny2313 microcontroller
- What is the primary function of this device?
The device allows text to scroll over LED dot-matrix displays. - How does the multiplexing technique work?
It scans the five columns and sets data on the seven rows (or vice versa) rapidly. - What frequency is required to avoid visible flickering?
The multiplex-frequency must be greater than approximately 40Hz. - How long should you wait per column during scanning?
You should wait about 5 msec per column. - Where does the row data come from?
Data comes from the EEPROM or flash memory of the AVR, or an external EEPROM/flash IC. - What are the storage capacities of the ATtiny2313?
It has 128 bytes of EEPROM and 2k of flash memory. - Why is the 74HC595 preferred over a 74HCT164?
The 74HC595 includes a storage register that switches outputs all at once. - How many wires are needed to shift 8 bits with the 74HC595?
Only 3 wires are needed: Data, SHcp, and STcp. - Why must more current be put through LEDs during multiplexing?
Multiplexing lights LEDs only for a fraction of time, so higher current maintains intensity. - What is the recommended refresh frequency range?
A refresh frequency between 40 and 70Hz is acceptable.
