0% found this document useful (0 votes)
150 views12 pages

8X8 Dot Matrix Experiment Material: Product Description

This document provides information about using an 8x8 dot matrix display with an Arduino. It includes: - An overview of the materials needed including an Arduino Uno board, breadboard, jumper wires, 8x8 dot matrix display, and resistors. - Descriptions of how the dot matrix display works by turning on individual LEDs arranged in rows and columns. - Examples of using code to light up individual LEDs on the display and scan through columns to display the letter "A". - A code sample that defines the pixel patterns for letters A through I and includes functions to dynamically scan columns and display characters on the 8x8 matrix.

Uploaded by

Adam Mikitzel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views12 pages

8X8 Dot Matrix Experiment Material: Product Description

This document provides information about using an 8x8 dot matrix display with an Arduino. It includes: - An overview of the materials needed including an Arduino Uno board, breadboard, jumper wires, 8x8 dot matrix display, and resistors. - Descriptions of how the dot matrix display works by turning on individual LEDs arranged in rows and columns. - Examples of using code to light up individual LEDs on the display and scan through columns to display the letter "A". - A code sample that defines the pixel patterns for letters A through I and includes functions to dynamically scan columns and display characters on the 8x8 matrix.

Uploaded by

Adam Mikitzel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

8X8 Dot Matrix Experiment

Overview
This lesson will use 8X8 dot matrix to display letters.

Material
Arduino Uno board x 1
Breadboard x 1
Jumper wires
8x8 dot matrix x 1
Resistor (220R) x 8
USB cable x 1

Product description:

Dot matrix display are often could be seen in everyday life, street billboards, airport flight
information boards, etc.,
The 8X8 dot matrix consists of 64 LEDs arranged in 8 rows of 8 columns with a wire
running down each column and across each row.
When an LED’s column wire is set to positive and the row wire is set to 0 the LED will turn
on.
Technical Parameters
Product Name : LED Lattice Tube Matrix Module
Model : 1588BS
LED Display : Red
Dot Diameter(Each) : 4mm
Dot Numbers : 8*8;Pin Numbers : 16 Pins
Type : CommonAnode
Total Size : 38 x 38x 12mm/ 1.5" x 1.5" x 0.47" (L*W*H)
Material : Plastic,Material
Color : Black, White
Weight : 53g;

8*8 dot matrix symbolic diagram


8*8 dot matrix physical map

The symbolic diagram shows the displays equivalent circuit. Provided the correct
voltage is applied across the LED it will turn on. For instance to turn on the upper left corner
the X0 should be 0 Volts and Y0 should be 5 Volts

8*8 dot matrix scanning modes


To display characters on the 8x8 display there are two ways of doing this.
Firstly you can turn on every LED individually in a sequence. If this is done quickly
enough the eye will not notice and it will appear as a stable image.

Secondly you can do a whole column in one go.

In order to achieve 16 or more refreshes a second (so that the eye doesn’t detect any
flickering) for the first method you need to run at 16 * 64 = 1024 Hz.
That is, you need to update the control wires 1024 times per second.
For the second method, where we are doing a whole column in one go, we only need to
update at 16 * 8 or 128 Hz. This method also has the advantage that any LED that is on, is
on for 1/8th of the time as opposed to 1/64th in the first method, and therefore appears brighter.
Example of 8*8 dot matrix usage
To generate the following on the display we break it down into columns and express as
ones and zeros (starting at the top).

We get the following set of numbers.

00000000,00111110,01000001,01000001,01000001, 00111110,
00000000,00000000.

These patterns of ones and zeros are called binary. A more usual and compact way of
writing these is in hexadecimal (or base 16). To do this we break these numbers into two sets
of 4 and apply the following rules to both sets.
0000->0 0001->1 0010->2 0011->3 0100->4 0101->5
0110->6 0111->7 1000->8 1001->9 1010->A 1011->B
1100->C 1101->D 1110->E 1111->F.

For the above pattern, that gives us 00h, 3Eh, 41h, 41h, 41h, 3Eh, 00h, 00h.
(hexadecimal numbers are usually written 3Eh or 0x3E to show they are hexadecimal). By
sending these codes in rapid sequence to the columns of the display (and by setting one of the
rows low) for each one, we can generate the symbol.
Connection diagram

Example code

Lighting one LED on the grid is as follows:


//the pin to control ROW
const int row1 = 2; // the number of the row pin 9
const int row2 = 3; // the number of the row pin 14
const int row3 = 4; // the number of the row pin 8
const int row4 = 5; // the number of the row pin 12
const int row5 = 17; // the number of the row pin 1
const int row6 = 16; // the number of the row pin 7
const int row7 = 15; // the number of the row pin 2
const int row8 = 14; // the number of the row pin 5
//the pin to control COl
const int col1 = 6; // the number of the col pin 13
const int col2 = 7; // the number of the col pin 3
const int col3 = 8; // the number of the col pin 4
const int col4 = 9; // the number of the col pin 10
const int col5 = 10; // the number of the col pin 6
const int col6 = 11; // the number of the col pin 11
const int col7 = 12; // the number of the col pin 15
const int col8 = 13; // the number of the col pin 16
void setup(){
int i = 0 ;
for(i=2;i<18;i++)
{
pinMode(i, OUTPUT);
}
pinMode(row5, OUTPUT);
pinMode(row6, OUTPUT);
pinMode(row7, OUTPUT);
pinMode(row8, OUTPUT);
for(i=2;i<18;i++) {
digitalWrite(i, LOW);
}
digitalWrite(row5, LOW);
digitalWrite(row6, LOW);
digitalWrite(row7, LOW);
digitalWrite(row8, LOW);
}
void loop(){
int i;
//the row # 1 and col # 1 of the LEDs turn on
digitalWrite(row1, HIGH);
digitalWrite(row2, LOW);
digitalWrite(row3, LOW);
digitalWrite(row4, LOW);
digitalWrite(row5, LOW);
digitalWrite(row6, LOW);
digitalWrite(row7, LOW);
digitalWrite(row8, LOW);
digitalWrite(col1, LOW);
digitalWrite(col2, HIGH);
digitalWrite(col3, HIGH);
digitalWrite(col4, HIGH);
digitalWrite(col5, HIGH);
digitalWrite(col6, HIGH);
digitalWrite(col7, HIGH);
digitalWrite(col8, HIGH);
delay(1000);
//turn off all
for(i=2;i<18;i++) {
digitalWrite(i, LOW);
}
delay(1000);
}

The next code displays the letter A using dynamic scanning.


#define display_array_size 8
// ascii 8x8 dot font
#define data_null 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // null char
#define data_ascii_A 0x02,0x0C,0x18,0x68,0x68,0x18,0x0C,0x02 /*"A",0*/
/**
**"A"
#define A { //
{0, 0, 0, 0, 0, 0, 1, 0}, //0x02
{0, 0, 0, 0, 1, 1, 0, 0}, //0x0C
{0, 0, 0, 1, 1, 0, 0, 0}, //0x18
{0, 1, 1, 0, 1, 0, 0, 0}, //0x68
{0, 1, 1, 0, 1, 0, 0, 0}, //0x68
{0, 0, 0, 1, 1, 0, 0, 0}, //0x18
{0, 0, 0, 0, 1, 1, 0, 0}, //0x0C
{0, 0, 0, 0, 0, 0, 1, 0} //0x02
}
**/
#define data_ascii_B 0x00,0x7E,0x52,0x52,0x52,0x52,0x2C,0x00 /*"B",1*/
#define data_ascii_C 0x00,0x3C,0x66,0x42,0x42,0x42,0x2C,0x00 /*"C",2*/
#define data_ascii_D 0x00,0x7E,0x42,0x42,0x42,0x66,0x3C,0x00 /*"D",3*/
#define data_ascii_E 0x00,0x7E,0x52,0x52,0x52,0x52,0x52,0x42 /*"E",4*/
#define data_ascii_F 0x00,0x7E,0x50,0x50,0x50,0x50,0x50,0x40 /*"F",5*/
#define data_ascii_G 0x00,0x3C,0x66,0x42,0x42,0x52,0x16,0x1E /*"G",6*/
#define data_ascii_H 0x00,0x7E,0x10,0x10,0x10,0x10,0x7E,0x00 /*"H",7*/
#define data_ascii_I 0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00 /*"I",8*/
// display array
byte data_ascii[][display_array_size] = {
data_null,
data_ascii_A, data_ascii_B,
data_ascii_C,
data_ascii_D,
data_ascii_E,
data_ascii_F,
data_ascii_G,
data_ascii_H,
data_ascii_I,
};
//the pin to control ROW
const int row1 = 2; // the number of the row pin 24
const int row2 = 3; // the number of the row pin 23
const int row3 = 4; // the number of the row pin 22
const int row4 = 5; // the number of the row pin 21
const int row5 = 17; // the number of the row pin 4
const int row6 = 16; // the number of the row pin 3
const int row7 = 15; // the number of the row pin 2
const int row8 = 14; // the number of the row pin 1
//the pin to control COl
const int col1 = 6; // the number of the col pin 20
const int col2 = 7; // the number of the col pin 19
const int col3 = 8; // the number of the col pin 18
const int col4 = 9; // the number of the col pin 17
const int col5 = 10; // the number of the col pin 16
const int col6 = 11; // the number of the col pin 15
const int col7 = 12; // the number of the col pin 14
const int col8 = 13; // the number of the col pin 13

void displayNum(byte rowNum,int colNum)


{
int j;
byte temp = rowNum;
for(j=2;j<6;j++)
{
digitalWrite(j, LOW);
}
digitalWrite(row5, LOW);
digitalWrite(row6, LOW);
digitalWrite(row7, LOW);
digitalWrite(row8, LOW);
for(j=6;j<14;j++)
{
digitalWrite(j, HIGH); }
switch(colNum)
{
case 1: digitalWrite(col1, LOW); break;
case 2: digitalWrite(col2, LOW); break;
case 3: digitalWrite(col3, LOW); break;
case 4: digitalWrite(col4, LOW); break;
case 5: digitalWrite(col5, LOW); break;
case 6: digitalWrite(col6, LOW); break;
case 7: digitalWrite(col7, LOW); break;
case 8: digitalWrite(col8, LOW); break;
default: break;
}
for(j = 1 ;j < 9; j++)
{
temp = (0x80)&(temp) ;
if(temp==0)
{
temp = rowNum<<j;
continue;
}
switch(j)
{
case 1: digitalWrite(row1, HIGH); break;
case 2: digitalWrite(row2, HIGH); break;
case 3: digitalWrite(row3, HIGH); break;
case 4: digitalWrite(row4, HIGH); break;
case 5: digitalWrite(row5, HIGH); break;
case 6: digitalWrite(row6, HIGH); break;
case 7: digitalWrite(row7, HIGH); break;
case 8: digitalWrite(row8, HIGH); break;
default: break;
}
temp = rowNum<<j;
}
}

void setup(){
int i = 0 ;
for(i=2;i<18;i++)
{
pinMode(i, OUTPUT);
}

for(i=2;i<18;i++) {
digitalWrite(i, LOW);
}
}
void loop(){
int t1;
int l;
int arrage;
for(arrage=0;arrage<10;arrage++)
{
for(l=0;l<512;l++)
{
for(t1=0;t1<8;t1++)
{
displayNum(data_ascii[arrage][t1],(t1+1));
}
}
}
}
Results

The results of the first set of code.

The results of the second set of code.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy