Introduction: 48x8 SCROLLING MATRIX LED DISPLAY USING ARDUINO CONTROLLER

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

Step 2: CONNECTING THE SHFIT REGISTERS AND TRANSISTORS.

Here we use 74HC595 to drive the row and colum

single shift register to drive the row

and daisy chained shift registers with common clock pin to drive columns
- Each shift register can drive 8 columns
-Based on the number of columns number of shift registers can be increased,there is no limit for the columns.

Step 3: Interfacing With Arduino

Pin of Arduino                          Shift register pins
5                                    -             12
6                                    -              11
7                                    -              14

the above are for the column drivers

9                                   -              12
10                                -               11
8                                  -                 14

the above are for the row drivers

Step 4: PROGRAM

int x;
int y;
int latchPin1 = 5; //Arduino pin connected to blue 12 RCLK of 74HC595
int clockPin1 = 6; //Arduino pin connected to green 11 SRCLK of 74HC595
int dataPin1 = 7;  //Arduino pin connected to violet 14 SER of 74HC595

//-- Rows (Positive Anodes) --
int latchPin2 = 9; //Arduino pin connected to yellow Latch 12 RCLK of 74HC595
int clockPin2 = 10; //Arduino pin connected to white Clock 11 SRCLK of 74HC595
int dataPin2 = 8;  //Arduino pin connected to grey Data 14 SER of 74HC595

//=== B I T M A P ===
//Bits in this array represents one LED of the matrix
// 8 is # of rows, 7 is # of LED matrix we have
byte bitmap[8][7]; // Change the 7 to however many matrices you want to use.
int numZones = sizeof(bitmap) / 8;
int maxZoneIndex = numZones-1;
int numCols = numZones * 8;

byte alphabets[][5] = {
  {0,0,0,0,0},
  {31, 36, 68, 36, 31},
  {127, 73, 73, 73, 54},
  {62, 65, 65, 65, 34},
  {127, 65, 65, 34, 28},
  {127, 73, 73, 65, 65},
  {127, 72, 72, 72, 64},
  {62, 65, 65, 69, 38},
  {127, 8, 8, 8, 127},
  {0, 65, 127, 65, 0},
  {2, 1, 1, 1, 126},
  {127, 8, 20, 34, 65},
  {127, 1, 1, 1, 1},
  {127, 32, 16, 32, 127},
  {127, 32, 16, 8, 127},
  {62, 65, 65, 65, 62},
  {127, 72, 72, 72, 48},
  {62, 65, 69, 66, 61},
  {127, 72, 76, 74, 49},
  {50, 73, 73, 73, 38},
  {64, 64, 127, 64, 64},
  {126, 1, 1, 1, 126},
  {124, 2, 1, 2, 124},
  {126, 1, 6, 1, 126},
  {99, 20, 8, 20, 99},
  {96, 16, 15, 16, 96},
  {67, 69, 73, 81, 97},
};

//=== S E T U P ===

void setup() {
  pinMode(latchPin1, OUTPUT);
  pinMode(clockPin1, OUTPUT);
  pinMode(dataPin1, OUTPUT);

  pinMode(latchPin2, OUTPUT);
  pinMode(clockPin2, OUTPUT);
  pinMode(dataPin2, OUTPUT);
 
  //-- Clear bitmap --
  for (int row = 0; row > 8; row++) {
    for (int zone = 0; zone <= maxZoneIndex; zone++) {
      bitmap[row][zone] = 0;
    }
  }
}

//=== F U N C T I O N S ===
// This routine takes whatever we've setup in the bitmap array and display it on the matrix
void RefreshDisplay()
{
  for (int row = 0; row < 8; row++) {
    int rowbit = 1 << row;
    digitalWrite(latchPin2, LOW);  //Hold latchPin LOW for as long as we're transmitting data
    shiftOut(dataPin2, clockPin2, MSBFIRST, rowbit);   //Transmit data

    //-- Start sending column bytes --
    digitalWrite(latchPin1, LOW);  //Hold latchPin LOW for as long as we're transmitting data

    //-- Shift out to each matrix (zone is 8 columns represented by one matrix)
    for (int zone = maxZoneIndex; zone >= 0; zone--) {
      shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);
    }

    //-- Done sending Column bytes, flip both latches at once to eliminate flicker
    digitalWrite(latchPin1, HIGH
    digitalWrite(latchPin2, HIGH

    //-- Wait a little bit to let humans see what we've pushed out onto the matrix --
    delayMicroseconds(500);
  }
}

// Converts row and colum to actual bitmap bit and turn it off/on
void Plot(int col, int row, bool isOn)
{
  int zone = col / 8;
  int colBitIndex = x % 8;
  byte colBit = 1 << colBitIndex;
  if (isOn)
    bitmap[row][zone] =  bitmap[y][zone] | colBit;
  else
    bitmap[row][zone] =  bitmap[y][zone] & (~colBit);
}
// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void AlphabetSoup()
{
  char msg[] = "YOUR TEXT ";

  for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)
  {
    int alphabetIndex = msg[charIndex] - '@';
    if (alphabetIndex < 0) alphabetIndex=0;
   
    //-- Draw one character of the message --
    for (int col = 0; col < 6; col++)
    {
      for (int row = 0; row < 8; row++)
      {
        bool isOn = 0;
        if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;
        Plot( numCols-1, row, isOn
      }
     
      //-- The more times you repeat this loop, the slower we would scroll --
      for (int refreshCount=0; refreshCount < 7; refreshCount++) //change  this value to vary speed
        RefreshDisplay();
      //-- Shift the bitmap one column to left --
      for (int row=0; row<8; row++)
      {
        for (int zone=0; zone < numZones; zone++)
        {
          bitmap[row][zone] = bitmap[row][zone] >> 1;
                    // Roll over lowest bit from the next zone as highest bit of this zone.
          if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7,
bitRead(bitmap[row][zone+1],0));
        }
      }
    }
  }
}

//=== L O O P ===
void loop() {
  AlphabetSoup();
}

Step 5: OUTPUT OF MY BUILD

THE OUTPUT OF MY BUILD 8X48 MATRIX SCROLL DISPLAY

Comments

author
azadbd (author)2017-08-07

please help me

author
azadbd (author)2017-08-07

I can't program with this code. Here show error with "digitalWrite(latchPin2," HIGH

author
rca_dj1 made it! (author)2017-02-12

hi there . iam made a project following yours but i need to connect to the Bluetooth module so that my scrolling text is made frome the android phone to the Bluetooth module to the matrix. i already an application for the phone and i test it sending text to serial monitor and i works.

#include <SoftwareSerial.h>

#define rxPin 3

#define txPin 4

SoftwareSerial mySerial(rxPin, txPin); // RX, TX

char myChar ;

void setup() {

Serial.begin(9600);

Serial.println("Goodnight moon!");

}

void loop(){

while(mySerial.available()){

myChar = mySerial.read();

Serial.print(myChar);

}

while(Serial.available()){

myChar = Serial.read();

mySerial.print(myChar);

}

}


all i need is to send text to the matrix via bluetooth.... thanks

GMAIL: abrasado1128@gmail.com


IMG_20170213_143857.jpgIMG_20170213_143914.jpg
author
prashanthjf (author)2017-02-10

Hi sir , my project is on GSM and Arduino Based Electronic notice board with scrolling led matrix . Is this code helpful to me??

author
iroko1 (author)2017-02-09

please, i connected this your code well but it is displaying. can you guide me on what to do

author
ZafarD (author)2015-09-16

very nice..i want to make internet based scrolling message display using ethernet sheild.

author
rahulr31 (author)ZafarD2017-02-05

yo must should go with raspberry pi then

author
shashium (author)ZafarD2016-11-16

hello sir, I have to do this project, scrolling led matrix using arduino ethernet sheild. can you help me? can you please send me code (I am not good in programming) ?

please reply me shashibhushan3535@gmail.com

author
kashishgupta (author)2017-01-09

i have connected cathodes along rows and anodes along columns and the words are shown inverted and there is no proper formation of words. sir help me so that i can correct it by programming rather than changing the circuit. please do reply on my email. email:- kg2276@gmail.com

author
joshuaa96 (author)2016-12-12

Hi

your code works perfectly. but

can you please help me modify your code so that it will work perfectly in a 48x10 led matrix? I tried to modify your code but it always fails. can you help me so that the letters will exactly 10 LEDS in height and 7 LEDS in WIDTH.

thanks in advance

author
Rap2Romero (author)2016-12-11

Hi,

I have an existing "ready made" LED scrolling message i purchased from Japan Auction. However, I cannot get support to change the message and character display. I'm thinking of changing the controller using Arduino or any equivalent controller. can somebody help me on this?

author
JavedA22 (author)2016-11-18

hello sir, I have to do this project, scrolling led matrix using arduino
ethernet sheild. can you help me? can you please send me code (I am not
good in programming) ?

please send me coad javedali1987@yahoo.com

author
JavedA22 (author)2016-11-18

SCROLLING MATRIX LED DISPLAY USING ARDUINO CONTROLLER i help me arduin uno program

author
mhache (author)2016-11-02

Hi there, what size of power supply are you using? Also noticed you aren't using a current sink, no problems with the shift registers overheating? Thanks

author
M Arifulla Horkeri. (author)2016-09-17

I have 8x8 ledmatrix how it connect to 74HC595

author
BayuC (author)2016-08-05

mas klok nginput angka gak bsa ya

author
badhoutiya (author)2016-05-27

I have made a 6*32 led matrix .
I have connected cathodes along the columns and anode along the rows.
I just want to ask that where should I connect the resistance? Also how the programming works?

author
GuillaumeM8 (author)2016-05-10

I made a 12x32 led matrix with your circuit.
Can you help me to modify the code?

author
khavoc (author)2015-07-07

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

int latchPin1 = 8; //Arduino pin connected to blue 12 RCLK of 74HC595
int clockPin1 = 12; //Arduino pin connected to green 11 SRCLK of 74HC595
int dataPin1 = 11; //Arduino pin connected to violet 14 SER of 74HC595


//=== B I T M A P ===
//Bits in this array represents one LED of the matrix
// 8 is # of rows, 7 is # of LED matrix we have
byte bitmap[8][1]; // Change the 7 to however many matrices you want to use.
int numZones = sizeof(bitmap) / 8;
int maxZoneIndex = numZones - 1;
int numCols = numZones * 8;

byte alphabets[][5] = {
{0, 0, 0, 0, 0},
{31, 36, 68, 36, 31},
{127, 73, 73, 73, 54},
{62, 65, 65, 65, 34},
{127, 65, 65, 34, 28},
{127, 73, 73, 65, 65},
{127, 72, 72, 72, 64},
{62, 65, 65, 69, 38},
{127, 8, 8, 8, 127},
{0, 65, 127, 65, 0},
{2, 1, 1, 1, 126},
{127, 8, 20, 34, 65},
{127, 1, 1, 1, 1},
{127, 32, 16, 32, 127},
{127, 32, 16, 8, 127},
{62, 65, 65, 65, 62},
{127, 72, 72, 72, 48},
{62, 65, 69, 66, 61},
{127, 72, 76, 74, 49},
{50, 73, 73, 73, 38},
{64, 64, 127, 64, 64},
{126, 1, 1, 1, 126},
{124, 2, 1, 2, 124},
{126, 1, 6, 1, 126},
{99, 20, 8, 20, 99},
{96, 16, 15, 16, 96},
{67, 69, 73, 81, 97},
};

//=== S E T U P ===

void setup() {
pinMode(latchPin1, OUTPUT);
pinMode(clockPin1, OUTPUT);
pinMode(dataPin1, OUTPUT);

//-- Clear bitmap --
for (int row = 0; row < 8; row++) {
for (int zone = 0; zone <= maxZoneIndex; zone++) {
bitmap[row][zone] = 0;
}
}
}

//=== F U N C T I O N S ===
// This routine takes whatever we've setup in the bitmap array and display it on the matrix
void RefreshDisplay()
{
for (int row = 0; row < 8; row++) {

//-- Start sending column bytes --
digitalWrite(latchPin1, LOW); //Hold latchPin LOW for as long as we're transmitting data
int rowbit = 1 << row;
shiftOut(dataPin1, clockPin1, MSBFIRST, rowbit); //Transmit data

//-- Shift out to each matrix (zone is 8 columns represented by one matrix)
for (int zone = maxZoneIndex; zone >= 0; zone--) {
shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);
}

//-- Done sending Column bytes, flip both latches at once to eliminate flicker
digitalWrite(latchPin1, HIGH);
//-- Wait a little bit to let humans see what we've pushed out onto the matrix --
delayMicroseconds(500);
}
}

// Converts row and colum to actual bitmap bit and turn it off/on
void Plot(int col, int row, bool isOn)
{
int zone = col / 8;
int colBitIndex = col % 8;
byte colBit = 1 << colBitIndex;
if (isOn)
bitmap[row][zone] = bitmap[row][zone] | colBit;
else
bitmap[row][zone] = bitmap[row][zone] & (~colBit);
}
// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void AlphabetSoup()
{
char msg[] = "I LOVE YOU SO VERY MUCH ";

for (int charIndex = 0; charIndex < (sizeof(msg) - 1); charIndex++)
{
int alphabetIndex = msg[charIndex] - '@';
if (alphabetIndex < 0) alphabetIndex = 0;

//-- Draw one character of the message --
for (int col = 0; col < 6; col++)
{
for (int row = 0; row < 8; row++)
{
bool isOn = 0;
if (col < 5) isOn = bitRead( alphabets[alphabetIndex][col], 7 - row ) == 1;
Plot( numCols - 1, row, isOn);
}

//-- The more times you repeat this loop, the slower we would scroll --
for (int refreshCount = 0; refreshCount < 10; refreshCount++) //change this value to vary speed
RefreshDisplay();
//-- Shift the bitmap one column to left --
for (int row = 0; row < 8; row++)
{
for (int zone = 0; zone < numZones; zone++)
{
bitmap[row][zone] = bitmap[row][zone] >> 1;
// Roll over lowest bit from the next zone as highest bit of this zone.
if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7,
bitRead(bitmap[row][zone + 1], 0));
}
}
}
}
}

//=== L O O P ===
void loop() {
AlphabetSoup();
}

author
aakinkunmi (author)khavoc2016-04-27

Pls can i get a circuit diagram for your program?

author
sharmapukar (author)khavoc2015-10-15

What about datapin2 latchpin2 and clockpin2? Where do we have to connect those?

author
aakinkunmi (author)sharmapukar2016-04-27

Did he reply you and if he did pls can i know what he said ?

author
sachin george (author)2016-02-08

this is the screenshot of errors occurred while stimulation in proteus software.. can any one help me by solving the issue

proteus.jpg
author

May be your shift register is defined by u9 U10 U11!!!!!
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

author
MadanG7 (author)2016-03-25

how can i change row to column, cause i have placed the LED matrix by 90' shift but correct according to datasheet

12476527_1111207092256223_990641507_n.jpg
author
sarul1 (author)2016-03-04

THANK U VERY MUCH, U MADE MY DAY

author
sachin george made it! (author)2016-02-08

this is the screenshot of errors occurred while stimulation in proteus software.. can any one help me by solving the issue

proteus.jpg
author
MonishN (author)2016-01-18

can anyone explain me contents of alphabet array and its use?.. Thanks

author
jafleu (author)2015-12-30

Hi,


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.
for the rows i used decade counter 10 outputs, and shift register 8 outputs to drive the columns.

My question is How I modify your code to make work for a 117x24.

Plz in any way possible.

thnks in advance

author
xpjerin (author)jafleu2016-01-15

hey did u get the code...if yes..please mail it..xpjerin@gmail.com

author
registermark (author)2015-12-04

Would it be possible to reconfigure this code to work for a 11X11 RGB common anode wall?

author
MadhurendraP (author)2015-11-04

please provide me the codes for the display having 7 row and 37 column

author
newton92 (author)MadhurendraP2015-11-25

The code will remain same... You can change the " byte bitmap[8][7]; " to " byte bitmap[8][9]; ". That will be good enough for 37 columns... :)

author
newton92 made it! (author)2015-10-13

Thanks for this project... I made it...

Can u tell me how to change the bitmap for 16 rows? I wanna make a 16x50 display.
Would u like to help me??? plz

Capture.JPG
author
Sanjibs (author)newton922015-11-22

nice project...........

author
newton92 (author)Sanjibs2015-11-25

Thanks... :)

author
karthimech09 (author)2013-05-07

If anyone have any doubt,pls feel free to ask
and Help me to increase the character set......

welcome guys

author
newton92 (author)karthimech092015-10-13

Thanks for this project... I made it...
Can u tell me how to change the bitmap for 16 rows? I wanna make a 16x50 display.
Would u like to help me??? plz

author
tomasm14 (author)2015-09-03

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

author
TaherU (author)2015-07-03

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

author
sanjoseph (author)2013-07-05

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

author
karthimech09 (author)sanjoseph2013-08-03

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

author
chiven (author)karthimech092015-06-27

hey, make sure you are not run out of memories.. why you not used byte instead int?

author
TAPAN MOJIDRA (author)sanjoseph2015-03-27

https://www.instructables.com/id/2410-LED-MATRIX-PERFECTLY-RUNNING/

author
xia04 (author)2015-06-09

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?

author
carlos def (author)2015-05-17

Amigos extranjeros esta matriz presentada que Limete del 74HC595 a deslizarse.

author
scottfrazier (author)2015-05-08

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

author
SriyanJ (author)2015-04-27

// Code With all characters and stoped scrolling (changed font) .

// Developer : Asela Jayathilaka on 04-28-2015.


int x;
int y;
int latchPin1 = 5; //Arduino pin connected to blue 12 RCLK of 74HC595
int clockPin1 = 6; //Arduino pin connected to green 11 SRCLK of 74HC595
int dataPin1 = 7; //Arduino pin connected to violet 14 SER of 74HC595

//-- Rows (Positive Anodes) --
int latchPin2 = 9; //Arduino pin connected to yellow Latch 12 RCLK of 74HC595
int clockPin2 = 10; //Arduino pin connected to white Clock 11 SRCLK of 74HC595
int dataPin2 = 8; //Arduino pin connected to grey Data 14 SER of 74HC595

//=== B I T M A P ===
//Bits in this array represents one LED of the matrix
// 8 is # of rows, 7 is # of LED matrix we have
byte bitmap[8][34]; // Change the 7 to however many matrices you want to use.
int numZones = sizeof(bitmap) / 8;
int maxZoneIndex = numZones-1;
int numCols = numZones * 8;

int rr=0;
uint8_t msg[34];
String msgs;

byte alphabets[][5] = {
0x00, 0x00, 0x00, 0x00, 0x00,// (space)
0x00, 0x00, 0x5F, 0x00, 0x00,// !
0x00, 0x07, 0x00, 0x07, 0x00,// "
0x14, 0x7F, 0x14, 0x7F, 0x14,// #
0x24, 0x2A, 0x7F, 0x2A, 0x12,// $
0x23, 0x13, 0x08, 0x64, 0x62,// %
0x36, 0x49, 0x55, 0x22, 0x50,// &
0x00, 0x05, 0x03, 0x00, 0x00,// '
0x00, 0x1C, 0x22, 0x41, 0x00,// (
0x00, 0x41, 0x22, 0x1C, 0x00,// )
0x08, 0x2A, 0x1C, 0x2A, 0x08,// *
0x08, 0x08, 0x3E, 0x08, 0x08,// +
0x00, 0x50, 0x30, 0x00, 0x00,// ,
0x08, 0x08, 0x08, 0x08, 0x08,// -
0x00, 0x60, 0x60, 0x00, 0x00,// .
0x20, 0x10, 0x08, 0x04, 0x02,// /
0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
0x00, 0x42, 0x7F, 0x40, 0x00,// 1
0x42, 0x61, 0x51, 0x49, 0x46,// 2
0x21, 0x41, 0x45, 0x4B, 0x31,// 3
0x18, 0x14, 0x12, 0x7F, 0x10,// 4
0x27, 0x45, 0x45, 0x45, 0x39,// 5
0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
0x01, 0x71, 0x09, 0x05, 0x03,// 7
0x36, 0x49, 0x49, 0x49, 0x36,// 8
0x06, 0x49, 0x49, 0x29, 0x1E,// 9
0x00, 0x36, 0x36, 0x00, 0x00,// :
0x00, 0x56, 0x36, 0x00, 0x00,// ;
0x00, 0x08, 0x14, 0x22, 0x41,// <
0x14, 0x14, 0x14, 0x14, 0x14,// =
0x41, 0x22, 0x14, 0x08, 0x00,// >
0x02, 0x01, 0x51, 0x09, 0x06,// ?
0x32, 0x49, 0x79, 0x41, 0x3E,// @
0x7E, 0x11, 0x11, 0x11, 0x7E,// A
0x7F, 0x49, 0x49, 0x49, 0x36,// B
0x3E, 0x41, 0x41, 0x41, 0x22,// C
0x7F, 0x41, 0x41, 0x22, 0x1C,// D
0x7F, 0x49, 0x49, 0x49, 0x41,// E
0x7F, 0x09, 0x09, 0x01, 0x01,// F
0x3E, 0x41, 0x41, 0x51, 0x32,// G
0x7F, 0x08, 0x08, 0x08, 0x7F,// H
0x00, 0x41, 0x7F, 0x41, 0x00,// I
0x20, 0x40, 0x41, 0x3F, 0x01,// J
0x7F, 0x08, 0x14, 0x22, 0x41,// K
0x7F, 0x40, 0x40, 0x40, 0x40,// L
0x7F, 0x02, 0x04, 0x02, 0x7F,// M
0x7F, 0x04, 0x08, 0x10, 0x7F,// N
0x3E, 0x41, 0x41, 0x41, 0x3E,// O
0x7F, 0x09, 0x09, 0x09, 0x06,// P
0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
0x7F, 0x09, 0x19, 0x29, 0x46,// R
0x46, 0x49, 0x49, 0x49, 0x31,// S
0x01, 0x01, 0x7F, 0x01, 0x01,// T
0x3F, 0x40, 0x40, 0x40, 0x3F,// U
0x1F, 0x20, 0x40, 0x20, 0x1F,// V
0x7F, 0x20, 0x18, 0x20, 0x7F,// W
0x63, 0x14, 0x08, 0x14, 0x63,// X
0x03, 0x04, 0x78, 0x04, 0x03,// Y
0x61, 0x51, 0x49, 0x45, 0x43,// Z
0x00, 0x00, 0x7F, 0x41, 0x41,// [
0x02, 0x04, 0x08, 0x10, 0x20,// "\"
0x41, 0x41, 0x7F, 0x00, 0x00,// ]
0x04, 0x02, 0x01, 0x02, 0x04,// ^
0x40, 0x40, 0x40, 0x40, 0x40,// _
0x00, 0x01, 0x02, 0x04, 0x00,// `
0x20, 0x54, 0x54, 0x54, 0x78,// a
0x7F, 0x48, 0x44, 0x44, 0x38,// b
0x38, 0x44, 0x44, 0x44, 0x20,// c
0x38, 0x44, 0x44, 0x48, 0x7F,// d
0x38, 0x54, 0x54, 0x54, 0x18,// e
0x08, 0x7E, 0x09, 0x01, 0x02,// f
0x08, 0x14, 0x54, 0x54, 0x3C,// g
0x7F, 0x08, 0x04, 0x04, 0x78,// h
0x00, 0x44, 0x7D, 0x40, 0x00,// i
0x20, 0x40, 0x44, 0x3D, 0x00,// j
0x00, 0x7F, 0x10, 0x28, 0x44,// k
0x00, 0x41, 0x7F, 0x40, 0x00,// l
0x7C, 0x04, 0x18, 0x04, 0x78,// m
0x7C, 0x08, 0x04, 0x04, 0x78,// n
0x38, 0x44, 0x44, 0x44, 0x38,// o
0x7C, 0x14, 0x14, 0x14, 0x08,// p
0x08, 0x14, 0x14, 0x18, 0x7C,// q
0x7C, 0x08, 0x04, 0x04, 0x08,// r
0x48, 0x54, 0x54, 0x54, 0x20,// s
0x04, 0x3F, 0x44, 0x40, 0x20,// t
0x3C, 0x40, 0x40, 0x20, 0x7C,// u
0x1C, 0x20, 0x40, 0x20, 0x1C,// v
0x3C, 0x40, 0x30, 0x40, 0x3C,// w
0x44, 0x28, 0x10, 0x28, 0x44,// x
0x0C, 0x50, 0x50, 0x50, 0x3C,// y
0x44, 0x64, 0x54, 0x4C, 0x44,// z
0x00, 0x08, 0x36, 0x41, 0x00,// {
0x00, 0x00, 0x7F, 0x00, 0x00,// |
0x00, 0x41, 0x36, 0x08, 0x00,// }
0x08, 0x08, 0x2A, 0x1C, 0x08,// ->
0x08, 0x1C, 0x2A, 0x08, 0x08 // <-
};
/*
byte alphabets[][5] = {
{65,65,65,65,65},
{31, 36, 68, 36, 31},
{127, 73, 73, 73, 54},
{62, 65, 65, 65, 34},
{127, 65, 65, 34, 28},
{127, 73, 73, 65, 65},
{127, 72, 72, 72, 64},
{62, 65, 65, 69, 38},
{127, 8, 8, 8, 127},
{0, 65, 127, 65, 0},
{2, 1, 1, 1, 126},
{127, 8, 20, 34, 65},
{127, 1, 1, 1, 1},
{127, 32, 16, 32, 127},
{127, 32, 16, 8, 127},
{62, 65, 65, 65, 62},
{127, 72, 72, 72, 48},
{62, 65, 69, 66, 61},
{127, 72, 76, 74, 49},
{50, 73, 73, 73, 38},
{64, 64, 127, 64, 64},
{126, 1, 1, 1, 126},
{124, 2, 1, 2, 124},
{126, 1, 6, 1, 126},
{99, 20, 8, 20, 99},
{96, 16, 15, 16, 96},
{67, 69, 73, 81, 97},
};
*/

//=== S E T U P ===

void setup() {
Serial.begin(9600);
pinMode(latchPin1, OUTPUT);
pinMode(clockPin1, OUTPUT);
pinMode(dataPin1, OUTPUT);

pinMode(latchPin2, OUTPUT);
pinMode(clockPin2, OUTPUT);
pinMode(dataPin2, OUTPUT);



//-- Clear bitmap --
for (int row = 0; row > 8; row++) {
for (int zone = 0; zone <= maxZoneIndex; zone++) {
bitmap[row][zone] = 0;
}
}
}

//=== F U N C T I O N S ===
// This routine takes whatever we've setup in the bitmap array and display it on the matrix
void RefreshDisplay()
{
for (int row = 0; row < 8; row++) {
int rowbit = 1 << row;
digitalWrite(latchPin2, LOW); //Hold latchPin LOW for as long as we're transmitting data
shiftOut(dataPin2, clockPin2, MSBFIRST, rowbit); //Transmit data

//-- Start sending column bytes --
digitalWrite(latchPin1, LOW); //Hold latchPin LOW for as long as we're transmitting data

//-- Shift out to each matrix (zone is 8 columns represented by one matrix)
for (int zone = maxZoneIndex; zone >= 0; zone--) {
shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);
}

//-- Done sending Column bytes, flip both latches at once to eliminate flicker
digitalWrite(latchPin1, HIGH);
digitalWrite(latchPin2, HIGH);

//-- Wait a little bit to let humans see what we've pushed out onto the matrix --
delayMicroseconds(100);
//delay(1) ;
}
}

// Converts row and colum to actual bitmap bit and turn it off/on
void Plot(int col, int row, bool isOn)
{
int zone = col / 8;
int colBitIndex = x % 8;
byte colBit = 1 << colBitIndex;
if (isOn)
bitmap[row][zone] = bitmap[y][zone] | colBit;
else
bitmap[row][zone] = bitmap[y][zone] & (~colBit);
}
// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void AlphabetSoup()
{
if (rr<2){

// char msg[] = "12345678901011121314151617";


for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)
{
int alphabetIndex = msg[charIndex] - ' ';
if (alphabetIndex < 0) alphabetIndex=0;

//-- Draw one character of the message --
for (int col = 0; col < 6; col++)
{
for (int row = 0; row < 8; row++)
{
bool isOn = 0;
if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;
Plot( numCols-1, row, isOn);
}

//-- The more times you repeat this loop, the slower we would scroll --
for (int refreshCount=0; refreshCount < 1; refreshCount++) //change this value to vary speed
// RefreshDisplay();
//-- Shift the bitmap one column to left --
for (int row=0; row<8; row++)
{
for (int zone=0; zone < numZones; zone++)
{
bitmap[row][zone] = bitmap[row][zone] >> 1;
// Roll over lowest bit from the next zone as highest bit of this zone.
if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7,
bitRead(bitmap[row][zone+1],0));
}
}
}
}
}
rr++;
}

//=== L O O P ===
void loop() {




// if (rr<2){
AlphabetSoup();
// }
//rr++;
for (int r = 0; r<10; r++){
RefreshDisplay();
//delay(100);
}
}

author
SriyanJ (author)2015-04-27

// Stoped Scrolling

int x;
int y;
int latchPin1 = 5; //Arduino pin connected to blue 12 RCLK of 74HC595
int clockPin1 = 6; //Arduino pin connected to green 11 SRCLK of 74HC595
int dataPin1 = 7; //Arduino pin connected to violet 14 SER of 74HC595

//-- Rows (Positive Anodes) --
int latchPin2 = 9; //Arduino pin connected to yellow Latch 12 RCLK of 74HC595
int clockPin2 = 10; //Arduino pin connected to white Clock 11 SRCLK of 74HC595
int dataPin2 = 8; //Arduino pin connected to grey Data 14 SER of 74HC595

//=== B I T M A P ===
//Bits in this array represents one LED of the matrix
// 8 is # of rows, 7 is # of LED matrix we have
byte bitmap[8][7]; // Change the 7 to however many matrices you want to use.
int numZones = sizeof(bitmap) / 8;
int maxZoneIndex = numZones-1;
int numCols = numZones * 8;

byte alphabets[][5] = {
{0,0,0,0,0},
{31, 36, 68, 36, 31},
{127, 73, 73, 73, 54},
{62, 65, 65, 65, 34},
{127, 65, 65, 34, 28},
{127, 73, 73, 65, 65},
{127, 72, 72, 72, 64},
{62, 65, 65, 69, 38},
{127, 8, 8, 8, 127},
{0, 65, 127, 65, 0},
{2, 1, 1, 1, 126},
{127, 8, 20, 34, 65},
{127, 1, 1, 1, 1},
{127, 32, 16, 32, 127},
{127, 32, 16, 8, 127},
{62, 65, 65, 65, 62},
{127, 72, 72, 72, 48},
{62, 65, 69, 66, 61},
{127, 72, 76, 74, 49},
{50, 73, 73, 73, 38},
{64, 64, 127, 64, 64},
{126, 1, 1, 1, 126},
{124, 2, 1, 2, 124},
{126, 1, 6, 1, 126},
{99, 20, 8, 20, 99},
{96, 16, 15, 16, 96},
{67, 69, 73, 81, 97},
};

//=== S E T U P ===

void setup() {
pinMode(latchPin1, OUTPUT);
pinMode(clockPin1, OUTPUT);
pinMode(dataPin1, OUTPUT);

pinMode(latchPin2, OUTPUT);
pinMode(clockPin2, OUTPUT);
pinMode(dataPin2, OUTPUT);

//-- Clear bitmap --
for (int row = 0; row > 8; row++) {
for (int zone = 0; zone <= maxZoneIndex; zone++) {
bitmap[row][zone] = 0;
}
}
}

//=== F U N C T I O N S ===
// This routine takes whatever we've setup in the bitmap array and display it on the matrix
void RefreshDisplay()
{
for (int row = 0; row < 8; row++) {
int rowbit = 1 << row;
digitalWrite(latchPin2, LOW); //Hold latchPin LOW for as long as we're transmitting data
shiftOut(dataPin2, clockPin2, MSBFIRST, rowbit); //Transmit data

//-- Start sending column bytes --
digitalWrite(latchPin1, LOW); //Hold latchPin LOW for as long as we're transmitting data

//-- Shift out to each matrix (zone is 8 columns represented by one matrix)
for (int zone = maxZoneIndex; zone >= 0; zone--) {
shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);
}

//-- Done sending Column bytes, flip both latches at once to eliminate flicker
digitalWrite(latchPin1, HIGH
digitalWrite(latchPin2, HIGH

//-- Wait a little bit to let humans see what we've pushed out onto the matrix --
delayMicroseconds(500);
}
}

// Converts row and colum to actual bitmap bit and turn it off/on
void Plot(int col, int row, bool isOn)
{
int zone = col / 8;
int colBitIndex = x % 8;
byte colBit = 1 << colBitIndex;
if (isOn)
bitmap[row][zone] = bitmap[y][zone] | colBit;
else
bitmap[row][zone] = bitmap[y][zone] & (~colBit);
}
// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void AlphabetSoup()
{
char msg[] = "YOUR TEXT ";

for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)
{
int alphabetIndex = msg[charIndex] - '@';
if (alphabetIndex < 0) alphabetIndex=0;

//-- Draw one character of the message --
for (int col = 0; col < 6; col++)
{
for (int row = 0; row < 8; row++)
{
bool isOn = 0;
if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;
Plot( numCols-1, row, isOn
}

//-- The more times you repeat this loop, the slower we would scroll --
for (int refreshCount=0; refreshCount < 7; refreshCount++) //change this value to vary speed

//-- Shift the bitmap one column to left --
for (int row=0; row<8; row++)
{
for (int zone=0; zone < numZones; zone++)
{
bitmap[row][zone] = bitmap[row][zone] >> 1;
// Roll over lowest bit from the next zone as highest bit of this zone.
if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7,
bitRead(bitmap[row][zone+1],0));
}
}
}
}
}

//=== L O O P ===
void loop() {
AlphabetSoup();

for (int u = 0; u < 100; u++)

{

RefreshDisplay();

}
}

author
SriyanJ made it! (author)2015-04-27

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.

WP_20150424_01_56_42_Pro.mp4