loading
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.

Step 1: PREPARING THE MATRIX

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
<p>mas klok nginput angka gak bsa ya</p>
I have made a 6*32 led matrix .<br>I have connected cathodes along the columns and anode along the rows.<br>I just want to ask that where should I connect the resistance? Also how the programming works?
<p>I made a 12x32 led matrix with your circuit.<br>Can you help me to modify the code?</p>
<p>Hey guys. I like this, but the code is messed up pretty bad. I have modified the code to work with just a pair of shift registers. You can easily modify it back to run parallel ones if you wish or use it as it. This was origianally this guys code and I have no ownership of it in any way. Enjoy this :D</p><p>int latchPin1 = 8; //Arduino pin connected to blue 12 RCLK of 74HC595<br>int clockPin1 = 12; //Arduino pin connected to green 11 SRCLK of 74HC595<br>int dataPin1 = 11; //Arduino pin connected to violet 14 SER of 74HC595<br><br><br>//=== B I T M A P ===<br>//Bits in this array represents one LED of the matrix<br>// 8 is # of rows, 7 is # of LED matrix we have<br>byte bitmap[8][1]; // Change the 7 to however many matrices you want to use.<br>int numZones = sizeof(bitmap) / 8;<br>int maxZoneIndex = numZones - 1;<br>int numCols = numZones * 8;<br><br>byte alphabets[][5] = {<br> {0, 0, 0, 0, 0},<br> {31, 36, 68, 36, 31},<br> {127, 73, 73, 73, 54},<br> {62, 65, 65, 65, 34},<br> {127, 65, 65, 34, 28},<br> {127, 73, 73, 65, 65},<br> {127, 72, 72, 72, 64},<br> {62, 65, 65, 69, 38},<br> {127, 8, 8, 8, 127},<br> {0, 65, 127, 65, 0},<br> {2, 1, 1, 1, 126},<br> {127, 8, 20, 34, 65},<br> {127, 1, 1, 1, 1},<br> {127, 32, 16, 32, 127},<br> {127, 32, 16, 8, 127},<br> {62, 65, 65, 65, 62},<br> {127, 72, 72, 72, 48},<br> {62, 65, 69, 66, 61},<br> {127, 72, 76, 74, 49},<br> {50, 73, 73, 73, 38},<br> {64, 64, 127, 64, 64},<br> {126, 1, 1, 1, 126},<br> {124, 2, 1, 2, 124},<br> {126, 1, 6, 1, 126},<br> {99, 20, 8, 20, 99},<br> {96, 16, 15, 16, 96},<br> {67, 69, 73, 81, 97},<br>};<br><br>//=== S E T U P ===<br><br>void setup() {<br> pinMode(latchPin1, OUTPUT);<br> pinMode(clockPin1, OUTPUT);<br> pinMode(dataPin1, OUTPUT);<br><br> //-- Clear bitmap --<br> for (int row = 0; row &lt; 8; row++) {<br> for (int zone = 0; zone &lt;= maxZoneIndex; zone++) {<br> bitmap[row][zone] = 0;<br> }<br> }<br>}<br><br>//=== F U N C T I O N S ===<br>// This routine takes whatever we've setup in the bitmap array and display it on the matrix<br>void RefreshDisplay()<br>{<br> for (int row = 0; row &lt; 8; row++) {<br><br> //-- Start sending column bytes --<br> digitalWrite(latchPin1, LOW); //Hold latchPin LOW for as long as we're transmitting data<br> int rowbit = 1 &lt;&lt; row;<br> shiftOut(dataPin1, clockPin1, MSBFIRST, rowbit); //Transmit data<br><br> //-- Shift out to each matrix (zone is 8 columns represented by one matrix)<br> for (int zone = maxZoneIndex; zone &gt;= 0; zone--) {<br> shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);<br> }<br><br> //-- Done sending Column bytes, flip both latches at once to eliminate flicker<br> digitalWrite(latchPin1, HIGH);<br> //-- Wait a little bit to let humans see what we've pushed out onto the matrix --<br> delayMicroseconds(500);<br> }<br>}<br><br>// Converts row and colum to actual bitmap bit and turn it off/on<br>void Plot(int col, int row, bool isOn)<br>{<br> int zone = col / 8;<br> int colBitIndex = col % 8;<br> byte colBit = 1 &lt;&lt; colBitIndex;<br> if (isOn)<br> bitmap[row][zone] = bitmap[row][zone] | colBit;<br> else<br> bitmap[row][zone] = bitmap[row][zone] &amp; (~colBit);<br>}<br>// Plot each character of the message one column at a time, updated the display, shift bitmap left.<br>void AlphabetSoup()<br>{<br> char msg[] = &quot;I LOVE YOU SO VERY MUCH &quot;;<br><br> for (int charIndex = 0; charIndex &lt; (sizeof(msg) - 1); charIndex++)<br> {<br> int alphabetIndex = msg[charIndex] - '@';<br> if (alphabetIndex &lt; 0) alphabetIndex = 0;<br><br> //-- Draw one character of the message --<br> for (int col = 0; col &lt; 6; col++)<br> {<br> for (int row = 0; row &lt; 8; row++)<br> {<br> bool isOn = 0;<br> if (col &lt; 5) isOn = bitRead( alphabets[alphabetIndex][col], 7 - row ) == 1;<br> Plot( numCols - 1, row, isOn);<br> }<br><br> //-- The more times you repeat this loop, the slower we would scroll --<br> for (int refreshCount = 0; refreshCount &lt; 10; refreshCount++) //change this value to vary speed<br> RefreshDisplay();<br> //-- Shift the bitmap one column to left --<br> for (int row = 0; row &lt; 8; row++)<br> {<br> for (int zone = 0; zone &lt; numZones; zone++)<br> {<br> bitmap[row][zone] = bitmap[row][zone] &gt;&gt; 1;<br> // Roll over lowest bit from the next zone as highest bit of this zone.<br> if (zone &lt; maxZoneIndex) bitWrite(bitmap[row][zone], 7,<br> bitRead(bitmap[row][zone + 1], 0));<br> }<br> }<br> }<br> }<br>}<br><br>//=== L O O P ===<br>void loop() {<br> AlphabetSoup();<br>}</p>
Pls can i get a circuit diagram for your program?
What about datapin2 latchpin2 and clockpin2? Where do we have to connect those?
Did he reply you and if he did pls can i know what he said ?
<p>this is the screenshot of errors occurred while stimulation in proteus software.. can any one help me by solving the issue</p>
<p>May be your shift register is defined by u9 U10 U11!!!!!<br>For some reason you cant simulate some amplifiers and ICs.. May be this IC is one of them.... Make sure you have selected the right IC</p>
<p>how can i change row to column, cause i have placed the LED matrix by 90' shift but correct according to datasheet </p>
<p>THANK U VERY MUCH, U MADE MY DAY</p>
<p>this is the screenshot of errors occurred while stimulation in proteus software.. can any one help me by solving the issue</p>
<p>can anyone explain me contents of alphabet array and its use?.. Thanks</p>
<p>Hi,</p><p><br>I'm working on 117x24 led display. could you give me any help with coding that will be great. I'm really having a hard with the coding. <br>for the rows i used decade counter 10 outputs, and shift register 8 outputs to drive the columns. <br><br>My question is How I modify your code to make work for a 117x24. <br><br>Plz in any way possible.<br><br>thnks in advance</p>
<p>hey did u get the code...if yes..please mail it..xpjerin@gmail.com</p>
<p>Would it be possible to reconfigure this code to work for a 11X11 RGB common anode wall?</p>
<p>please provide me the codes for the display having 7 row and 37 column </p>
<p>The code will remain same... You can change the &quot; byte bitmap[8][7]; &quot; to &quot; byte bitmap[8][9]; &quot;. That will be good enough for 37 columns... :)</p>
<p>Thanks for this project... I made it... </p><p>Can u tell me how to change the bitmap for 16 rows? I wanna make a 16x50 display. <br>Would u like to help me??? plz</p>
<p>nice project...........</p>
<p>Thanks... :)</p>
If anyone have any doubt,pls feel free to ask <br>and Help me to increase the character set...... <br> <br>welcome guys
<p>Thanks for this project... I made it... <br>Can u tell me how to change the bitmap for 16 rows? I wanna make a 16x50 display. <br>Would u like to help me??? plz </p>
very nice..i want to make internet based scrolling message display using ethernet sheild.
Hi, I did this project and it works perfectly. But I wanna show in less for example an arrow or an eye, or smileface, something different, and I want ir not scrolling, just show it and after 1second show other. How can I make it??? Thank you
<p>Can someone please help to modify this brilliant code for 16row display. ! i have tried so many times but output is not satisfactory. So any help will be so much appreciated. Thanks in advance</p>
hi dude... <br>can u give me some examples on alphabet[][] matrix and how is it work? and how can i use another font styles... <br>
Sorry Guys, i am also having the same problem with the program ...i am unable to increase the character set.....program from this &quot;Make a 24X6 LED matrix by Syst3mX&quot; can support own character set...but i dont know to increase the length support....
<p>hey, make sure you are not run out of memories.. why you not used byte instead int? </p>
<p>http://www.instructables.com/id/2410-LED-MATRIX-PERFECTLY-RUNNING/</p>
<p>So I am trying to build this display board and my group started from scratch. Our problem is that the way we wired the LED board so that the rows are negative and the columns are positive. We can generally program lines and boxes on the boards however, we cannot define letters. Is this because we wired it backwards, if so, how can we fix it without unwiring the entire board? </p>
<p>Amigos extranjeros esta matriz presentada que Limete del 74HC595 a deslizarse.</p>
Yhis was an easy build. I changed the led's to RGB to add more color. If someone can help me with the code to show a static image of the time I will happily share my modifications to make a multi colored display
<p>// Code With all characters and stoped scrolling (changed font) .</p><p>// Developer : Asela Jayathilaka on 04-28-2015.</p><p><br>int x;<br>int y;<br>int latchPin1 = 5; //Arduino pin connected to blue 12 RCLK of 74HC595<br>int clockPin1 = 6; //Arduino pin connected to green 11 SRCLK of 74HC595<br>int dataPin1 = 7; //Arduino pin connected to violet 14 SER of 74HC595<br><br>//-- Rows (Positive Anodes) --<br>int latchPin2 = 9; //Arduino pin connected to yellow Latch 12 RCLK of 74HC595<br>int clockPin2 = 10; //Arduino pin connected to white Clock 11 SRCLK of 74HC595<br>int dataPin2 = 8; //Arduino pin connected to grey Data 14 SER of 74HC595<br><br>//=== B I T M A P ===<br>//Bits in this array represents one LED of the matrix<br>// 8 is # of rows, 7 is # of LED matrix we have<br>byte bitmap[8][34]; // Change the 7 to however many matrices you want to use.<br>int numZones = sizeof(bitmap) / 8;<br>int maxZoneIndex = numZones-1;<br>int numCols = numZones * 8;<br><br>int rr=0;<br>uint8_t msg[34];<br>String msgs;<br><br> byte alphabets[][5] = {<br> 0x00, 0x00, 0x00, 0x00, 0x00,// (space)<br> 0x00, 0x00, 0x5F, 0x00, 0x00,// !<br> 0x00, 0x07, 0x00, 0x07, 0x00,// &quot;<br> 0x14, 0x7F, 0x14, 0x7F, 0x14,// #<br> 0x24, 0x2A, 0x7F, 0x2A, 0x12,// $<br> 0x23, 0x13, 0x08, 0x64, 0x62,// %<br> 0x36, 0x49, 0x55, 0x22, 0x50,// &amp;<br> 0x00, 0x05, 0x03, 0x00, 0x00,// '<br> 0x00, 0x1C, 0x22, 0x41, 0x00,// (<br> 0x00, 0x41, 0x22, 0x1C, 0x00,// )<br> 0x08, 0x2A, 0x1C, 0x2A, 0x08,// *<br> 0x08, 0x08, 0x3E, 0x08, 0x08,// +<br> 0x00, 0x50, 0x30, 0x00, 0x00,// ,<br> 0x08, 0x08, 0x08, 0x08, 0x08,// -<br> 0x00, 0x60, 0x60, 0x00, 0x00,// .<br> 0x20, 0x10, 0x08, 0x04, 0x02,// /<br> 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0<br> 0x00, 0x42, 0x7F, 0x40, 0x00,// 1<br> 0x42, 0x61, 0x51, 0x49, 0x46,// 2<br> 0x21, 0x41, 0x45, 0x4B, 0x31,// 3<br> 0x18, 0x14, 0x12, 0x7F, 0x10,// 4<br> 0x27, 0x45, 0x45, 0x45, 0x39,// 5<br> 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6<br> 0x01, 0x71, 0x09, 0x05, 0x03,// 7<br> 0x36, 0x49, 0x49, 0x49, 0x36,// 8<br> 0x06, 0x49, 0x49, 0x29, 0x1E,// 9<br> 0x00, 0x36, 0x36, 0x00, 0x00,// :<br> 0x00, 0x56, 0x36, 0x00, 0x00,// ;<br> 0x00, 0x08, 0x14, 0x22, 0x41,// &lt;<br> 0x14, 0x14, 0x14, 0x14, 0x14,// =<br> 0x41, 0x22, 0x14, 0x08, 0x00,// &gt;<br> 0x02, 0x01, 0x51, 0x09, 0x06,// ?<br> 0x32, 0x49, 0x79, 0x41, 0x3E,// @<br> 0x7E, 0x11, 0x11, 0x11, 0x7E,// A<br> 0x7F, 0x49, 0x49, 0x49, 0x36,// B<br> 0x3E, 0x41, 0x41, 0x41, 0x22,// C<br> 0x7F, 0x41, 0x41, 0x22, 0x1C,// D<br> 0x7F, 0x49, 0x49, 0x49, 0x41,// E<br> 0x7F, 0x09, 0x09, 0x01, 0x01,// F<br> 0x3E, 0x41, 0x41, 0x51, 0x32,// G<br> 0x7F, 0x08, 0x08, 0x08, 0x7F,// H<br> 0x00, 0x41, 0x7F, 0x41, 0x00,// I<br> 0x20, 0x40, 0x41, 0x3F, 0x01,// J<br> 0x7F, 0x08, 0x14, 0x22, 0x41,// K<br> 0x7F, 0x40, 0x40, 0x40, 0x40,// L<br> 0x7F, 0x02, 0x04, 0x02, 0x7F,// M<br> 0x7F, 0x04, 0x08, 0x10, 0x7F,// N<br> 0x3E, 0x41, 0x41, 0x41, 0x3E,// O<br> 0x7F, 0x09, 0x09, 0x09, 0x06,// P<br> 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q<br> 0x7F, 0x09, 0x19, 0x29, 0x46,// R<br> 0x46, 0x49, 0x49, 0x49, 0x31,// S<br> 0x01, 0x01, 0x7F, 0x01, 0x01,// T<br> 0x3F, 0x40, 0x40, 0x40, 0x3F,// U<br> 0x1F, 0x20, 0x40, 0x20, 0x1F,// V<br> 0x7F, 0x20, 0x18, 0x20, 0x7F,// W<br> 0x63, 0x14, 0x08, 0x14, 0x63,// X<br> 0x03, 0x04, 0x78, 0x04, 0x03,// Y<br> 0x61, 0x51, 0x49, 0x45, 0x43,// Z<br> 0x00, 0x00, 0x7F, 0x41, 0x41,// [<br> 0x02, 0x04, 0x08, 0x10, 0x20,// &quot;\&quot;<br> 0x41, 0x41, 0x7F, 0x00, 0x00,// ]<br> 0x04, 0x02, 0x01, 0x02, 0x04,// ^<br> 0x40, 0x40, 0x40, 0x40, 0x40,// _<br> 0x00, 0x01, 0x02, 0x04, 0x00,// `<br> 0x20, 0x54, 0x54, 0x54, 0x78,// a<br> 0x7F, 0x48, 0x44, 0x44, 0x38,// b<br> 0x38, 0x44, 0x44, 0x44, 0x20,// c<br> 0x38, 0x44, 0x44, 0x48, 0x7F,// d<br> 0x38, 0x54, 0x54, 0x54, 0x18,// e<br> 0x08, 0x7E, 0x09, 0x01, 0x02,// f<br> 0x08, 0x14, 0x54, 0x54, 0x3C,// g<br> 0x7F, 0x08, 0x04, 0x04, 0x78,// h<br> 0x00, 0x44, 0x7D, 0x40, 0x00,// i<br> 0x20, 0x40, 0x44, 0x3D, 0x00,// j<br> 0x00, 0x7F, 0x10, 0x28, 0x44,// k<br> 0x00, 0x41, 0x7F, 0x40, 0x00,// l<br> 0x7C, 0x04, 0x18, 0x04, 0x78,// m<br> 0x7C, 0x08, 0x04, 0x04, 0x78,// n<br> 0x38, 0x44, 0x44, 0x44, 0x38,// o<br> 0x7C, 0x14, 0x14, 0x14, 0x08,// p<br> 0x08, 0x14, 0x14, 0x18, 0x7C,// q<br> 0x7C, 0x08, 0x04, 0x04, 0x08,// r<br> 0x48, 0x54, 0x54, 0x54, 0x20,// s<br> 0x04, 0x3F, 0x44, 0x40, 0x20,// t<br> 0x3C, 0x40, 0x40, 0x20, 0x7C,// u<br> 0x1C, 0x20, 0x40, 0x20, 0x1C,// v<br> 0x3C, 0x40, 0x30, 0x40, 0x3C,// w<br> 0x44, 0x28, 0x10, 0x28, 0x44,// x<br> 0x0C, 0x50, 0x50, 0x50, 0x3C,// y<br> 0x44, 0x64, 0x54, 0x4C, 0x44,// z<br> 0x00, 0x08, 0x36, 0x41, 0x00,// {<br> 0x00, 0x00, 0x7F, 0x00, 0x00,// |<br> 0x00, 0x41, 0x36, 0x08, 0x00,// }<br> 0x08, 0x08, 0x2A, 0x1C, 0x08,// -&gt;<br> 0x08, 0x1C, 0x2A, 0x08, 0x08 // &lt;-<br> };<br>/*<br>byte alphabets[][5] = {<br> {65,65,65,65,65},<br> {31, 36, 68, 36, 31},<br> {127, 73, 73, 73, 54},<br> {62, 65, 65, 65, 34},<br> {127, 65, 65, 34, 28},<br> {127, 73, 73, 65, 65},<br> {127, 72, 72, 72, 64},<br> {62, 65, 65, 69, 38},<br> {127, 8, 8, 8, 127},<br> {0, 65, 127, 65, 0},<br> {2, 1, 1, 1, 126},<br> {127, 8, 20, 34, 65},<br> {127, 1, 1, 1, 1},<br> {127, 32, 16, 32, 127},<br> {127, 32, 16, 8, 127},<br> {62, 65, 65, 65, 62},<br> {127, 72, 72, 72, 48},<br> {62, 65, 69, 66, 61},<br> {127, 72, 76, 74, 49},<br> {50, 73, 73, 73, 38},<br> {64, 64, 127, 64, 64},<br> {126, 1, 1, 1, 126},<br> {124, 2, 1, 2, 124},<br> {126, 1, 6, 1, 126},<br> {99, 20, 8, 20, 99},<br> {96, 16, 15, 16, 96},<br> {67, 69, 73, 81, 97},<br>};<br>*/<br><br>//=== S E T U P ===<br><br>void setup() {<br> Serial.begin(9600);<br> pinMode(latchPin1, OUTPUT);<br> pinMode(clockPin1, OUTPUT);<br> pinMode(dataPin1, OUTPUT);<br><br> pinMode(latchPin2, OUTPUT);<br> pinMode(clockPin2, OUTPUT);<br> pinMode(dataPin2, OUTPUT);<br> <br><br><br> //-- Clear bitmap --<br> for (int row = 0; row &gt; 8; row++) {<br> for (int zone = 0; zone &lt;= maxZoneIndex; zone++) {<br> bitmap[row][zone] = 0;<br> }<br> }<br>}<br><br>//=== F U N C T I O N S ===<br>// This routine takes whatever we've setup in the bitmap array and display it on the matrix<br>void RefreshDisplay()<br>{<br> for (int row = 0; row &lt; 8; row++) {<br> int rowbit = 1 &lt;&lt; row;<br> digitalWrite(latchPin2, LOW); //Hold latchPin LOW for as long as we're transmitting data<br> shiftOut(dataPin2, clockPin2, MSBFIRST, rowbit); //Transmit data<br><br> //-- Start sending column bytes --<br> digitalWrite(latchPin1, LOW); //Hold latchPin LOW for as long as we're transmitting data<br><br> //-- Shift out to each matrix (zone is 8 columns represented by one matrix)<br> for (int zone = maxZoneIndex; zone &gt;= 0; zone--) {<br> shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);<br> }<br><br> //-- Done sending Column bytes, flip both latches at once to eliminate flicker<br> digitalWrite(latchPin1, HIGH);<br> digitalWrite(latchPin2, HIGH);<br><br> //-- Wait a little bit to let humans see what we've pushed out onto the matrix --<br> delayMicroseconds(100);<br>//delay(1) ;<br>}<br>}<br><br>// Converts row and colum to actual bitmap bit and turn it off/on<br>void Plot(int col, int row, bool isOn)<br>{<br> int zone = col / 8;<br> int colBitIndex = x % 8;<br> byte colBit = 1 &lt;&lt; colBitIndex;<br> if (isOn)<br> bitmap[row][zone] = bitmap[y][zone] | colBit;<br> else<br> bitmap[row][zone] = bitmap[y][zone] &amp; (~colBit);<br>}<br>// Plot each character of the message one column at a time, updated the display, shift bitmap left.<br>void AlphabetSoup()<br>{<br> if (rr&lt;2){<br> <br> // char msg[] = &quot;12345678901011121314151617&quot;;<br> <br> <br> for (int charIndex=0; charIndex &lt; (sizeof(msg)-1); charIndex++)<br> {<br> int alphabetIndex = msg[charIndex] - ' ';<br> if (alphabetIndex &lt; 0) alphabetIndex=0;<br> <br> //-- Draw one character of the message --<br> for (int col = 0; col &lt; 6; col++)<br> {<br> for (int row = 0; row &lt; 8; row++)<br> {<br> bool isOn = 0;<br> if (col&lt;5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;<br> Plot( numCols-1, row, isOn);<br> }<br> <br> //-- The more times you repeat this loop, the slower we would scroll --<br> for (int refreshCount=0; refreshCount &lt; 1; refreshCount++) //change this value to vary speed<br> // RefreshDisplay();<br> //-- Shift the bitmap one column to left --<br> for (int row=0; row&lt;8; row++)<br> {<br> for (int zone=0; zone &lt; numZones; zone++)<br> {<br> bitmap[row][zone] = bitmap[row][zone] &gt;&gt; 1;<br> // Roll over lowest bit from the next zone as highest bit of this zone.<br> if (zone &lt; maxZoneIndex) bitWrite(bitmap[row][zone], 7,<br>bitRead(bitmap[row][zone+1],0));<br> }<br> }<br> }<br> }<br> }<br> rr++; <br>}<br><br>//=== L O O P ===<br>void loop() {<br><br> <br><br><br> // if (rr&lt;2){<br> AlphabetSoup();<br> // }<br> //rr++;<br> for (int r = 0; r&lt;10; r++){<br>RefreshDisplay();<br>//delay(100);<br>}<br>}<br> </p>
<p>// Stoped Scrolling</p><p>int x;<br> int y;<br> int latchPin1 = 5; //Arduino pin connected to blue 12 RCLK of 74HC595<br> int clockPin1 = 6; //Arduino pin connected to green 11 SRCLK of 74HC595<br> int dataPin1 = 7; //Arduino pin connected to violet 14 SER of 74HC595<br> <br> //-- Rows (Positive Anodes) --<br> int latchPin2 = 9; //Arduino pin connected to yellow Latch 12 RCLK of 74HC595<br> int clockPin2 = 10; //Arduino pin connected to white Clock 11 SRCLK of 74HC595<br> int dataPin2 = 8; //Arduino pin connected to grey Data 14 SER of 74HC595<br> <br> //=== B I T M A P ===<br> //Bits in this array represents one LED of the matrix<br> // 8 is # of rows, 7 is # of LED matrix we have<br> byte bitmap[8][7]; // Change the 7 to however many matrices you want to use.<br> int numZones = sizeof(bitmap) / 8;<br> int maxZoneIndex = numZones-1;<br> int numCols = numZones * 8;<br> <br> byte alphabets[][5] = {<br> {0,0,0,0,0},<br> {31, 36, 68, 36, 31},<br> {127, 73, 73, 73, 54},<br> {62, 65, 65, 65, 34},<br> {127, 65, 65, 34, 28},<br> {127, 73, 73, 65, 65},<br> {127, 72, 72, 72, 64},<br> {62, 65, 65, 69, 38},<br> {127, 8, 8, 8, 127},<br> {0, 65, 127, 65, 0},<br> {2, 1, 1, 1, 126},<br> {127, 8, 20, 34, 65},<br> {127, 1, 1, 1, 1},<br> {127, 32, 16, 32, 127},<br> {127, 32, 16, 8, 127},<br> {62, 65, 65, 65, 62},<br> {127, 72, 72, 72, 48},<br> {62, 65, 69, 66, 61},<br> {127, 72, 76, 74, 49},<br> {50, 73, 73, 73, 38},<br> {64, 64, 127, 64, 64},<br> {126, 1, 1, 1, 126},<br> {124, 2, 1, 2, 124},<br> {126, 1, 6, 1, 126},<br> {99, 20, 8, 20, 99},<br> {96, 16, 15, 16, 96},<br> {67, 69, 73, 81, 97},<br> };<br> <br> //=== S E T U P ===<br> <br> void setup() {<br> pinMode(latchPin1, OUTPUT);<br> pinMode(clockPin1, OUTPUT);<br> pinMode(dataPin1, OUTPUT);<br> <br> pinMode(latchPin2, OUTPUT);<br> pinMode(clockPin2, OUTPUT);<br> pinMode(dataPin2, OUTPUT);<br> <br> //-- Clear bitmap --<br> for (int row = 0; row &gt; 8; row++) {<br> for (int zone = 0; zone &lt;= maxZoneIndex; zone++) {<br> bitmap[row][zone] = 0;<br> }<br> }<br> }<br> <br> //=== F U N C T I O N S ===<br> // This routine takes whatever we've setup in the bitmap array and display it on the matrix<br> void RefreshDisplay()<br> {<br> for (int row = 0; row &lt; 8; row++) {<br> int rowbit = 1 &lt;&lt; row;<br> digitalWrite(latchPin2, LOW); //Hold latchPin LOW for as long as we're transmitting data<br> shiftOut(dataPin2, clockPin2, MSBFIRST, rowbit); //Transmit data<br> <br> //-- Start sending column bytes --<br> digitalWrite(latchPin1, LOW); //Hold latchPin LOW for as long as we're transmitting data<br> <br> //-- Shift out to each matrix (zone is 8 columns represented by one matrix)<br> for (int zone = maxZoneIndex; zone &gt;= 0; zone--) {<br> shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);<br> }<br> <br> //-- Done sending Column bytes, flip both latches at once to eliminate flicker<br> digitalWrite(latchPin1, HIGH<br> digitalWrite(latchPin2, HIGH<br> <br> //-- Wait a little bit to let humans see what we've pushed out onto the matrix --<br> delayMicroseconds(500);<br> }<br> }<br> <br> // Converts row and colum to actual bitmap bit and turn it off/on<br> void Plot(int col, int row, bool isOn)<br> {<br> int zone = col / 8;<br> int colBitIndex = x % 8;<br> byte colBit = 1 &lt;&lt; colBitIndex;<br> if (isOn)<br> bitmap[row][zone] = bitmap[y][zone] | colBit;<br> else<br> bitmap[row][zone] = bitmap[y][zone] &amp; (~colBit);<br> }<br> // Plot each character of the message one column at a time, updated the display, shift bitmap left.<br> void AlphabetSoup()<br> {<br> char msg[] = &quot;YOUR TEXT &quot;;<br> <br> for (int charIndex=0; charIndex &lt; (sizeof(msg)-1); charIndex++)<br> {<br> int alphabetIndex = msg[charIndex] - '@';<br> if (alphabetIndex &lt; 0) alphabetIndex=0;<br> <br> //-- Draw one character of the message --<br> for (int col = 0; col &lt; 6; col++)<br> {<br> for (int row = 0; row &lt; 8; row++)<br> {<br> bool isOn = 0;<br> if (col&lt;5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;<br> Plot( numCols-1, row, isOn<br> }<br> <br> //-- The more times you repeat this loop, the slower we would scroll --<br> for (int refreshCount=0; refreshCount &lt; 7; refreshCount++) //change this value to vary speed<br> <br> //-- Shift the bitmap one column to left --<br> for (int row=0; row&lt;8; row++)<br> {<br> for (int zone=0; zone &lt; numZones; zone++)<br> {<br> bitmap[row][zone] = bitmap[row][zone] &gt;&gt; 1;<br> // Roll over lowest bit from the next zone as highest bit of this zone.<br> if (zone &lt; maxZoneIndex) bitWrite(bitmap[row][zone], 7,<br> bitRead(bitmap[row][zone+1],0));<br> }<br> }<br> }<br> }<br> }<br> <br> //=== L O O P ===<br> void loop() {<br> AlphabetSoup();</p><p>for (int u = 0; u &lt; 100; u++)</p><p>{</p><p>RefreshDisplay();</p><p>}<br> }</p>
<p>I maid this with 720 X 7 leds. conect 216X7 leds computer via arduino Uno (UNO 5V power out), its working.... but its only work with arduino 5V output. when i connect a external power supply it mess. please help me to resolve this issue.</p>
<p>ive try verify it, but it come with error, can u help?</p><p>adrt.ino: In function 'void RefreshDisplay()':</p><p>adrt.ino:88:5: error: expected ')' before 'digitalWrite'</p><p>adrt.ino: In function 'void AlphabetSoup()':</p><p>adrt.ino:124:7: error: expected ')' before '}' token</p><p>adrt.ino:124:7: error: expected ';' before '}' token</p><p>Error compiling.</p>
<p>Doesn't work the code is messed up!</p>
<p>http://www.instructables.com/id/2410-LED-MATRIX-PERFECTLY-RUNNING/</p>
<p>really works ???</p>
http://www.instructables.com/id/2410-LED-MATRIX-PERFECTLY-RUNNING/
<p>Please could you help me ??</p><p>the code with this error:</p><p>what do i do?</p><p>can send the right code.</p><p>email- robertocarlosalvarenga@gmail.com</p><p>sketch_feb17d.ino: In function 'void AlphabetSoup()':</p><p>sketch_feb17d:128: error: expected `)' before '}' token</p><p>sketch_feb17d:128: error: expected `;' before '}' token</p>
<p>Any one please tell me, how to do this coding on c using atmel atmega32 controller.</p><p>If it is available at any other website also inform me about this.</p>
<p>Hello, I am trying to enter a message for variable could help me with this code.</p><p>void AlphabetSoup()</p><p>{</p><p> // Se declaran las variables de tiempo: segundos, minutos, etc.</p><p> byte segundos, minutos, hora, diaDeLaSemana, diaDelMes, mes, anio;</p><p> // Ejecuta la funci&oacute;n getDateDs1307 para recibir los datos actualizados.</p><p> getDateDs1307(&amp;segundos, &amp;minutos, &amp;hora, &amp;diaDeLaSemana, &amp;diaDelMes, &amp;mes, &amp;anio); </p><p> char msg[] = hora;</p><p> (for (int charIndex=0; charIndex &lt; (sizeof(msg)-1); charIndex++)</p><p> //for (int charIndex=0; charIndex &lt; longitud_cadena; charIndex++)</p><p> {</p><p> int alphabetIndex = msg[charIndex] - ' ';</p><p> if (alphabetIndex &lt; 0) alphabetIndex=0;</p>
<p>can u please help me,<br>there was an error,</p><p>expected primary=expression before '&gt;' token</p><p>invalid types 'char[int]' for array subscript..</p><p>any possible solution??</p><p>please</p>
<p>can you give me the code to display all Small Letter and numerical number..... dinfrnpal@gmail.com thankz..</p>
<p>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? </p>
<p>Thank You All Friends. Yours Discussions, Information &amp; Questions are Very useful to us. </p>
<p>hi their.., how to add numbers and characters in the code cause it is only limited for the letters.. </p>
<p>see my post ;)</p>

About This Instructable

216,378views

196favorites

License:

More by karthimech09:48x8 SCROLLING MATRIX LED DISPLAY USING ARDUINO CONTROLLER 
Add instructable to: