A monochrome (single colour) LED dot matrix display is used for displaying the Characters and Symbols which is interface with a microcontroller. This project will deliberate on displaying a scrolling text message on a 48×8 LED dot matrix display. The microcontroller used is Arduino Uno which is open source prototype Electronic platform. The 48 columns of the LED matrix are driven individually by six shift registers (74HC595), whereas the eight combined rows are also driven by the Shift register. Here we will be scanning across the rows and feed the column lines with appropriate logic levels. The program in the microcontroller is to determine the speed of the scrolling message as well as Message what we are going to display. The technique will be demonstrated for right to left scroll, but can be easily implemented for scrolling in other directions. The Sketch program for Arduino Uno is developed with Arduino Software.
Remove these adsRemove these ads by Signing Up


Matrix wiring each matrix has 64 LEDs. Instead the LEDs are wired into a matrix. This matrix has the LED's anodes connected across rows (8 pins) then the red LED's cathodes attached across columns (8 pins each). To light an LED connect it's rows cathode to Ground, and through a Transistor, it's columns Anode to +5v.
Displaying Images (Scanning) Now that we can light any LED we choose it's time to move on to displaying a (small) image. To do this we will use a scan pattern. In the example code we define a bitmap image (an array of 8 bytes, each bit representing one LED). Next we scan through this array one byte at a time, displaying one column then the next. If we do this fast enough (about 1000 times a second) it appears as an image. It sounds complex but if you download the code and play around it should quickly become clear
ShamsulB14 days ago

ive try verify it, but it come with error, can u help?

adrt.ino: In function 'void RefreshDisplay()':

adrt.ino:88:5: error: expected ')' before 'digitalWrite'

adrt.ino: In function 'void AlphabetSoup()':

adrt.ino:124:7: error: expected ')' before '}' token

adrt.ino:124:7: error: expected ';' before '}' token

Error compiling.

sanjoseph1 year ago
hi dude...
can u give me some examples on alphabet[][] matrix and how is it work? and how can i use another font styles...

karthimech09 (author)  sanjoseph1 year ago
Sorry Guys, i am also having the same problem with the program ...i am unable to increase the character set.....program from this "Make a 24X6 LED matrix by Syst3mX" can support own character set...but i dont know to increase the length support....
artrjc9 months ago

Doesn't work the code is messed up!

ByronG3 months ago

really works ???

Please could you help me ??

the code with this error:

what do i do?

can send the right code.


sketch_feb17d.ino: In function 'void AlphabetSoup()':

sketch_feb17d:128: error: expected `)' before '}' token

sketch_feb17d:128: error: expected `;' before '}' token

lokesh2602 months ago

Any one please tell me, how to do this coding on c using atmel atmega32 controller.

If it is available at any other website also inform me about this.

Jose LuisH2 months ago

Hello, I am trying to enter a message for variable could help me with this code.

void AlphabetSoup()


// Se declaran las variables de tiempo: segundos, minutos, etc.

byte segundos, minutos, hora, diaDeLaSemana, diaDelMes, mes, anio;

// Ejecuta la función getDateDs1307 para recibir los datos actualizados.

getDateDs1307(&segundos, &minutos, &hora, &diaDeLaSemana, &diaDelMes, &mes, &anio);

char msg[] = hora;

(for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)

//for (int charIndex=0; charIndex < longitud_cadena; charIndex++)


int alphabetIndex = msg[charIndex] - ' ';

if (alphabetIndex < 0) alphabetIndex=0;

amielv7 months ago

can u please help me,
there was an error,

expected primary=expression before '>' token

invalid types 'char[int]' for array subscript..

any possible solution??


can you give me the code to display all Small Letter and numerical number..... thankz..

rca_dj18 months ago

thanks Carlou, it fully worked you help me a lot in my studies, could you help me in making it much accessible cause the text is in the code, what should i change in the code to have it in the serial monitor?

GandhiRaj12 months ago

Thank You All Friends. Yours Discussions, Information & Questions are Very useful to us.

rca_dj11 year ago

hi their.., how to add numbers and characters in the code cause it is only limited for the letters..

carlou rca_dj11 year ago

see my post ;)

carlou1 year ago

Thank you for your code!

for the font, you can use this :

and change "int alphabetIndex = msg[charIndex] - '@';" by "int alphabetIndex = msg[charIndex] - ' ';" it's perfet!

I have 2 question : how to stop the scrolling?

and how insert a variable in msg[]?


jz02bdn1 year ago
why the matrix can not display the number or numeric, i try to add new code for font that is numeric. please help me!!!! thanks

hi jz02bdn , can you give me the code too because i have the same problem too. please help me ..... thankz..

jribeiro91 year ago
I am planning to do this project for my engineering final yr project. I am not very familiar with all this stuff so could you guys help me. As a start could you give me the components and quantities required and if possible links to buy them also. Thnx
...and the answer is...

if (isOn)
bitmap[row][zone] = bitmap[row][zone] | colBit;
bitmap[row][zone] = bitmap[row][zone] & (~colBit);

change the | colBit; with the & (~colBit); in the code and try again?

:) :)
Hello , thanks for this tutorial using the 74hc595 CI. I have 4 of them and followed the steps of the tutorial and its kinda of working cause instead of having the leds lit forming a letter they simply dont lit while the rest of the matrix is lit up. I have reviewed all the steps and couldnt find the issue. Help is much appreciated.
Yonnis1 year ago
Hi, i modified the time delay from (delayMicroseconds(500);) to delayMicroseconds(50);) to let the letter a bit faster, than usaul it did not work for me,
anyone tried this or similar please.
rusty01011 year ago
For those wondering, the reason that it's difficult to add more characters is that the program is referencing the characters in the alphabet array by getting the byte value of the character to display in the ascii character table, and subracting from that the byte value of the '@' character in the ascii character table. That makes A the first character in this array, and works for A-Z.

However if you look at the ascii table (one can be found at, and lots of other places) you will see that the number digits are much lower than the '@' character in the table.

If you want to include numbers in your code, you have a few options. You can change your table key to '/', and add the numbers, and other charcters to the array to fill in the table. (Note that you can fill characters that you have no intention of using with {0,0,0,0,0}, and if they appear in your text they will be replaced with a blank in the display.)

Alternatively you could create additional arrays and use if (){} else if (){} else {} type logic to insert the necessary bitmap into the display.

Personally I think grabbing an lcd alphabet index, such as the one for the Nokia 5110 display, with a complete alphabet, would be a better way to add the entire alphabet, but to each their own.

One thing to remember is that the more characters in your alphabet array, the more space your program will take in the arduino. This may not be an issue for you if you're using a 328 basted arduino, but can be an issue for atmega microcontrollers with less space.
An alternative to providing a full alphabet, without having to fill in ALL of the characters, or using multiple arrays would be to start by defining a character array that you use to get an index to the alphabet array you are going to use.

For example for the alphabet array provided in the sample code you could use:
string alphabetsoupmap = " ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// the string starts with a space that will be index point zero, which matches the 'space'
// character in alphabetsoup.

Then instead of:
int alphabetIndex = msg[charIndex] - '@';
if (alphabetIndex < 0) alphabetIndex=0;

you could use
int alphabetindex = alphabetsoupmap.indexOf(msg[charIndex]);
if (alphabetindex <> -1) alphabetindex=0;

Now you can add the lower case alphabet, all digits, etc to the byte array alphabetsoup, then add the appropriate charcter to your alphabetsoupmap, and test to make sure that your chacter displays appropriately (always a good idea, including before you start modifying the code as above, that way you can 'back out' to a known working state.)

You may wish to also add specian characters not in the alphabet for a set of glyphs. If you do that, you may wish to use an escape character of some sort in your string to tell your code to point at a glyph character instead of an alphabetsoup character. You'll probably have to do a bit of experimenting to do that.
Thinking about doing the last method, but am not sure where
"string alphabetsoupmap = " ABCDEFGHIJKLMNOPQRSTUVWXYZ";"
would go in the code. Not seeing "string alphabetsoupmap =" anywhere.
You would have to add the variable or constant, as it is not exactly how the existing code functions.

Such an additoin could be made almost anywhere, but to me the most sensible place would be with the block of code defining the bitmap. E.g. between the lines that look like:

Do not define it within the definition of the variable byte alphabets[][5]={...}; that ends two lines above the "SETUP" line.

That said, it could appear in the function that uses it, and no where else.

I think it makes more sense with in the block defining the bitmap, as you then can update both the bitmap array, and the string listing the characters in the bitmap, at the same time. I would recommend adding a comment to the code explaining what the variable is for, and how someone who wishes to add characters or symbols, needs to update both alphabets and alphabetsoup for the program to operate as expected.
jiqfar1 year ago
thanks to your tutorial...
i success to build it...
any question for you...
how to add new char in the code?...
i try a new char but display is not readable...
i make tool to easy use...
as I can generate numbers?
yes you can...
but i try to add the code still not work...
this is my file
hi, how I can create other characters, such as exclamation marks and lowercase letters?
onki1 year ago
Hi Kolovic,
I keep trying, I think I'm close to solving it.
I tell you when I figure it out, ok?
kolovic1 year ago
Hi onki,
did you resolve problem? And I have same problem and I need 16 rows.
onki1 year ago
hi karthimech09,
Sorry for my bad English.... Thank you very much for sharing your project, it's amazing and useful. I have built my own LED MATRIX 12 x 16 and I'm trying to work with 2 74hc595 for rows and 2 for columns, but I'm really really bad with the software and I can not make it work... any ideas to implement in the code and that supports 12 rows?
karthimech09 (author) 1 year ago
yup.tell me the number of digits or letters u want to display at whole.
appukumar1 year ago
nice project but i would like to make a digital scrolling led display for my bike number plate how many leds do i need and i new to electronics how to design the circuit and choose the components can u help...
karthimech09 (author) 1 year ago
Thanks Buddy...
Great idea, but you might want to check the title for Step 2!
karthimech09 (author) 1 year ago
If anyone have any doubt,pls feel free to ask
and Help me to increase the character set......

welcome guys