玩轉(zhuǎn)LED點(diǎn)陣之三:16X64單紅點(diǎn)陣上移
void UP_MOVE()
{
int sp;
for(move=0;move<16*(hang-1);move++)
{
for(sp=0;sp
for(disrow=0;disrow<16;disrow++)
{
Load_one_line_up();//裝載數(shù)據(jù)
Send_one_line_up();//發(fā)送數(shù)據(jù)
OE=1;
STB=0;
STB=1;//輸出鎖存
P0=disrow;//8位行選
OE=0;
}
}
}
}
//主函數(shù)入口
void main(void)
{
R1=0;//數(shù)據(jù)初始化
R2=0;
G1=0;
G2=0;
while(1)
{
// LEFT_MOVE(); //左移
UP_MOVE(); //上移
}
}
zimo.h
unsigned char code Table[][32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空白
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*************下面修改需要顯示的點(diǎn)陣字體**********************/
0x08,0x00,
0xC8,0x7F,
0x48,0x00,
0x7F,0x00,
0x48,0x3F,
0x68,0x00,
0xD8,0x7F,
0x48,0x03,
0x4C,0x25,
0x4B,0x65,
0x48,0x19,
0x48,0x11,
0x28,0x11,
0x28,0x65,
0x1A,0x23,
0x04,0x01,/*"振",0*/
0x08,0x00,
0xC8,0x7F,
0x48,0x00,
0x7F,0x00,
0x48,0x3F,
0x68,0x00,
0xD8,0x7F,
0x48,0x03,
0x4C,0x25,
0x4B,0x65,
0x48,0x19,
0x48,0x11,
0x28,0x11,
0x28,0x65,
0x1A,0x23,
0x04,0x01,/*"振",0*/
0xFC,0x1F,
0x00,0x0C,
0x60,0x03,
0x80,0x00,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0x84,0x10,
0x84,0x14,
0x04,0x08,/*"甬",1*/
0x00,0x0C,
0x60,0x03,
0x80,0x00,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0x84,0x10,
0x84,0x14,
0x04,0x08,/*"甬",1*/
0x80,0x00,
0x80,0x00,
0x80,0x00,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x80,0x40,
0x80,0x40,
0x00,0x7F,
0x00,0x00,/*"電",2*/
0x80,0x00,
0x80,0x00,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x80,0x40,
0x80,0x40,
0x00,0x7F,
0x00,0x00,/*"電",2*/
0x00,0x00,
0xFC,0x0F,
0x00,0x04,
0x00,0x02,
0x00,0x01,
0x80,0x00,
0x80,0x00,
0x80,0x20,
0xFF,0x7F,
0x80,0x00,
0x80,0x00,
0x80,0x00,
0x80,0x00,
0x80,0x00,
0xA0,0x00,
0x40,0x00,/*"子",3*/
0xFC,0x0F,
0x00,0x04,
0x00,0x02,
0x00,0x01,
0x80,0x00,
0x80,0x00,
0x80,0x20,
0xFF,0x7F,
0x80,0x00,
0x80,0x00,
0x80,0x00,
0x80,0x00,
0x80,0x00,
0xA0,0x00,
0x40,0x00,/*"子",3*/
0x00,0x01,
0x00,0x01,
0x3F,0x01,
0xA0,0x7F,
0xA1,0x20,
0x52,0x12,
0x14,0x02,
0x08,0x02,
0x18,0x02,
0x18,0x06,
0x24,0x05,
0x24,0x09,
0x82,0x18,
0x61,0x70,
0x1C,0x20,
0x00,0x00,/*"歡",4*/
0x00,0x01,
0x3F,0x01,
0xA0,0x7F,
0xA1,0x20,
0x52,0x12,
0x14,0x02,
0x08,0x02,
0x18,0x02,
0x18,0x06,
0x24,0x05,
0x24,0x09,
0x82,0x18,
0x61,0x70,
0x1C,0x20,
0x00,0x00,/*"歡",4*/
0x02,0x00,
0x84,0x01,
0x6C,0x3E,
0x24,0x22,
0x20,0x22,
0x20,0x22,
0x27,0x22,
0x24,0x22,
0xA4,0x22,
0x64,0x2A,
0x24,0x12,
0x04,0x02,
0x04,0x02,
0x0A,0x00,
0xF1,0x7F,
0x00,0x00,/*"迎",5*/
0x84,0x01,
0x6C,0x3E,
0x24,0x22,
0x20,0x22,
0x20,0x22,
0x27,0x22,
0x24,0x22,
0xA4,0x22,
0x64,0x2A,
0x24,0x12,
0x04,0x02,
0x04,0x02,
0x0A,0x00,
0xF1,0x7F,
0x00,0x00,/*"迎",5*/
0x90,0x00,
0x90,0x01,
0x88,0x20,
0xC8,0x7F,
0x44,0x20,
0x2C,0x12,
0x16,0x02,
0x45,0x0A,
0xC4,0x12,
0x44,0x12,
0x24,0x22,
0x24,0x62,
0x14,0x22,
0x84,0x02,
0x04,0x01,
0x00,0x00,/*"你",6*/
/*************上面修改需要顯示的點(diǎn)陣字體**********************/
0x90,0x01,
0x88,0x20,
0xC8,0x7F,
0x44,0x20,
0x2C,0x12,
0x16,0x02,
0x45,0x0A,
0xC4,0x12,
0x44,0x12,
0x24,0x22,
0x24,0x62,
0x14,0x22,
0x84,0x02,
0x04,0x01,
0x00,0x00,/*"你",6*/
/*************上面修改需要顯示的點(diǎn)陣字體**********************/
/*********為了消除BUB,多加32個(gè)空字符***************/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空白
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/**************************************************/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //空白
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
unsigned char code Table2[][32]=
{
/*******不同行的第一個(gè)漢字***********/
0x08,0x00,
0xC8,0x7F,
0x48,0x00,
0x7F,0x00,
0x48,0x3F,
0x68,0x00,
0xD8,0x7F,
0x48,0x03,
0x4C,0x25,
0x4B,0x65,
0x48,0x19,
0x48,0x11,
0x28,0x11,
0x28,0x65,
0x1A,0x23,
0x04,0x01,/*"振",0*/
0x08,0x00,
0xC8,0x7F,
0x48,0x00,
0x7F,0x00,
0x48,0x3F,
0x68,0x00,
0xD8,0x7F,
0x48,0x03,
0x4C,0x25,
0x4B,0x65,
0x48,0x19,
0x48,0x11,
0x28,0x11,
0x28,0x65,
0x1A,0x23,
0x04,0x01,/*"振",0*/
0x00,0x01,
0x00,0x01,
0x3F,0x01,
0xA0,0x7F,
0xA1,0x20,
0x52,0x12,
0x14,0x02,
0x08,0x02,
0x18,0x02,
0x18,0x06,
0x24,0x05,
0x24,0x09,
0x82,0x18,
0x61,0x70,
0x1C,0x20,
0x00,0x00,/*"歡",4*/
0x00,0x01,
0x3F,0x01,
0xA0,0x7F,
0xA1,0x20,
0x52,0x12,
0x14,0x02,
0x08,0x02,
0x18,0x02,
0x18,0x06,
0x24,0x05,
0x24,0x09,
0x82,0x18,
0x61,0x70,
0x1C,0x20,
0x00,0x00,/*"歡",4*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*******不同行的第二個(gè)漢字***********/
0xFC,0x1F,
0x00,0x0C,
0x60,0x03,
0x80,0x00,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0x84,0x10,
0x84,0x14,
0x04,0x08,/*"甬",1*/
0xFC,0x1F,
0x00,0x0C,
0x60,0x03,
0x80,0x00,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0xFC,0x1F,
0x84,0x10,
0x84,0x10,
0x84,0x10,
0x84,0x14,
0x04,0x08,/*"甬",1*/
0x02,0x00,
0x84,0x01,
0x6C,0x3E,
0x24,0x22,
0x20,0x22,
0x20,0x22,
0x27,0x22,
0x24,0x22,
0xA4,0x22,
0x64,0x2A,
0x24,0x12,
0x04,0x02,
0x04,0x02,
0x0A,0x00,
0xF1,0x7F,
0x00,0x00,/*"迎",5*/
0x84,0x01,
0x6C,0x3E,
0x24,0x22,
0x20,0x22,
0x20,0x22,
0x27,0x22,
0x24,0x22,
0xA4,0x22,
0x64,0x2A,
0x24,0x12,
0x04,0x02,
0x04,0x02,
0x0A,0x00,
0xF1,0x7F,
0x00,0x00,/*"迎",5*/
評(píng)論