完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
据网上介绍可以在发送数据后先关掉行驱动,等数据锁存后再开行驱动,我试了一下,但是必须加延时,加了延时拖尾没有了,但是字体移动时,字体上半部分比下半部分要先移动,不加延时的话,又不能消隐,气死我了。我用的是74hc138两片做行驱动,595列驱动。
程序如下: #include #define uint unsigned int #define uchar unsigned char ***it DS = P3^1; ***it RCK = P3^2; ***it SCK = P3^3; ***it AOE = P1^0; ***it BOE = P1^1; uchar code wenzi[] = { |
|
相关推荐
7个回答
|
|
你的时序还是不对!要等到上下的数据都锁存后才开行驱动的。
|
|
|
|
能否帮我修改一下,我用的是行列式(顺向<--)扫描字模
|
|
|
|
|
|
|
|
|
|
|
|
|
|
请大侠看一下程序:
#include #define uint unsigned int #define uchar unsigned char ***it DS = P3^1; ***it RCK = P3^2; ***it SCK = P3^3; ***it INH = P3^0; ***it OE = P2^0; uchar code wenzi[] = { 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, 0x04,0x10,0x24,0x08,0x44,0x06,0x84,0x01, 0x64,0x82,0x9C,0x4C,0x40,0x20,0x30,0x18, 0x0F,0x06,0xC8,0x01,0x08,0x06,0x08,0x18, 0x28,0x20,0x18,0x40,0x00,0x80,0x00,0x00,/*"欢",0*/ 0x40,0x00,0x40,0x40,0x42,0x20,0xCC,0x1F, 0x00,0x20,0x00,0x40,0xFC,0x4F,0x04,0x44, 0x02,0x42,0x00,0x40,0xFC,0x7F,0x04,0x42, 0x04,0x44,0xFC,0x43,0x00,0x40,0x00,0x00,/*"迎",1*/ 0x40,0x80,0x40,0x80,0x42,0x40,0x44,0x20, 0x58,0x18,0xC0,0x07,0x40,0x00,0x7F,0x00, 0x40,0x00,0xC0,0x3F,0x50,0x40,0x48,0x40, 0x46,0x40,0x40,0x40,0x40,0x78,0x00,0x00,/*"光",2*/ 0x00,0x00,0xF8,0x1F,0x00,0x00,0x00,0x00, 0xFF,0xFF,0x40,0x00,0x20,0x00,0x18,0x7F, 0x0F,0x21,0x18,0x21,0x68,0x3F,0x08,0x21, 0x08,0x21,0x08,0x7F,0x08,0x00,0x00,0x00,/*"临",3*/ 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 }; void delay(uint time) { uchar i; for(i=0;i } void hc595_senddat(unsigned char dat) { unsigned char i; dat=~dat; for(i=0;i<8;i++) { DS=dat&0x80; SCK=1; SCK=0; dat<<=1; } } void main() { unsigned char i,n; unsigned int k,m; char j; m=sizeof(wenzi); SCK=0; RCK=0; OE = 1; INH=0; while(1) { for(k=0;k for(n=0;n<2;n++) { for(i=0;i<16;i++) { //delay(190); for(j=3;j>=0;j--) { hc595_senddat(wenzi[(32*j+2*i+k)%m]); hc595_senddat(wenzi[(32*j+2*i+1+k)%m]); } OE=1; P1=i; RCK=0; RCK=1; delay(15); OE=0; RCK=0; //INH=0; delay(40); } } } } } |
|
|
|
不错,很好的经验分享,辛苦麻烦了,欠缺这方面的资料,非常感谢。
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
690 浏览 0 评论
735 浏览 1 评论
基于瑞萨FPB-RA4E2智能床头灯项目——1编译环境搭建与点亮驱动ws2812全彩LED
624 浏览 0 评论
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-LCD显示图片编程示例之介绍mmap
1099 浏览 0 评论
《DNESP32S3使用指南-IDF版_V1.6》第二章 常用的C语言知识点
1092 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
11794 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 11:42 , Processed in 0.607658 second(s), Total 55, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号