#include
#define uint unsigned int
#define uchar unsigned char
sbit lcdrs=P2^6;
sbit lcdrw=P2^5;
sbit lcden=P2^7;
void delay(uint z);
void wei_(uchar x,uchar y);
uchar code table[]="02:59:53 " ;
uchar code table1[]="2014-05-18 ";
uchar num ,count;
uchar hour,fen,miao;
void write_com(uchar com)
{ lcdrs=0;
lcden=0;
lcdrw=0;
P0=com;
delay(5);
lcden=1;
delay(5);
lcden=0 ;
}
void write_date(uchar date)
{ lcdrs=1;
lcden=0;
lcdrw=0;
P0=date;
delay(5);
lcden=1;
delay(5);
lcden=0;
}
void Init()
{ lcden=0;
lcdrw=0;
hour=0;
fen=0;
miao=0;
write_com(0x38);
write_com(0x0c);
write_com(0x06);
write_com(0x01);
write_com(0x80);
for (num=0;num0;x--)
for (y=110;y0;y--);
}