完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
下面是一个静态现实的,,如何改为左移?附有图片#include
#include #define uint unsigned int #define uchar unsigned char ***it SH_CP = P3^0; ***it DS = P3^1; ***it ST_CP = P3^2; uchar temp; uchar code hang[]={ /*-- 好 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x10,0x00,0x10,0xFC,0x10,0x04,0x10,0x08,0xFC,0x10,0x24,0x20,0x24,0x20,0x25,0xFE, 0x24,0x20,0x48,0x20,0x28,0x20,0x10,0x20,0x28,0x20,0x44,0x20,0x84,0xA0,0x00,0x40, /*-- 好--*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x10,0x00,0x10,0xFC,0x10,0x04,0x10,0x08,0xFC,0x10,0x24,0x20,0x24,0x20,0x25,0xFE, 0x24,0x20,0x48,0x20,0x28,0x20,0x10,0x20,0x28,0x20,0x44,0x20,0x84,0xA0,0x00,0x40, /*-- 学 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x22,0x08,0x11,0x08,0x11,0x10,0x00,0x20,0x7F,0xFE,0x40,0x02,0x80,0x04,0x1F,0xE0, 0x00,0x40,0x01,0x80,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00, /*-- 习 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x00,0x00,0x7F,0xF8,0x00,0x08,0x00,0x08,0x08,0x08,0x04,0x08,0x02,0x08,0x02,0x08, 0x00,0x68,0x01,0x88,0x0E,0x08,0x70,0x08,0x20,0x08,0x00,0x08,0x00,0x50,0x00,0x20, /*-- 天 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x00,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x01,0x00, 0x02,0x80,0x02,0x80,0x04,0x40,0x04,0x40,0x08,0x20,0x10,0x10,0x20,0x08,0xC0,0x06, /*-- 天 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x00,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x01,0x00, 0x02,0x80,0x02,0x80,0x04,0x40,0x04,0x40,0x08,0x20,0x10,0x10,0x20,0x08,0xC0,0x06, /*-- 向 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x02,0x00,0x04,0x00,0x08,0x00,0x7F,0xFC,0x40,0x04,0x40,0x04,0x47,0xC4,0x44,0x44, 0x44,0x44,0x44,0x44,0x44,0x44,0x47,0xC4,0x44,0x44,0x40,0x04,0x40,0x14,0x40,0x08, /*-- 上 --*/ /*-- Trebuchet MS12; ??????????:?x?=16x16 --*/ 0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x03,0xF8,0x02,0x00, 0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0xFF,0xFE,0x00,0x00, }; void delay(uint z) { uint x,y; for(x=z;x>0;x--) for(y=110;y>0;y--); } void In_595() { uchar i; for(i=0;i<8;i++) { temp <<= 1; DS = CY; SH_CP = 1; _nop_(); _nop_(); SH_CP = 0; } } void out_595() { ST_CP = 0; _nop_(); ST_CP = 1; _nop_(); ST_CP = 0; } void out_5951() { ST_CP = 0; _nop_(); ST_CP = 0; _nop_(); ST_CP = 0; } void main() { uint i; while(1) { for(i=0;i<16;i++) { P2 = (P2+1)%16; temp = hang[i*2]; In_595(); temp = hang[i*2+1]; In_595(); out_595(); delay(1); } } }
|
|
相关推荐
7个回答
|
|
如果能有个显示缓冲区就好了,直接用算法移位
|
|
|
|
动态扫描,算法位移。。
|
|
|
|
|
|
|
|
|
|
|
|
位选++就好了。。
|
|
|
|
具体程序
|
|
|
|
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
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积木平台
11797 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 18:13 , Processed in 0.991880 second(s), Total 55, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号