Documents For 8x8 LED Matrix Display
Diagram
Arduino code
char ground[8] = {A1,A0,13,12,11,10,9,8};
//{8,9,10,11,12,13,A0,A1};
char ALPHA[] = {0,0,0,0,0,0,0,0,0,0,0,
102,102,102,126,102,102,0,//H
30,12,12,12,12,12,30,0,//I
0,0,0,0,0,0,0,0,0,0,0
};
void setup()
{
for (int x=8;x<14;x++)
{
pinMode(x, OUTPUT);
}
pinMode(A0, OUTPUT);
pinMode(A1, OUTPUT);
for (int i=0;i<8;i++)
{
digitalWrite(ground[i],HIGH);
}
DDRD = 0xFF;
PORTD =0;
}
void loop()
{
for(int x=0;x<142;x++)
{
for(int a=0;a<20;a++)
{
for (int i=0;i<8;i++)
{
digitalWrite(ground[i],LOW);
PORTD = ALPHA[i+x];
delay(1);
digitalWrite(ground[i],HIGH);
}
}
}
delay(10);
}
A To Z
char ALPHA[] = {
// Binary representations for A to Z
// A
24, 60, 102, 126, 102, 102, 102, 0,
// B
124, 102, 102, 124, 102, 102, 124, 0,
// C
60, 102, 96, 96, 96, 102, 60, 0,
// D
120, 108, 102, 102, 102, 108, 120, 0,
// E
126, 96, 96, 124, 96, 96, 126, 0,
// F
126, 96, 96, 124, 96, 96, 96, 0,
// G
60, 102, 96, 110, 102, 102, 60, 0,
// H
102, 102, 102, 126, 102, 102, 102, 0,
// I
30, 12, 12, 12, 12, 12, 30, 0,
// J
30, 12, 12, 12, 12, 108, 56, 0,
// K
102, 108, 120, 112, 120, 108, 102, 0,
// L
96, 96, 96, 96, 96, 96, 126, 0,
// M
99, 119, 127, 107, 99, 99, 99, 0,
// N
102, 102, 110, 126, 118, 102, 102, 0,
// O
60, 102, 102, 102, 102, 102, 60, 0,
// P
124, 102, 102, 124, 96, 96, 96, 0,
// Q
60, 102, 102, 102, 110, 108, 62, 0,
// R
124, 102, 102, 124, 120, 108, 102, 0,
// S
60, 102, 96, 60, 6, 102, 60, 0,
// T
126, 24, 24, 24, 24, 24, 24, 0,
// U
102, 102, 102, 102, 102, 102, 60, 0,
// V
102, 102, 102, 102, 102, 60, 24, 0,
// W
99, 99, 99, 107, 127, 119, 99, 0,
// X
99, 99, 54, 28, 54, 99, 99, 0,
// Y
102, 102, 102, 60, 24, 24, 24, 0,
// Z
126, 6, 12, 24, 48, 96, 126, 0
};
Comments
Post a Comment