#include<intrins.h>
#define uchar unsigned char
sbit cs=P2^5;
sbit sid=P2^6;
sbit sck=P2^7;
//22.114
void yan(int w) //100US
{
int a,b;
for(b=w;b>0;b--)
for(a=2000;a>0;a--);
}
uchar hanzi[]={"ÄÇË-£¿"};
uchar hanzi0[]={"×òííÎòÃÎμ½Äã"};
uchar hanzi1[]={"áË£¬¿ãñéêaáËò»"};
uchar hanzi2[]={"′󯬡£"};
uchar hanzi3[]={"½ñììííéÏ£¬Äã¸ú"};
uchar hanzi4[]={"Îò×ߣ¬Ô¼ò»Åú¡£"};
uchar hanzi5[]={"Ã÷ÔçèÃÄã¿T×Åà′éÏ"};
uchar hanzi6[]={"°à¡£"};
uchar hanzi7[]={"¾íÔú½ñíí"};
uchar hanzi8[]={"oì2¨"};
void xie(uchar cdat)
{
uchar a;
for(a=0;a<8;a++)
{
sck=1;
if(cdat&0x80)
{sid=1;}
else
{sid=0;}
cdat=cdat<<1;
sck=0;
//yan(10);
}
}
void xiecom(uchar com)
{
cs=1;
xie(0xf8);
xie(0xf0&com);
xie(0xf0&com<<4);
cs=0;
}
void xiedat(uchar dat)
{
cs=1;
xie(0xfa);
xie(0xf0&dat);
xie(0xf0&dat<<4);
cs=0;
}
void pos(uchar x,uchar y)
{
uchar poos;
if (x==0)
{x=0x80;}
else if (x==1)
{x=0x90;}
else if (x==2)
{x=0x88;}
else if (x==3)
{x=0x98;}
poos=x+y;
xiecom(poos);
}
void intc()
{
xiecom(0x30);
yan(100);
xiecom(0x0c);
yan(100);
xiecom(0x01);
yan(100);
xiecom(0x06);
yan(100);
}
void main()
{
uchar t;
P2M1=0X00;
P2M0=0x00;
intc();
yan(100);
while(1)
{
pos(0,0);
t=0;
while(hanzi[t]!='\0')
{
xiedat(hanzi[t]);
t++;
yan(100);
}
pos(1,1);
t=0;
while(hanzi0[t]!='\0')
{
xiedat(hanzi0[t]);
t++;
yan(100);
}
pos(2,0);
yan(100);
t=0;
while(hanzi1[t]!='\0')
{
xiedat(hanzi1[t]);
t++;
yan(100);
}
pos(3,0);
yan(100);
t=0;
while(hanzi2[t]!='\0')
{
xiedat(hanzi2[t]);
t++;
yan(100);
}
xiecom(0x01);
yan(200);
pos(0,0);
yan(100);
t=0;
while(hanzi3[t]!='\0')
{
xiedat(hanzi3[t]);
t++;
yan(100);
}
pos(1,0);
yan(100);
t=0;
while(hanzi4[t]!='\0')
{
xiedat(hanzi4[t]);
t++;
yan(100);
}
pos(2,0);
yan(100);
t=0;
while(hanzi5[t]!='\0')
{
xiedat(hanzi5[t]);
t++;
yan(100);
}
pos(3,0);
yan(100);
t=0;
while(hanzi6[t]!='\0')
{
xiedat(hanzi6[t]);
t++;
yan(100);
}
xiecom(0x01);
yan(300);
pos(1,2);
yan(100);
t=0;
while(hanzi7[t]!='\0')
{
xiedat(hanzi7[t]);
t++;
yan(200);
}
pos(3,5);
yan(100);
t=0;
while(hanzi8[t]!='\0')
{
xiedat(hanzi8[t]);
t++;
yan(200);
}
xiecom(0x01);
yan(2000);
}
}
|