A - Z on 8x8 Dot Matrix Display Displays

  • img
Project Details

The dot matrix that we’re going to use in this guide is a 8×8 matrix which means that it has 8 columns and 8 rows, so it contains a total of 64 LEDs.

The MAX7219 chip makes it easier to control the dot matrix, by just using 3 digital pins of the CloudX board.

I think the best option is to buy the dot matrix with the MAX7219 chip as a module, it will simplify the wiring. You can check the Hub360 store  and find the best price.

You can control more than one matrix at a time. For that you just need to connect them to each other, as they have pins in both sides to extend the dot matrix.

 

Components

  • CloudX

  • 8x8 Dot Matrix

  • Male - Female wires

 

CloudX M633 

 

8x8 Dot Matrix


 

Hardware Connection

CloudX                              MAX7219 Dot Matrix Module  
5V VCC
GND GND
P1 DIN
P2 CS
P3 CLK

 

Programming

Copy and Paste this code into your cloudx project.

This is the simple code to display character A - Z on the dot matrix, This is the first method is written for beginners to understand how easy it is to write on the display.

#include <CloudX\DotMatrix_MAX7219.h>
#include <CloudX\M633.h>

setup(){
           //setup here MAX7219_setting(1, 3, 2, 8, 14);   //DIN, CLK, CS, colSize, brightness //brightness (0 -> Dim : 15 -> Brightest)

loop(){
           //Program here
           MAX7219_write('A', 150);  //string, stayDuration
           MAX7219_write('B', 150);  //string, stayDuration
           MAX7219_write('C', 150);  //string, stayDuration
           MAX7219_write('D', 150);  //string, stayDuration
           MAX7219_write('E', 150);  //string, stayDuration
           MAX7219_write('F', 150);  //string, stayDuration
           MAX7219_write('G', 150);  //string, stayDuration
           MAX7219_write('H', 150);  //string, stayDuration
           MAX7219_write('I', 150);  //string, stayDuration
           MAX7219_write('J', 150);  //string, stayDuration
           MAX7219_write('K', 150);  //string, stayDuration
           MAX7219_write('L', 150);  //string, stayDuration
           MAX7219_write('M', 150);  //string, stayDuration
           MAX7219_write('N', 150);  //string, stayDuration
           MAX7219_write('O', 150);  //string, stayDuration
           MAX7219_write('P', 150);  //string, stayDuration
           MAX7219_write('Q', 150);  //string, stayDuration
           MAX7219_write('R', 150);  //string, stayDuration
           MAX7219_write('S', 150);  //string, stayDuration
           MAX7219_write('T', 150);  //string, stayDuration
           MAX7219_write('U', 150);  //string, stayDuration
           MAX7219_write('V', 150);  //string, stayDuration
           MAX7219_write('W', 150);  //string, stayDuration
           MAX7219_write('X', 150);  //string, stayDuration
           MAX7219_write('Y', 150);  //string, stayDuration
           MAX7219_write('Z', 150);  //string, stayDuration
           

      }
} 

 

This second exam is meant for those who understands C language very well, the two codes performs the same function just that this second one is much more optimised.

#include <CloudX\DotMatrix_MAX7219.h>
#include <CloudX\M633.h>

char i = 0; char data;
setup(){
           //setup here MAX7219_setting(1, 3, 2, 8, 14);   //DIN, CLK, CS, colSize, brightness //brightness (0 -> Dim : 15 -> Brightest)

loop(){
           //Program here
           MAX7219_write('A' + i, 150);  //string, stayDuration
           i++;                              // Incrementing i and adding to 'A'  
           if(i>26) i=0;                     // if Z then restart
      }
} 

 

Video

 

Share this with friends