1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| #include <reg51.h>
unsigned char code LED_Alphabets[130]={
0x7e, 0X09, 0X09, 0X09, 0x7e, // A
0x7f, 0X49, 0X49, 0X49, 0X36, // B
0x3e, 0X41, 0X41, 0X41, 0X22,
0x7f, 0X41, 0X41,0X22, 0x1c,
0x7f, 0X49, 0X49, 0X49, 0X63,
0x7f, 0X09, 0X09, 0X09, 0X01,
0x3e, 0X41, 0X41, 0X49, 0x7a,
0x7f, 0X08, 0X08, 0X08, 0x7f,
0X00, 0X41, 0x7f, 0X41, 0X00, // I
0X20, 0X40, 0X41, 0x3f, 0X01,
0X7f, 0X08, 0X14, 0X22, 0X41,
0x7f, 0X40, 0X40, 0X40, 0X60,
0x7f, 0X02, 0X04, 0X02, 0x7f,
0x7f, 0X04, 0X08, 0X10, 0x7f,
0x3e, 0X41, 0X41, 0X41, 0x3e,
0x7f, 0X09, 0X09, 0X09, 0X06,
0x3e, 0X41, 0X51, 0X21, 0x5e,
0x7f, 0X09, 0X19, 0X29, 0X46,
0X46, 0X49, 0X49, 0X49, 0X31, // S
0X01, 0X01, 0x7f, 0X01, 0X01,
0x3f, 0X40, 0X40, 0X40, 0x3f,
0x1f, 0X20, 0X40, 0X20, 0x1f,
0x3f, 0X40, 0X30, 0X40, 0x3f,
0X63, 0X14, 0X08, 0X14, 0X63,
0X07, 0X08, 070, 0X08, 0X07,
0X61, 0X51, 0X49, 0X45, 0X43 // Z
};
unsigned int LED;
int i;
void main()
{
P2=0;
P0=0;
for(;;)
{
//P0=~LED_Alphabets[LED];
P2=~LED_Alphabets[LED];
for(i=0;i<2500;i++)
{
for(i=0;i<30000;i++);
}
LED++;
if(LED==25)
LED=0;
}
} |