这篇文章仅作为我微机大作业的一个记录
大作业的题目是点阵广告牌的设计
要求如下
首先找到了Proteus 8 Professional制作16x16点阵屏详细教程,在一个一个点复制黏贴的艰苦工作后,发现报错引脚不符,前功尽弃。
发现这篇文章显示可以通过8x8点阵连接获得,看起来十分简便。
keil安装见微信公众号:strongerhuang
用的是proteus 8.6(现在改为7.5)和keil联调
先是查看样板作业,发现只有dsn文件,原因是他的proteus版本比较低,通过这个方法可以打开。
联调的教程参考【零基础】入门51单片机图文教程(Proteus+Keil)
运行成功
写给大忙人看的Keil和Proteus联调使用方法也写的很详细
源代码如下,一个汉字竟然用这么多十六进制字符表示,
0x08,0x00, 0x1f,0xe0, 0x20,0x20, 0x7f,0xf8, 0xa1,0x08, 0x3f,0xf8, 0x21,0x08, 0x3f,0xf8,
0x00,0x00, 0xff,0xfe, 0x00,0x00, 0x1f,0xf0, 0x10,0x10, 0x1f,0xf0, 0x10,0x10, 0x1f,0xf0,//鲁
0x00,0x00,
0x00,0x00, 0x7f,0xfc, 0x40,0x04, 0x40,0x04, 0x5f,0xf4, 0x41,0x04, 0x41,0x04, 0x4f,0xe4,
0x41,0x04, 0x41,0x44, 0x41,0x24, 0x5f,0xf4, 0x40,0x04, 0x40,0x04, 0x7f,0xfc, 0x00,0x00,//国
0x00,0x00,
0x22,0x08, 0x21,0x08, 0x39,0x10, 0x40,0x20, 0x43,0xf8, 0x7a,0x08, 0xa2,0x08, 0x22,0x08,
0xfb,0xf8, 0x20,0xa0, 0x20,0xa0, 0x29,0x20, 0x31,0x24, 0x22,0x24, 0x04,0x1c, 0x08,0x00,//锐
0x00,0x00,
0x00,0x00, 0x7f,0xE0, 0x00,0x20, 0x00,0x20, 0x10,0x20, 0x10,0x20, 0x10,0x20, 0x1f,0xfc,
0x00,0x04, 0x00,0x04, 0x00,0x04, 0xff,0xe4, 0x00,0x04, 0x00,0x04, 0x00,0x14, 0x00,0x08,//马
0x00,0x00,
0x10,0x20, 0x10,0x20, 0x10,0xfc, 0x2e,0x24, 0x23,0xfe, 0x62,0x24, 0x64,0xfc, 0xa4,0x20,
0x2e,0xfc, 0x22,0x20, 0x22,0x20, 0x2b,0xfe, 0x24,0x20, 0x26,0x20, 0x29,0xfe, 0x30,0x00,//健
0x00,0x00,
0x01,0x00, 0x00,0x80, 0x3f,0xfe, 0x20,0x80, 0x2f,0xf8, 0x20,0x88, 0x3f,0xfe, 0x20,0x88,
0x2f,0xf8, 0x28,0x80, 0x24,0xc4, 0x22,0xa8, 0x44,0x90, 0x48,0x88, 0x92,0x86, 0x01,0x00,//康
0x00,0x00,
0x10,0x50, 0x10,0x48, 0x3c,0x40, 0x20,0x5c, 0x41,0xe0, 0xbc,0x40, 0x10,0x5e, 0x11,0xe0,
0xfc,0x44, 0x10,0x48, 0x10,0x30, 0x10,0x22, 0x14,0x52, 0x18,0x8a, 0x13,0x06, 0x00,0x02,//钱
0x00,0x00,
0x00,0x00, 0x7f,0xfe, 0x40,0x02, 0x82,0x04, 0x02,0x00, 0x3f,0xf8, 0x04,0x00, 0x09,0x00,
0x11,0x00, 0x3f,0xf8, 0x01,0x00, 0x01,0x00, 0xff,0xfe, 0x01,0x00, 0x01,0x00, 0x01,0x00,//军
0x00,0x00,
首先试了GBK汉字的十六进制转换,生成的很短,编译不成功
受到了单片机8*8LED点阵—显示汉字实验启发,终于做出来,注意两个字之间有0x00,0x00,但是还是太短
发现需要字模,PCtoLCD2002完美版
使用方法请见PCtoLCD2002(字模软件) 最新版 附使用指南
最后我的魔改结果为
0x00,0x00,0x1F,0x11,0x11,0x11,0x11,0xFF,0x11,0x11,0x11,0x11,0x1F,0x00,0x00,0x00,
0x00,0x00,0xF8,0x10,0x10,0x10,0x10,0xFE,0x11,0x11,0x11,0x11,0xF9,0x01,0x0F,0x00,/*"电",0*/
0x00,0x00,
0x24,0x24,0x25,0x7F,0xC5,0x44,0x00,0x44,0x33,0x00,0x00,0xFF,0x00,0x00,0x00,0x00
{0x10,0x60,0x80,0xFF,0x00,0x80,0x20,0x20,0x20,0x20,0x20,0xFF,0x40,0x40,0x40,0x00,/*"科",1*/
0x00,0x00,
0x08,0x30,0x24,0x24,0x24,0x24,0xA4,0x60,0x20,0x20,0x2F,0x24,0x24,0x28,0x30,0x00,
0x00,0x81,0x86,0xF8,0x80,0xFE,0x81,0x01,0x85,0xA9,0x91,0xA9,0xC1,0x0F,0x00,0x00,/*"寇",2*/
0x00,0x00,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"一",3*/
0x00,0x00,
0x04,0x08,0x32,0xE2,0x32,0x2A,0x22,0x2B,0x14,0xE4,0x24,0x34,0x28,0x20,0x20,0x00,
0x41,0x41,0x42,0x42,0x44,0x48,0x50,0xE0,0x50,0x48,0x44,0x42,0x42,0x41,0x41,0x00,/*"笑",4*/
0x00,0x00,
显示出来什么鬼畜玩意儿!
最后选择了
0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,
0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x0A,0x01,0x02,0x01,0x02,0x00,0xFE,//电
0x00,0x00,
0x00,0x00,0x7F,0xF8,0x00,0x10,0x00,0x20,0x00,0x40,0x01,0x80,0x01,0x00,0xFF,0xFE,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,//子
0x00,0x00,
0x01,0x00,0x01,0x00,0x7F,0xFC,0x01,0x00,0x1F,0xF0,0x00,0x00,0x7F,0xFE,0x40,0x02,
0x9F,0xF4,0x00,0x00,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x08,0x20,0x04,0x40,0xFF,0xFE,//壹
0x00,0x00,
0x20,0x80,0x10,0x80,0x00,0x9C,0x47,0xE0,0x20,0x80,0x08,0x84,0x10,0x84,0x60,0x7C,
0x21,0x00,0x01,0x00,0xFF,0xFE,0x05,0x40,0x09,0x20,0x31,0x18,0xC1,0x06,0x01,0x00,//柒
0x00,0x00,
0x01,0x00,0x00,0x80,0x3F,0xFE,0x20,0x80,0x2F,0xF8,0x20,0x88,0x3F,0xFE,0x20,0x88,
0x2F,0xF8,0x28,0x80,0x24,0xC4,0x22,0xA8,0x44,0x90,0x48,0x88,0x92,0x86,0x01,0x00,//康
0x00,0x00,
样板成果参考了51单片机 16X16点阵循环滚动显示汉字(基于proteus)
第一种是拉出引线直接设置标号Proteus简化连线方法
第二种是进入终端模式,选择defalut,使用terminal label
样板成果使用了第二种,优点是美观
``
发现除了一开始打开他的项目可以运行,重新编译hex文件,始终无法复现他的项目,74hc595始终有输出为灰色,导致点阵也都为灰色,其他正常,参考了Proteus 中单片机引脚信号为灰色的问题解决-上拉电阻
看到这个Proteus8以上的版本打开文件都无法正确仿真会不会是版本问题,下载一个8以下的版本
下载地址Proteus7.5下载安装破解教程 | 百度网盘没有成功,可能是没有事先remove导致冲突,后来就安不上了
后来按照Proteus7.8 汉化破解版,已经remove,同样的问题。
可能是注册表没有删干净,换一台电脑验证一下自己的想法。
成功,至此基础功能实现
先参考一下如何使用51单片机自制音乐盒
用这个播放音乐
单片机音乐盒proteus仿真和源码 内附三首小音乐
贪吃蛇游戏proteus仿真(有源码)