下面是主程序还有一个包含文件完整版本请到 http://www.51hei.com/bbs/dpj-20624-1.html 下载[page]
#include
#include<74HC595.h>
#define uchar unsigned char
#define uint unsigned int
uchar code table_L[]={0xff,0x7f, 0xff,0xbf, 0xff,0xdf, 0xff,0xef, 0xff,0xf7, 0xff,0xfb, 0xff,0xfd, 0xff,0xfe,
0x7f,0xff, 0xbf,0xff, 0xdf,0xff, 0xef,0xff, 0xf7,0xff, 0xfb,0xff, 0xfd,0xff, 0xfe,0xff};
uchar code table_H[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
0x00,0x08,0x40,0x04,0x40,0x02,0xFE,0x7F,0x20,0x01,0x20,0x02,0x00,0x40,0x20,0x49,
0x20,0x49,0xFE,0x3F,0x90,0x24,0x90,0x24,0x90,0x20,0x80,0x20,0x00,0x20,0x00,0x00,/*"桂",0*/
0x00,0x10,0x80,0x0C,0x80,0x02,0xF8,0x3F,0x40,0x01,0x40,0x0A,0x00,0x04,0x40,0x02,
0x40,0x01,0xFC,0x7F,0x20,0x01,0x20,0x02,0x00,0x04,0x00,0x08,0x00,0x08,0x00,0x00,/*"林",1*/
0x00,0x00,0x00,0x00,0xE0,0x01,0x20,0x06,0x20,0x05,0x20,0x05,0xFE,0x3F,0x90,0x42,
0x10,0x42,0x10,0x42,0xF0,0x41,0x00,0x40,0x00,0x40,0x00,0x38,0x00,0x00,0x00,0x00,/*"电",2*/
0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x88,0x00,0x88,0x20,0x88,0x20,0xE4,0x40,
0x94,0x3F,0x4C,0x00,0x44,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,/*"子",3*/
0x00,0x10,0x80,0x08,0x90,0x04,0x90,0x02,0xF0,0x7F,0x48,0x01,0x44,0x01,0x00,0x02,
0x50,0x02,0xA0,0x02,0x00,0x02,0xFE,0xFF,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,/*"科",4*/
0x00,0x04,0x40,0x04,0x40,0x22,0xFE,0x7F,0x20,0x01,0x20,0x20,0x00,0x20,0x20,0x15,
0x20,0x09,0xFE,0x08,0x90,0x16,0x90,0x21,0x00,0x60,0x00,0x40,0x00,0x40,0x00,0x00,/*"技",5*/
0x00,0x00,0x00,0x40,0x80,0x20,0x80,0x10,0x80,0x08,0x80,0x06,0xFE,0x01,0x40,0x02,
0x40,0x04,0x40,0x08,0x40,0x10,0x40,0x20,0x00,0x60,0x00,0x40,0x00,0x40,0x00,0x00,/*"大",6*/
0x00,0x00,0x80,0x09,0xE0,0x08,0x44,0x08,0x48,0x08,0x40,0x09,0xA4,0x48,0xA8,0x86,
0xA0,0x7D,0xB0,0x04,0x2E,0x04,0x20,0x04,0x60,0x04,0x20,0x00,0x00,0x00,0x00,0x00,/*"学",7*/
0x00,0x20,0x40,0x11,0x40,0x0A,0x20,0x04,0xE0,0x0B,0x00,0x40,0x80,0x20,0x70,0x18,
0x4E,0x07,0x20,0x08,0xA0,0x10,0x60,0x20,0x20,0x60,0x00,0x40,0x00,0x40,0x00,0x00,/*"欢",8*/
0x80,0x10,0x80,0x10,0x88,0x12,0x90,0x1D,0x00,0x10,0xF0,0x13,0x10,0x12,0x08,0x11,
0x0C,0x20,0xE0,0x2F,0x10,0x20,0x10,0x61,0xF0,0x61,0x00,0x20,0x00,0x20,0x00,0x00,/*"迎",9*/
0x00,0x00,0x40,0x20,0x20,0x30,0xF0,0x03,0x0C,0x18,0x40,0x20,0xA0,0x41,0x18,0x48,
0x16,0x52,0xF0,0x43,0x08,0x50,0xA8,0x60,0x18,0x45,0x00,0x08,0x00,0x00,0x00,0x00,/*"您",10*/
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x33,0xF8,0x33,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"!",11*/
0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x33,0xF8,0x33,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"!",12*/
0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,/*"-",13*/
0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,/*"-",14*/
0x00,0x00,0x00,0x06,0x80,0x03,0x00,0x00,0x00,0x10,0x00,0x20,0x00,0x40,0xFC,0x3F,
0x00,0x00,0x00,0x00,0x40,0x00,0x80,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,/*"小",15*/
0x00,0x04,0x40,0x02,0x40,0x01,0xFE,0x7F,0x20,0x01,0x20,0x43,0x40,0x21,0xC8,0x1E,
0x78,0x00,0x28,0x00,0x64,0xFE,0xA4,0x00,0x20,0x01,0x00,0x02,0x00,0x02,0x00,0x00,/*"桥",16*/
0x00,0x00,0x40,0x00,0x88,0x30,0x10,0x0E,0x00,0x40,0x20,0x30,0xA0,0x0D,0x60,0x01,
0xA2,0x3E,0x94,0x00,0xD0,0x1E,0x90,0x20,0x10,0x20,0x00,0x20,0x00,0x38,0x00,0x00,/*"流",17*/
0x00,0x10,0x80,0x10,0x80,0x08,0x40,0x04,0x40,0x03,0xC0,0x20,0x00,0x40,0xFC,0x7F,
0x80,0x00,0x40,0x01,0x20,0x02,0x18,0x04,0x00,0x0C,0x00,0x08,0x00,0x08,0x00,0x00,/*"水",18*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
};
uchar L=0,H=0;
uint t=0,x=0;
#define h sizeof(table_H)
void main()
{
// extern uint h;
EA=1;
ET0=1;
TMOD=0x01;
TH0=(65536-1000)/256;
TL0=(65536-1000)%256;
TR0=1;
// h=sizeof(table_H);
while(1)
{
if(L==32)
{
L=0;
H=0;
}
}
}
void T0_time() interrupt 1
{
TH0=(65536-1000)/256;
TL0=(65536-1000)%256;
Input(table_L[L]);
Input(table_L[L+1]);
Input(table_H[H+x]);
Input(table_H[H+x+1]);
Output();
L=L+2;
// if(L==32)L=0;
H=H+2;
// if(H==32)H=0;
t++;
if(t==100)//移动
{
t=0;
x=x+2;
if(x>=h-32)x=0;
}
}
上一篇:传送带物品计数器的设计带仿真
下一篇:51单片机实现贪食蛇的子程序
推荐阅读最新更新时间:2024-03-16 14:05
- 热门资源推荐
- 热门放大器推荐