|
include
#define uchar unsigned char
#define uint unsigned int
uchar i;
uint time;
code struct
{
int position;
char pattern;
}next[]={{0,0x00},{200,0x01},{210,0x03),{400,0x02},{450,0xff}};
timer0() interrupt 1 using 1
{
TH0=(65536-10536)/256;
TL0=(65536-10536)%256;
time++;
if(time==next.position)
{
if(next.pattern==0xff)i=time=0;
P0=next[i++].pattern;
}
}
void main(void)
{P0=0;
time=0;
i=1;
TMOD=0x01;
TH0=(65536-10536)/256;
TL0=(65536-10536)%256;
EA=1;
ET0=1;
TR0=1;
for(;;){}
}
错误代码c141 syntax error near ')'第十行语句
请大家看看问题在那里谢谢
|
|