#include <reg52.h>
#define lcd P0
typedef unsigned char uchar;
typedef unsigned int uint;
sbit E=P2^7;
sbit RS=P2^6;
sbit RW=P2^5;
uchar ss='A';
void delay(uint i)
{
uchar j;
for(;i>0;i--)
{
for(j=200;j>0;j--);
}
}
void jieshou(uchar neirong)
{
E=0;
RS=1;
RW=0;
lcd=neirong;
delay(1);
E=1;
delay(5);
E=0;
}
void zhiling(uchar xiaoguo)
{
RS=0;
RW=0;
E=0;
lcd=xiaoguo;
delay(1);
E=1;
delay(5);
E=0;
}
void main()
{
uint i;
zhiling(0x38);
zhiling(0x0c);
zhiling(0x06);
zhiling(0x01);
for(i=0;i<13;i++)
{
jieshou(ss);
}
while(1);
}