led点阵滚动汉字显示设计

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

下面给大家介绍下我制作的16*16led点阵设计,希望与各位电子爱好者共同讨论,共同进步。

下图是电路图连接图

下面是74HC1544线-16线译码器引脚说明,以及地址/全能输入对应的输出表。

滚动显示C程序如下。

#include <>

#include <>

#define uchar unsigned char

#define uint unsigned int

char code YD[]={

0x01,0x00,0x01,0x00,0x7F,0xFC,0x03,0x80,

0x05,0x40,0x09,0x30,0x31,0x0E,0xDF,0xE4,

0x00,0x80,0x01,0x00,0x7F,0xFE,0x01,0x00,

0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,/*"李"*/

0x20,0x40,0x30,0x40,0x24,0x4C,0x42,0x70,

0xFF,0x44,0x42,0x46,0x00,0x7C,0x7E,0x00,

0x42,0x40,0x7E,0x4C,0x42,0x70,0x7E,0x40,

0x42,0x44,0x42,0x46,0x4A,0x3C,0x44,0x00,/*"能"*/

0x00,0x00,0x0F,0xF0,0x08,0x10,0x0F,0xF0,

0x08,0x10,0x0F,0xF0,0x00,0x00,0xFF,0xFE,

0x01,0x00,0x09,0x00,0x09,0xF8,0x09,0x00,

0x15,0x00,0x23,0x00,0x40,0xFE,0x00,0x00,/*"是"*/

0x01,0x00,0x01,0x00,0x02,0x80,0x02,0x40,

0x04,0x20,0x09,0x18,0x11,0x0E,0x61,0x04,

0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,

0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,/*"个"*/

0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,

0x01,0x00,0xFF,0xFE,0x01,0x00,0x02,0x80,

0x02,0x80,0x02,0x40,0x04,0x40,0x04,0x20,

0x08,0x10,0x10,0x18,0x20,0x0E,0x40,0x04,/*"大"*/

0x08,0x20,0x08,0x20,0x08,0x20,0x4B,0xFE,

0x4A,0x22,0x4A,0x22,0x4A,0x22,0x4A,0x22,

0x4A,0x22,0x4A,0x22,0x4A,0x22,0x12,0x2E,

0x12,0x24,0x20,0x20,0x40,0x20,0x80,0x20,/*"帅"*/

0x00,0x00,0x7F,0xFC,0x00,0x10,0x1F,0x90,

0x10,0x90,0x1F,0x90,0x10,0x90,0x00,0x04,

0xFF,0xFE,0x00,0x10,0x1F,0x90,0x10,0x90,

0x1F,0x90,0x10,0x90,0x00,0x50,0x00,0x20,/*"哥"*/

};

void delay(uint z)

{

uint x,y;

for(x=z;x>0;x--)

for(y=110;y>0;y--);

}

main()

{

int i,t,k=0;

while(1)

{

for(t=0;t<5;t++)//t的值越小,滚动的速度就越快

{

for(i=0;i<16;i++)

{

P1=i;

P0=~YD[2*i+2*k];

P2=~YD[2*i+1+2*k];

delay(2);

}

P0=0xff;

P2=0xff;

}

k=k+1;

if(k>112) k=0;

}

}

有什么问题可能联系版主,关注微博即可联系。本人新浪微博地址:

相关文档
最新文档