显示最后一个大括号错了
#include
#define uchar unsigned char
#define uint unsigned int
uchar code table[]="I LIKE MCU!";
uchar code table1[]="WWW.QTC.EDU.CN";
***it lcden=P3^4;
***it lcdrs=P3^5;
***it dula=P2^6;
***it wela=P2^7;
uchar num;
void delay(uint x)
{
uchar i;
while(x--);
for(i=0;i<110;i++);
}
void inits()
{
dula=0;
wela=0;
lcden=0;
}
void com(uchar com)
{
lcdrs=0;
P0=com;
delay(5);
lcden=1;
delay(5);
lcden=0;
}
void date(uchar date)
{
lcdrs=1;
P0=date;
delay(5);
lcden=1;
delay(5);
lcden=0;
}
void init()
{
dula=0;
wela=0;
lcden=0;
com(0x38);
delay(5);
com(0x0C);
delay(5);
com(0x06);
delay(5);
com(0x01);
delay(5);
}
void main()
{
uchar i;
inits();
com(0x80+2);
for(i=0;i<12;i++)
{
date(table[i]);
delay(5);
}
com(0x80+0x40+1);
for(i=0;i<14;i++)
{
date(table1[i]);
delay(5);
}
while(1);
}
已退回3积分