欢迎来到人人文库网! | 帮助中心 人人文库renrendoc.com美如初恋!
人人文库网
首页 人人文库网 > 资源分类 > DOC文档下载

基于单片机的LED单色显示屏控制系统设计 源程序.doc

  • 资源大小:58.50KB        全文页数:6页
  • 资源格式: DOC        下载权限:游客/注册会员/VIP会员    下载费用:9
游客快捷下载 游客一键下载
会员登录下载
下载资源需要9

邮箱/手机号:
您支付成功后,系统会自动为您创建此邮箱/手机号的账号,密码跟您输入的邮箱/手机号一致,以方便您下次登录下载和查看订单。注:支付完成后需要自己下载文件,并不会自动发送文件哦!

支付方式: 微信支付    支付宝   
验证码:   换一换

友情提示
2、本站资源不支持迅雷下载,请使用浏览器直接下载(不支持QQ浏览器)
3、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰   

基于单片机的LED单色显示屏控制系统设计 源程序.doc

附录2整个设计全部源程序/以下是32X64点阵LED电子显示屏的源程序,采用C语言编写,在KEILΜVISIONV238A(C51EXEV706)以及MEDWIN30版环境下均测试通过。/INCLUDEAT89X51HUNSIGNEDINTZIMO,XX0;//ZIMO是字模计数器,XX为分屏显示的时候的字数。UNSIGNEDCHARYID,H;//YID为移动计数器,H为行段计数器UNSIGNEDCHARCODEHANZI;//汉字字模UNSIGNEDCHARBUFF18,BUFF218;//左移显示的缓存VOIDQINGVOID;VOIDXIANSHIVOID;VOIDFENVOID;VOIDZUOVOID;VOIDIN_DATAVOID;//调整数据VOIDRXD_DATAVOID;//左移发送数据VOIDOUT_RXDUNSIGNEDCHARD;//分屏、上移发送数据CHARCODESW{0X01,0X02,0X03,0X04,0X05,0X06,0X07,0X00};/8行段码//主程序/VOIDMAINVOID{UNSIGNEDCHAREE;SCON0;P10;YID0;ZIMO0;WHILE1{FEN;//分屏显示FOREE30;EE0;EE//清屏幕3秒{QING;}ZUO;//左移显示FOREE30;EE0;EE{QING;}}}/清屏幕/VOIDQINGVOID{UNSIGNEDCHARZZ,XX0X0FF;FORZZ33;ZZ0;ZZ{OUT_RXDXX;}P10XFF;P10;//锁存为高,74HC595锁存信号P20;//清74LS138的使能端}/分屏显示/VOIDFENVOID{DO{XIANSHI;}WHILEXX5;//调用单屏显示XX0;}/单屏显示/VOIDXIANSHIVOID{UNSIGNEDCHARII,JJ;UNSIGNEDINTKK,AA;FORKK500;KK0;KK//每屏显示500次{FORII1;II16;II2//每个汉字分8行扫描{FORJJ0;JJ8;JJ//每次要发送8个汉字的2个字节,发送8次{AAXX8JJ32II;OUT_RXDHANZIAA;//从串口输出第1个字的第1字节。OUT_RXDHANZIAA1;//从串口输出第1个字的第1字节。}FORJJ0;JJ8;JJ//每次要发送8个汉字的2个字节,发送8次{AAXX8JJ32II;OUT_RXDHANZIAA16;//从串口输出第1个字的第17字节。OUT_RXDHANZIAA15;//从串口输出第1个字的第18字节}P20X0FF;P10XFF;P10;//锁存为高,74HC595锁存信号P2SWH;//输出行信号H;//行加一IFH8H0;}}}/左移显示/VOIDZUOVOID{UNSIGNEDCHARI,D5;//D为移动的时候一个汉字的扫描显示次数XIANSHI;//调用单屏显示WHILEZIMO1450{WHILEYID16//数据移位。{FORI0;ID;I//移动速度{FORH0;H8;H//8行扫描{IN_DATA;//调整数据RXD_DATA;//串口发送数据P2SWH;//送段码P10XFF;//锁存为高,595锁存信号P10;}}YID;//移动一步}YID0;ZIMOZIMO32;//后移一个字,}ZIMO0;}/分屏显示的数据发送/VOIDOUT_RXDUNSIGNEDCHARD/从串口发送数据/{SBUFD;WHILETI;//等待发送完毕TI0;}/左移显示读取数据并调整/VOIDIN_DATAVOID{CHARS,W;UNSIGNEDINTQQQ;FORS8;S0;S{WSS;QQQZIMOHHS32;BUFFW1HANZIQQQ;BUFFWHANZIQQQ1;BUFF2W1HANZIQQQ16;BUFF2WHANZIQQQ17;}}/左移显示的数据调整发送/VOIDRXD_DATAVOID//串行发送数据{UNSIGNEDCHARINC,S,TEMPYID,TEMP;IFYID8INC0;ELSEINC1;FORS0INC;S16INC;S//发送数据{IFYID8TEMPYIDYID;ELSETEMPYIDYID8;TEMPBUFFSTEMPYID|BUFFS18TEMPYID;SBUFTEMP;//把BUFF中的字节从大到小移位相或后发送输出。WHILETI;TI0;//等待发送中断}FORS0INC;S16INC;S//发送8字节数据{IFYID8TEMPYIDYID;ELSETEMPYIDYID8;TEMPBUFF2STEMPYID|BUFF2S18TEMPYID;SBUFTEMP;//把BUFF中的字节从大到小移位相或后发送输出。WHILETI;TI0;//等待发送中断}}/汉字编码信息/UNSIGNEDCHARCODEHANZI{/文字勤/0XFB,0XBB,0XFA,0X00,0XFB,0XBB,0XFB,0X83,0XC0,0XEF,0XDB,0X01,0XDB,0X6D,0XDB,0X01,0XDB,0XEF,0XDB,0X01,0XDB,0XEF,0XDB,0X83,0XDD,0XEF,0XDD,0X0F,0XD6,0XE0,0XEF,0X7D,/文字奋/0XFF,0X7F,0XFF,0X7F,0XFF,0X7F,0X80,0X00,0XFE,0XBF,0XFD,0XDF,0XF3,0XEF,0X8F,0XF3,0XD0,0X04,0XF7,0X77,0XF7,0X77,0XF0,0X07,0XF7,0X77,0XF7,0X77,0XF0,0X07,0XF7,0XF7,/文字求/0XFB,0X7F,0XF7,0X7F,0XF7,0X7F,0XC0,0X01,0XFF,0X7F,0XEF,0X7B,0XF7,0X77,0XFA,0X6F,0XFD,0X7F,0XFB,0X5F,0XF7,0X6F,0X8F,0X77,0XDF,0X79,0XFF,0X7F,0XFF,0X5F,0XFF,0XBF,/文字实/0XFF,0X7F,0XFE,0XFF,0X80,0X01,0XDF,0XFD,0XEE,0XEE,0XFE,0XDF,0XFE,0XDF,0XFE,0XF7,0XFE,0XEF,0XFE,0XEF,0XC0,0X01,0XFD,0X7F,0XFB,0XBF,0XF7,0XDF,0XCF,0XE7,0XDF,0XF9,/文字献/0XF7,0XEF,0XF7,0XEF,0XE7,0XEF,0XD6,0X00,0XD7,0XEF,0XF7,0XEF,0X81,0X01,0XF7,0X55,0XF7,0X6D,0XF7,0X01,0XEB,0X6D,0XEB,0X01,0XEB,0X6D,0XDD,0X6D,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F,0XFD,0XF7,0XC0,0X17,0XFF,0XFB,0XF7,0XD3,0XE7,0XB5,0XF7,0XB5,0XF7,0X76,0XFB,0X77,0XFB,0X77,0XFB,0XF7,0XFD,0XF7,0X80,0X07,0XFF,0XF7,0XFF,0XFF,/文字老/0XFF,0XBF,0XEF,0XBF,0XC0,0X01,0XEF,0XBF,0XF7,0XBF,0XFB,0XBF,0X80,0X00,0XFE,0X7F,0XFF,0XBF,0XF3,0XCF,0XFC,0XD3,0XFF,0X1C,0XDF,0XDF,0XDF,0XDF,0XC0,0X3F,0XFF,0XFF,/文字师/0XFF,0XEF,0X80,0X2F,0XFB,0XED,0XFB,0XED,0X80,0X2D,0XBB,0XAD,0XBB,0XAD,0XBB,0XAD,0XBB,0XAD,0XBB,0XB5,0XAB,0XB5,0XDB,0XB7,0XFB,0XFB,0XFB,0XFD,0XFB,0XFE,0XFB,0XFF,/文字/0XFE,0X3F,0XFC,0X1F,0XFC,0X1F,0XFC,0X1F,0XFC,0X1F,0XFC,0X1F,0XFC,0X1F,0XFE,0X3F,0XFE,0X3F,0XFF,0X7F,0XFF,0XFF,0XFF,0X7F,0XFE,0X3F,0XFE,0X3F,0XFF,0X7F,0XFF,0XFF};

注意事项

本文(基于单片机的LED单色显示屏控制系统设计 源程序.doc)为本站会员(21ask)主动上传,人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知人人文库网(发送邮件至[email protected]或直接QQ联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。

关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服客服 - 联系我们

网站客服QQ:2846424093    人人文库上传用户QQ群:460291265   

[email protected] 2016-2018  renrendoc.com 网站版权所有   南天在线技术支持

经营许可证编号:苏ICP备12009002号-5