project 1 : Arduino 8×8 LED Matrix

Arduino 8×8 LED Matrix

In this project, we will learn about LED Matrix Displays and two different projects on Arduino 8×8 LED Matrix Interface. The first project will be a simple interface between Arduino and 8X8 LED Matrix to display information (even scrolling information and images can be displayed) and the second project will be an advanced project where the 8×8 LED Matrix is controlled through an Android device.


Simple Arduino LED Matrix Interface




Components Required

  • Arduino Uno board  [Buy Here]
  • LED Matrix – 8 x 8 LED dot matrix
  • IC1  – MAX 7219
  • R1 – 10 KΩ
  • C1 – 0.1 µF
  • C2 – 10 µF

Working

The aim of the project is to interface an Arduino Uno board with an 8 x 8 LED matrix to display information.
Even though a single 8 x 8 LED matrix with corresponding MAX 7219 IC is used in this project, multiple LED matrices can be connected in series for long scrolling display. Connect the components as shown in the circuit diagram. The working of the system is as follows.
3 of the 14 available digital input / output pins are used to control the display driver IC MAX 7219. The 3 pins on the MAX7219 IC are clock, data in and load (or cs in case of MAX 7221 IC). A maximum clock frequency of 10MHz can be applied. DIN (Data in) accepts the serial data from the microcontroller or Arduino board.
It is 16 bit long where the first 8 bits (D0 – D7) are for driving the columns (SEG A-G and DP of the MAX 7219 IC) of the LED matrix and the next 8 bits (D8 – D15) are for driving the (DIG 0-7 of the MAX 7219 IC) rows of the LED matrix.
The load pin (or CS or chip select pin in case of Max 7221 IC) latches the serial input data on its rising edge.
Another important pin on MAX 7219 is the ISET, which sets the peak current to the segment to drive all the LEDs. It is connected via a resistor (R1), which is called RSET. The capacitors filters out any noise in the supply.
When the serial data in is sent using the Arduino (through the program), the serial data is converted into segments and digits to drive columns and rows of the LED matrix. According to the data sent, the corresponding LEDs on the matrix light up and display the message.
The program written here is for scrolling text display. It might be difficult to view long scrolling data on a single 8 x 8 LED matrix. Hence, multiple LED matrices can be chained to form a long matrix.
The no. of MAX 7219 ICs are equal to the no. of 8 x 8 LED matrices. In order to extend the display to multiple LED matrices, the Data OUT (DOUT) pin of the first MAX 7219 must be connected to the Data IN (DIN) pin of the second MAX 7219 IC. This process must be continued for multiple LED matrices.
(The positioning of the LED Matrix in the chain is important. The first LED matrix must be placed at the right of the chain.)

Code


#include <LedControl.h>


int DIN = 13;

int CS = 12;

int CLK = 11;



byte E[8] = {0x3C,0x20,0x20,0x3C,0x20,0x20,0x20,0x3C};

byte L[8] = {0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3E};

byte C[8] = {0x1C,0x20,0x20,0x20,0x20,0x20,0x20,0x1C};

byte T[8] = {0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x10};

byte R[8] = {0x38,0x24,0x24,0x28,0x30,0x28,0x24,0x24};

byte O[8] = {0x1C,0x22,0x22,0x22,0x22,0x22,0x22,0x1C};

byte N[8] = {0x42,0x62,0x52,0x52,0x4A,0x46,0x46,0x42};

byte I[8] = {0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x38};

byte S[8] = {0x1C,0x20,0x20,0x10,0x08,0x04,0x04,0x38};

byte H[8] = {0x22,0x22,0x22,0x3E,0x22,0x22,0x22,0x22};

byte U[8] = {0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x1C,};

byte B[8] = {0x38,0x24,0x24,0x38,0x38,0x24,0x24,0x38};

byte smile[8]= {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C};

byte neutral[8]= {0x3C,0x42,0xA5,0x81,0xBD,0x81,0x42,0x3C};

byte frown[8]= {0x3C,0x42,0xA5,0x81,0x99,0xA5,0x42,0x3C};


LedControl lc=LedControl(DIN,CLK,CS,1);


void setup(){

lc.shutdown(0,false);

lc.setIntensity(0,5);

lc.clearDisplay(0);

}


void loop()

{

printByte(smile);

delay(1000);


printByte(neutral);

delay(1000);


printByte(frown);

delay(1000);


printByte(E);

delay(1000);


printByte(L);

delay(1000);


printByte(E);

delay(1000);


printByte(C);

delay(1000);


printByte(T);

delay(1000);


printByte(R);

delay(1000);


printByte(O);

delay(1000);


printByte(N);

delay(1000);


printByte(I);

delay(1000);


printByte(C);

delay(1000);


printByte(S);

delay(1000);


lc.clearDisplay(0);

delay(1000);


printByte(H);

delay(1000);


printByte(U);

delay(1000);


printByte(B);

delay(1000);



lc.clearDisplay(0);

delay(1000);

}



void printByte(byte character [])

{

int i = 0;

for(i=0;i<8;i++)

{

lc.setRow(0,i,character[i]);

}

}

You may like these posts

Commentaires

  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>
Tinggalkan komentar sesuai topik tulisan, komentar dengan link aktif tidak akan ditampilkan.
Admin dan penulis blog mempunyai hak untuk menampilkan, menghapus, menandai spam, pada komentar yang dikirim
Affordability

Affordability

Design must reflect the practical and aesthetic in business but above all... good design must primarily serve people. Build beautiful websites in mere minutes.

Basic

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$5 Per User Per Month

Enterprise

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$10 Per User Per Month
advertise

Business

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$19.99 Per User Per Month

Retina Ready

Build trust with prospective clients, delight existing customers, and increase the efficiency

Welcome to

Best website for Blog App. Business. Digital. Marketing. Service.

Even in the most uncertain times, Help Scout keeps you connected with customers.

Frequently asked questions

01. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
02. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
03. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
04. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
05. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
06. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
07. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
08. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?

We tried to make

Integrations

Create stunning, effective sales documents with custom-designed theme & template.

Marketing

Create stunning, effective sales documents with custom-designed theme & template.

Dedicated Support

Create stunning, effective sales documents with custom-designed theme & template.

Best Features

Our features will help
to improve busines

Sales teams use PandaDoc to improve deal workflow, insights, and speed while delivering an amazing buying experience. Get your documents out the door fast to keep deals.

Rechercher dans ce blog

advertise
advertise
advertise

Built in Browsers

Build trust with prospective clients, delight existing customers, and increase the efficiency

Extreme Security

Build trust with prospective clients, delight existing customers, and increase the efficiency

Clean Design

Build trust with prospective clients, delight existing customers, and increase the efficiency

Easy Customize

Build trust with prospective clients, delight existing customers, and increase the efficiency

Awesome Design

Build trust with prospective clients, delight existing customers, and increase the efficiency