#include <REG51.h>
#define uchar unsigned char
#define uint unsigned int
#define shudu 3
uchar yid,hang;
uint m;
uchar code HZ[];
uchar BUFF[10];
void shangyi(void);
void tiaozhen(void);
void zuoyi(void);
sbit T_IO=P3^0;
sbit ACC_7=ACC^7;
sbit T_CLK=P3^1;
/********************************************/
/*******************************************************/
void main(void)
{
uchar i;
m=0;
while(1)
{
while(yid<16) //数据移位。
{ for(i=0;i<shudu;i++) //速度调整
{
for(hang=0;hang<16;hang++)
{
tiaozhen();
zuoyi();
P1=0x10|hang; //1.4,,1.5//0001,0000//
P1=0x20|hang; //0010,0000
}
}
yid++;
}
yid=0;
m=m+32;
if(m>564) //字数调整
m=0;
}
}
void tiaozhen(void)
{
uchar s;
for(s=0;s<5;s++)
{
BUFF[2*s]=HZ[m+32*s+hang*2];
BUFF[2*s+1]=HZ[m+32*s+hang*2+1];
}
}
void write(uchar ucDa)
{
uchar i;
ACC = ucDa;
for(i=8; i>0; i--)
{
T_IO = ACC_7;
T_CLK =0;
T_CLK =1;
ACC = ACC <<1;
}
}
void zuoyi(void)
{
uchar q,inc,tempyid,temp;
if(yid<8) //移动步数
inc=0;
else
inc=1;
if(yid<8)
tempyid=yid;
else
tempyid=yid-8;
for(q=0+inc;q<8+inc;q++)
{
temp=(BUFF[q]<<tempyid)|(BUFF[q+1]>>(8-tempyid));//调整要显示的字节
//SBUF=temp;
// while(!TI);TI=0;//从低到高发送
write(temp) ;//从高到低发送
}
}
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,
/*-- 文字: 电 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,
0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,0x01,0x02,0x01,0x02,0x00,0xFE,0x00,0x00,
/*-- 文字: 子 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0x00,0x3F,0xF0,0x00,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x01,0x00,0x01,0x04,
0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,
/*-- 文字: 爱 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0xF8,0x3F,0x90,0x12,0x10,0x09,0x20,0x3F,0xFE,0x22,0x02,0x42,0x00,0x3F,0xFC,
0x04,0x00,0x07,0xF0,0x0C,0x20,0x0B,0x40,0x10,0xC0,0x63,0x30,0x8C,0x0E,0x30,0x04,
/*-- 文字: 好 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x10,0x00,0x11,0xFC,0x10,0x08,0x10,0x10,0xFC,0x20,0x24,0x20,0x24,0x20,0x27,0xFE,
0x44,0x20,0x64,0x20,0x18,0x20,0x08,0x20,0x14,0x20,0x26,0x20,0x44,0xA0,0x80,0x40,
/*-- 文字: 者 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x01,0x00,0x01,0x08,0x3F,0xEC,0x01,0x10,0x01,0x20,0x7F,0xFE,0x00,0x80,0x03,0x00,
0x07,0xF8,0x1C,0x08,0xE4,0x08,0x07,0xF8,0x04,0x08,0x04,0x08,0x07,0xF8,0x04,0x08,
/*-- 文字: ! --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
/*-- 文字: 四 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0x00,0x7F,0xFC,0x44,0x84,0x44,0x84,0x44,0x84,0x44,0x84,0x44,0x84,0x44,0x84,
0x48,0x84,0x48,0x7C,0x50,0x04,0x60,0x04,0x40,0x04,0x7F,0xFC,0x40,0x04,0x00,0x00,
/*-- 文字: 字 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x02,0x00,0x01,0x00,0x3F,0xFC,0x20,0x04,0x40,0x08,0x1F,0xE0,0x00,0x40,0x00,0x80,
0x01,0x00,0x7F,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,
/*-- 文字: 点 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x01,0x00,0x01,0x00,0x01,0xF8,0x01,0x00,0x01,0x10,0x1F,0xF8,0x10,0x10,0x10,0x10,
0x10,0x10,0x1F,0xF0,0x10,0x10,0x01,0x10,0x28,0x88,0x24,0x44,0x44,0x44,0x00,0x00,
/*-- 文字: 阵 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0x80,0xF8,0x80,0x88,0x80,0x97,0xFC,0xA1,0x00,0x91,0x40,0x8A,0x40,0x8F,0xFC,
0x88,0x40,0xA8,0x40,0x97,0xFE,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x40,
/*-- 文字: 屏 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x3F,0xFC,0x20,0x04,0x20,0x04,0x3F,0xFC,0x24,0x10,0x22,0x20,0x2F,0xFC,0x22,0x20,
0x22,0x20,0x3F,0xFE,0x22,0x20,0x22,0x20,0x44,0x20,0x44,0x20,0x88,0x20,0x10,0x20,
/*-- 文字: 左 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x02,0x00,0x03,0x00,0x02,0x00,0xFF,0xFE,0x02,0x00,0x02,0x00,0x04,0x00,0x04,0x00,
0x0F,0xF8,0x08,0x80,0x10,0x80,0x10,0x80,0x20,0x80,0x40,0x80,0xBF,0xFE,0x00,0x00,
/*-- 文字: 移 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x0C,0x40,0x70,0x7C,0x10,0x84,0x15,0x08,0xFE,0x50,0x30,0x20,0x30,0xD0,0x5B,0x20,
0x54,0x7E,0x90,0x84,0x11,0x88,0x12,0x50,0x10,0x20,0x10,0x40,0x11,0x80,0x16,0x00,
/*-- 文字: 程 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x0D,0xF8,0x71,0x08,0x11,0x08,0x11,0x08,0xFD,0x08,0x11,0xF8,0x30,0x00,0x3B,0xFC,
0x54,0x40,0x50,0x40,0x93,0xFC,0x10,0x40,0x10,0x40,0x10,0x40,0x17,0xFE,0x10,0x00,
/*-- 文字: 序 --*/
/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/
0x01,0x00,0x00,0x80,0x3F,0xFE,0x20,0x00,0x27,0xF8,0x21,0x10,0x20,0xA0,0x20,0x40,
0x2F,0xFE,0x20,0x44,0x20,0x40,0x20,0x40,0x20,0x40,0x40,0x40,0x41,0x40,0x80,0x80,
/******************************************************************************/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
- 1
- 2
- 3
- 4
前往页