8×8 LED Matrix Module

8×8 LED Matrix Module

Today,we introduce the usage of 8X8 LED Matrix Module. First we introduce the method it takes. Take digital ‘A’ as an example;

The above figure ‘A’ can also be any data to be displayed, it can be a picture, the above white circle represents 0, the red circle represents 1.
First column:       0b00000000 = 0x00;
Second column:  0b00111110 = 0x3E;
Third column:      0b01001000 = 0x48;
Fourth column:    0b10001000 = 0x88;
Fifth column:       0b10001000 = 0x88;
Sixth column:      0b01001000 = 0x48;
Seventh column: 0b00111110 = 0x3E;
Eighth column:    0b00000000 = 0x00.
We show the calculated ‘A’
Arduino program is as follows:

/***********************************************************
File name: 8X8LEDMatrixModule.ino
Description: you can see a rolling “A”or"Smiling face" should be displayed
             on the 8x8 LED matrix module.
Website: www.adeept.com
E-mail: support@adeept.com
Author: Tom
Date: 2017/10/14 
***********************************************************/

const int st_cpPin = 12; //Pin connected to ST_CP of 74HC595
const int sh_cpPin = 8;  //Pin connected to SH_CP of 74HC595  
const int dsPin = 11;    //Pin connected to DS of 74HC595 
//Column scanning
int data[] = {
              0x00,0x3E,0x48,0x88,0x88,0x48,0x3E,0x00 //A
             // 0x3C,0x42,0xA5,0x81,0xC3,0xBD,0x42,0x3C//Smiling face
              };
              
//Line scan            
unsigned char  tab[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};  

void setup ()
{
  //set pins to output
  pinMode(st_cpPin,OUTPUT);//Set digital 12 port mode, the OUTPUT for the output
  pinMode(sh_cpPin,OUTPUT);//Set digital 8 port mode, the OUTPUT for the output
  pinMode(dsPin,OUTPUT);   //Set digital 11 port mode, the OUTPUT for the output
}

void loop()
{
    for(int num=0; num < 8; num++)//8 columns of data sent to a dot matrix
    {                       
        shiftOut(dsPin,sh_cpPin,MSBFIRST,data[num]); //Send column data to a dot matrix
        shiftOut(dsPin,sh_cpPin,MSBFIRST,tab[num]);//Send line data to a dot matrix
        //The rising edge of the data shift
        digitalWrite(st_cpPin,HIGH); //Output control latch HIGH  
        digitalWrite(st_cpPin,LOW);  //Output control latch LOW
     }
}

Connection diagram

The display is as follows:

We are here to do the demo as shown below ‘smiling face’

First column:       0b00111100 = 0x3C;
Second column:  0b01000010 = 0x42;
Third column:      0b10100101 = 0xA5;
Fourth column:    0b10000001 = 0x81;
Fifth column:       0b11000011 = 0xC3;
Sixth column:      0b10111101 = 0xBD;
Seventh column: 0b01000010 = 0x42;
Eighth column:    0b00111100 = 0x3C.
We will calculate the ‘smile’ show
Arduino program is as follows:

/***********************************************************
File name: 8X8LEDMatrixModule.ino
Description: you can see a rolling “A”or"Smiling face" should be displayed
             on the 8x8 LED matrix module.
Website: www.adeept.com
E-mail: support@adeept.com
Author: Tom
Date: 2017/10/14 
***********************************************************/

const int st_cpPin = 12; //Pin connected to ST_CP of 74HC595
const int sh_cpPin = 8;  //Pin connected to SH_CP of 74HC595  
const int dsPin = 11;    //Pin connected to DS of 74HC595 
//Column scanning
int data[] = {
              //0x00,0x3E,0x48,0x88,0x88,0x48,0x3E,0x00 //A
              0x3C,0x42,0xA5,0x81,0xC3,0xBD,0x42,0x3C//Smiling face
              };
              
//Line scan            
unsigned char  tab[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};  

void setup ()
{
  //set pins to output
  pinMode(st_cpPin,OUTPUT);//Set digital 12 port mode, the OUTPUT for the output
  pinMode(sh_cpPin,OUTPUT);//Set digital 8 port mode, the OUTPUT for the output
  pinMode(dsPin,OUTPUT);   //Set digital 11 port mode, the OUTPUT for the output
}

void loop()
{
    for(int num=0; num < 8; num++)//8 columns of data sent to a dot matrix
    {                       
        shiftOut(dsPin,sh_cpPin,MSBFIRST,data[num]); //Send column data to a dot matrix
        shiftOut(dsPin,sh_cpPin,MSBFIRST,tab[num]);//Send line data to a dot matrix
        //The rising edge of the data shift
        digitalWrite(st_cpPin,HIGH); //Output control latch HIGH  
        digitalWrite(st_cpPin,LOW);  //Output control latch LOW
     }
}

The display is as follows:

One Reply to “8×8 LED Matrix Module”

  1. Here at Leslie’s Pugsland Breeder, Our beautiful fawn pug has given birth to 4 healthy Pug puppies.
    She is our beloved family dog and this is her 1st litter.
    Both mum and dad are AKC registered with 5 gen pedigree certificate. Both from Top Champion bloodlines.Mum and Dad can be seen. Puppies have been wormed weeks 2,4,6,8 and will have had a flea preventative treatment before leaving us.
    They will have their vet check, 1st vaccinations and microchip.
    To view all available puppies and recent pictures, Search us in google as LESLIE’S PUGSLAND BREEDER or click on our website link bellow : https://pugslandbreeder.company.com/
    Pug Puppies for sale | pug for sale near me | pug puppy for sale | pug puppy | pug for sale | pug puppies for sale in va | black pug puppies for sale

Leave a Reply