资源描述:
《16x16led点阵滚动汉字显示设计》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、下面给大家介绍下我制作的16*16led点阵设计,希望与各位电子爱好者共同讨论,共同进步。下图是电路图连接图下面是74HC1544线-16线译码器引脚说明,以及地址/全能输入对应的输出表。滚动显示C程序如下。#include#include#defineucharunsignedchar#defineuintunsignedintcharcodeYD[]={0x01,0x00,0x01,0x00,0x7F,0xFC,0x03,0x80,0x05,0x40,0x09,0x30,0x31
2、,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,/
3、*"能"*/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,0
4、x01,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,0
5、x08,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,0x9
6、0,0x1F,0x90,0x10,0x90,0x00,0x50,0x00,0x20,/*"哥"*/};voiddelay(uintz){uintx,y;for(x=z;x>0;x--)for(y=110;y>0;y--);}main(){inti,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
7、(k>112)k=0;}}有什么问题可能联系版主,关注微博即可联系。本人新浪微博地址:http://t.sina.com.cn/1858560312