完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
帮忙看下怎么修改啊 ,我修改了一点,但是添加的屏还是显示不出字,而且仿真图上出现完郭雪培会出现一段乱码再循环,我也不明白为什么??
#include #define uchar unsigned char #define uint unsigned int #define SPEED 1 //移动数度快慢值 uchar col,disrow; uint word; uchar code HZ[]; uchar BUFF[12]; //buff[]为要显示的数字*2+2 void loadoneline(void); void sendoneline(void); /*******根据列指针,由双字节合并为单字节的子程序模块************/ uchar two_onebyte(uchar h1,uchar h2) { uchar temp,tempcol; if(col<8) tempcol=col; else tempcol=col-8; temp=(h1< temp=255-temp; return temp; } /****************************主函数***************************/ void main(void) { uchar i; col=0;word=0; while(1) { while(col<16)// 循环16次,点亮并移动一个汉字 { for(i=0;i { for(disrow=0;disrow<16;disrow++)//扫描16行 { loadoneline();//装载一线点阵数据 sendoneline();//发送一线点阵数据 P1_4=1; //消影。 E接在P2_4 ,=1; P1=0x10+disrow;// 点亮屏幕 P1=0x20+disrow; } } col++; //列指针递增 } col=0;word=word+32;// 一个汉字移动后,指向下一个汉字 if(word>=175)word=0;// 移动50个汉字后,重新开始 } } /**************装载一线点阵数据****************/ void loadoneline(void) { uchar s; for(s=0;s<6;s++) //s为要显示的数字+1 { BUFF[2*s]=HZ[word+32*s+2*disrow]; BUFF[2*s+1]=HZ[word+1+32*s+2*disrow]; } } /***************发送一线点阵数据*******************/ void sendoneline(void) { char s;uchar inc; if(col<8)inc=0;else inc=1; for(s=11+inc;s>=0+inc;s--) //s*2为要显示的数字+1 { SBUF=two_onebyte(BUFF while(!ti);TI=0; } } /***********************汉字点阵码*************************/ uchar code HZ[]= { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //============================================================================= //************************************************************************** 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /****************************************************************************/ 0x10,0x00,0x08,0x7C,0xFF,0x44,0x00,0x48,0x7E,0x48,0x42,0x50,0x7E,0x48,0x00,0x48, 0x7E,0x44,0x04,0x44,0x08,0x44,0x0F,0x68,0xF8,0x50,0x08,0x40,0x28,0x40,0x10,0x40,/*"郭",0*/ 0x3F,0xF8,0x01,0x00,0x7F,0xFE,0x41,0x02,0x9D,0x74,0x01,0x00,0x1D,0x70,0x00,0x00, 0x3F,0xF8,0x00,0x08,0x00,0x08,0x1F,0xF8,0x00,0x08,0x00,0x08,0x3F,0xF8,0x00,0x08,/*"雪",1*/ 0x10,0x40,0x10,0x20,0x11,0xFC,0x10,0x00,0x11,0x08,0xFC,0x90,0x10,0x00,0x13,0xFE, 0x10,0x00,0x10,0x00,0x11,0xFC,0x1D,0x04,0xE1,0x04,0x41,0x04,0x01,0xFC,0x01,0x04,/*"培",2*/ 0x04,0x40,0x0E,0x50,0x78,0x48,0x08,0x48,0x08,0x40,0xFF,0xFE,0x08,0x40,0x08,0x44, //============================================================================ };
|
|
相关推荐
1个回答
|
|
找你更换的屏幕的手册
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
嵌入式学习-搭建自己的ubuntu系统之ubuntu网络设置
371 浏览 0 评论
龙芯中科胡伟武:3B6600 八核桌面 CPU 性能将达到英特尔中高端酷睿 12~13 代水平
501 浏览 0 评论
树莓派Pico 2发布,搭载RP2350双核RISC-V和Arm Cortex-M33微控制器!
477 浏览 0 评论
嵌入式学习-搭建自己的ubuntu系统之VMware Tools安装
408 浏览 0 评论
嵌入式学习-搭建自己的ubuntu系统之ubuntu系统安装
658 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
10679 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-15 15:26 , Processed in 0.834663 second(s), Total 75, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191