磁动力电子网-雕刻机DIY论坛,单片机论坛,CNCDIY,DIYCNC

 找回密码
 加入磁动力

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 4281|回复: 6

[原创]16_16点阵左移程序

[复制链接]
发表于 2009-4-10 17:46:00 | 显示全部楼层 |阅读模式
电路图是转载这里的http://www.study-bbs.com/dispbbs.asp?boardID=2&ID=12120
程序是自己写的!

程序如下;
/*单字左移 ---适用ZT09-1型点阵 */
/*=========================
; 周涛 --2009年3月; ;
; QQ;403888086 ;
; 华东交通大学理工学院 ;
;家庭住址:新疆_和硕;
/*=========================*/
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
#define speed=8 //移动的速度 //
uint code text[]={/*-------------------------------*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*---------------華----------------*/
0x21,0x08,0x21,0x28,0x25,0x28,0x25,0x28,0x27,0xE8,0xFD,0x28,0x25,0x28,0x27,0xFF,
0x25,0x28,0xFD,0x28,0x27,0xE8,0x25,0x28,0x25,0x28,0x25,0x28,0x21,0x08,0x00,0x00,

/*---------------東----------------*/
0x20,0x02,0x20,0x02,0x2F,0x84,0x2A,0x84,0x2A,0x88,0x2A,0x90,0x2A,0xA0,0xFF,0xFF,
0x2A,0xC0,0x2A,0xA0,0x2A,0x90,0x2A,0x88,0x2F,0x8C,0x20,0x06,0x20,0x04,0x00,0x00,

/*---------------交----------------*/
0x00,0x00,0x10,0x01,0x11,0x01,0x12,0x02,0x1C,0x82,0x14,0x44,0x90,0x28,0x70,0x18,
0x30,0x30,0x10,0x68,0x19,0xC4,0x14,0x86,0x16,0x03,0x12,0x02,0x10,0x00,0x00,0x00,


/*---------------通----------------*/
0x02,0x02,0x82,0x04,0x63,0xF8,0x00,0x04,0x00,0x02,0x4F,0xFA,0x4A,0x42,0x4A,0x42,
0x6A,0x42,0x5F,0xFA,0x5A,0x52,0x6A,0x4A,0x4F,0xF2,0x00,0x02,0x00,0x02,0x00,0x00,

/*---------------大----------------*/
0x04,0x00,0x04,0x01,0x04,0x02,0x04,0x04,0x04,0x08,0x04,0x30,0x05,0xC0,0xFE,0x00,
0x05,0x80,0x04,0x60,0x04,0x10,0x04,0x0C,0x04,0x06,0x04,0x03,0x04,0x02,0x00,0x00,

/*---------------學----------------*/
0x00,0x40,0x01,0x90,0x7F,0x10,0x55,0x10,0x95,0x50,0x01,0x54,0x55,0x52,0x29,0x51,
0x55,0x5E,0x01,0x70,0x55,0x50,0x55,0x10,0x7F,0x50,0x01,0x90,0x01,0x10,0x00,0x00,


/*---------------理----------------*/
0x22,0x08,0x22,0x08,0x3F,0xF0,0x22,0x10,0x22,0x12,0x00,0x02,0x7F,0xA2,0x49,0x22,
0x49,0x22,0x7F,0xFE,0x49,0x22,0x49,0x22,0x49,0x22,0x7F,0xA2,0x00,0x02,0x00,0x00,

/*---------------工----------------*/
0x00,0x04,0x00,0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x7F,0xFC,
0x40,0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x40,0x04,0x00,0x04,0x00,0x00,

/*---------------學----------------*/
0x00,0x40,0x01,0x90,0x7F,0x10,0x55,0x10,0x95,0x50,0x01,0x54,0x55,0x52,0x29,0x51,
0x55,0x5E,0x01,0x70,0x55,0x50,0x55,0x10,0x7F,0x50,0x01,0x90,0x01,0x10,0x00,0x00,

/*---------------院----------------*/
0x7F,0xFF,0x40,0x00,0x4C,0x40,0x52,0x20,0x61,0xC1,0x30,0x82,0x24,0x8C,0x24,0xF0,
0xA4,0x80,0x64,0x80,0x24,0xFE,0x24,0x81,0x24,0x81,0x30,0x81,0x20,0x8F,0x00,0x00,

/*---------------電----------------*/
0x00,0x00,0x30,0x00,0x20,0x00,0xAA,0xF8,0xAA,0xA8,0xAA,0xA8,0xA0,0xA8,0xFE,0xFE,
0xA0,0xA9,0xAA,0xA9,0xAA,0xA9,0xAA,0xF9,0xA0,0x01,0x30,0x01,0x20,0x0F,0x00,0x00,

/*---------------信----------------*/
0x01,0x00,0x02,0x00,0x0C,0x00,0x3F,0xFE,0xE0,0x00,0x50,0x00,0x15,0x7E,0x15,0x44,
0x95,0x44,0x75,0x44,0x55,0x44,0x15,0x44,0x15,0x7E,0x10,0x00,0x10,0x00,0x00,0x00,

/*---------------分----------------*/
0x01,0x00,0x02,0x01,0x04,0x02,0x19,0x04,0xE1,0x08,0x41,0xF0,0x01,0x00,0x01,0x00,
0xC1,0x04,0x21,0x02,0x19,0xFC,0x0C,0x00,0x06,0x00,0x03,0x00,0x02,0x00,0x00,0x00,

/*---------------院----------------*/
0x7F,0xFF,0x40,0x00,0x4C,0x40,0x52,0x20,0x61,0xC1,0x30,0x82,0x24,0x8C,0x24,0xF0,
0xA4,0x80,0x64,0x80,0x24,0xFE,0x24,0x81,0x24,0x81,0x30,0x81,0x20,0x8F,0x00,0x00,

/*---------------07----------------*/
0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00,
0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,0x00,

/*---------------应----------------*/
0x00,0x02,0x00,0x1C,0x3F,0xE0,0x22,0x04,0x21,0x04,0x20,0xF4,0x28,0x24,0xA4,0x04,
0x63,0xC4,0x21,0x0C,0x20,0x34,0x20,0xC4,0x27,0x04,0x22,0x04,0x00,0x04,0x00,0x00,

/*---------------用----------------*/
0x00,0x01,0x00,0x02,0x00,0x0C,0x7F,0xF0,0x44,0x40,0x44,0x40,0x44,0x40,0x44,0x40,
0x7F,0xFF,0x44,0x40,0x44,0x40,0x44,0x42,0x44,0x41,0x7F,0xFE,0x00,0x00,0x00,0x00,

/*---------------電----------------*/
0x00,0x00,0x30,0x00,0x20,0x00,0xAA,0xF8,0xAA,0xA8,0xAA,0xA8,0xA0,0xA8,0xFE,0xFE,
0xA0,0xA9,0xAA,0xA9,0xAA,0xA9,0xAA,0xF9,0xA0,0x01,0x30,0x01,0x20,0x0F,0x00,0x00,


/*---------------子----------------*/
0x00,0x80,0x00,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,0x82,0x40,0x81,0x47,0xFE,
0x48,0x80,0x50,0x80,0x60,0x80,0x40,0x80,0x00,0x80,0x01,0x80,0x00,0x80,0x00,0x00,

/*---------------技----------------*/
0x10,0x80,0x10,0x82,0x11,0x01,0xFF,0xFE,0x12,0x00,0x14,0x02,0x00,0x02,0x13,0x04,
0x12,0xC8,0x12,0x30,0xFE,0x30,0x12,0x48,0x13,0x84,0x12,0x06,0x10,0x04,0x00,0x00,

/*---------------術----------------*/
0x08,0x80,0x11,0x00,0x22,0x00,0xDF,0xFE,0x48,0x20,0x08,0xC0,0x0B,0x00,0xFF,0xFE,
0x09,0x00,0x28,0x80,0x10,0x40,0x24,0x04,0x24,0x02,0x27,0xFC,0x24,0x00,0x00,0x00,

/*---------------周----------------*/
0x00,0x01,0x00,0x02,0x00,0x0C,0x7F,0xF0,0x40,0x00,0x42,0x00,0x52,0xF8,0x52,0x90,
0x7E,0x90,0x52,0x90,0x52,0xF8,0x42,0x02,0x40,0x01,0x7F,0xFE,0x00,0x00,0x00,0x00,

/*---------------涛----------------*/
0x08,0x20,0x86,0x3F,0x61,0xC0,0x0E,0x04,0x02,0x18,0x2A,0x60,0x2B,0x80,0x2E,0x40,
0xFA,0x50,0x2A,0x4A,0x2A,0x41,0x2B,0xFE,0x2A,0x40,0x2A,0x40,0x02,0x40,0x00,0x00,

/*-------------------------------*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

uchar code a[]={0xff,0xfe,0xfd,0xfc,0xfb,0xfa,0xf9,0xf8,
0xf7,0xf6,0xf5,0xf4,0xf3,0xf2,0xf1,0xf0};/*定义列扫描信号 */
void delay(uint z) /*延时 */
{uint i,j;
for(i=z;i>0;i--)
for(j=50;j>0;j--);
}
void main()
{uint j,m,n;uchar i,s;
while(1)
{for(j=0;j<400;j++) //总共25*16个字型 //
{for(s=0;s<speed;s++) //每个字型停留的时间 //
{for(i=0;i<16;i++) //扫描的次数//
{if(i<j)
{P1=a; //送入列扫描信号 //
P0=text[2*j-2*i-2]; //i<j时的行扫描数据//
m=2*j-2*i-2;
m++;
P2=text[m];
}
else{ P1=a;
P0=text[30+2*j-2*i];//i>=j时的行扫描输出 //
n=30+2*j-2*i;
n++;
P2=text[n];
}

delay(2);
P0=0x00; //清除屏幕防止拖尾 //
P2=0x00;
}

}
}
}
}

 
  

[原创]16_16点阵左移程序

[原创]16_16点阵左移程序

 

[原创]16_16点阵左移程序

[原创]16_16点阵左移程序

[原创]16_16点阵左移程序

[原创]16_16点阵左移程序

回复

使用道具 举报

发表于 2009-4-10 23:53:00 | 显示全部楼层
赞一个!!
回复 支持 反对

使用道具 举报

发表于 2009-6-19 11:07:00 | 显示全部楼层
提示: 该帖被管理员或版主屏蔽
回复 支持 反对

使用道具 举报

发表于 2010-11-8 12:15:00 | 显示全部楼层
顶起来&nbsp; 晚上回家研究
回复 支持 反对

使用道具 举报

发表于 2010-12-29 22:35:00 | 显示全部楼层

MARK

研究研究

学习学习

回复 支持 反对

使用道具 举报

发表于 2012-3-14 21:05:26 | 显示全部楼层
学习,学习!!!!!!!
回复 支持 反对

使用道具 举报

发表于 2013-3-10 22:31:32 | 显示全部楼层
这个程序有点看懂了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入磁动力

本版积分规则

QQ|小黑屋|手机版|Archiver|www.cdle.net 磁动力电子网 2001-2017 ( 粤ICP备10098153号

粤公网安备 44040402000001号

GMT+8, 2019-3-23 20:22

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.