LED点阵显示
来源:百度知道 编辑:UC知道 时间:2024/05/05 10:18:38
我想自己编个8*8LED矩阵动态显示的程序,要求P2,P0口输出数据!可是我老是想不出来,帮忙写一个!
#include<reg52.h>
unsigned char j,n,m,k;
int sec;
void delay(unsigned int t)
{
unsigned char i;
while(t--)for(i=122;i>0;i--);
}
unsigned char code tab[8]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
unsigned char code tab1[]={
0x00,0x00,0x00,0x00,0x00,
0x3E,0x51,0x49,0x45,0x3E, // -0-
0x00,0x42,0x7F,0x40,0x00, // -1-
0x62,0x51,0x49,0x49,0x46, // -2-
0x21,0x41,0x49,0x4D,0x33, // -3-
0x18,0x14,0x12,0x7F,0x10, // -4-
0x27,0x45,0x45,0x45,0x39, // -5-
0x3C,0x4A,0x49,0x49,0x31, // -6-
0x01,0x71,0x09,0x05,0x03, // -7-
0x36,0x49,0x49,0x49,0x36, // -8-
0x46,0x49,0x49,0x29,0x1E, // -9-<