#include<reg51.h>
#include<stdio.h>
#define uchar unsigned char;
uchar code dispbit[]= {0x00,0x01,0x02,0x03};
uchar code dispcode[]= {0x3f,0x06,0x5b,0x4f,0x66,0x7d,0x07,0x7f,0x6f,0x00,};
uchar dispbuf[4]= {0,0,0,0};
uchar T0count;
uchar timecount;
bit flag;
unsigned long f,Rt,RL,Rs;
float Ct,V;
uchar i,j,k,l,m;
sbit S1=P3^6;
sbit S2=P3^7;
sbit PD=P3^2;
sbit ST=P2^6;
#define V2_ON {ST=0};
#define V02_ON{ST=0};
void t0(void)interrupt 1 using 1
{
T0count++;
}
void t1 (void)interrupt 3 using 1
{
TH1=(65536-50000)/256;
TL1=(65536-50000)%256;
timecount++;
if(timecount==4)
{
TR0=0;
timecount=0;
flag=1;
}
}
void delay()
{
for(m=0;m<=2;m++);
for(j=0;j<=100;j++);
}
void disp()
{
for(i=0;i<4;i++)
{
dispbuf[i]=0;
}
i=0;
while(V/10)
{
dispbuf[i]=(int)V%10;
V=V/10;
i++;
}
dispbuf[i]=V;
timecount=0;
T0count=0;
TH0=0;
TL0=1;
TR0=1;
for(k=0;k<4;k++);
}
void initial()
{
TR1=1;
TR0=1;
ET0=l;
ET1=1;
EA=1;
}
void main()
{
TMOD=0X15;
TH0=0;
TL0=0;
TH1=(65536-50000)/256;
TL1=(65536-50000)%256;
ST=1;
timecount=0;
Ct=4.7;Rt=10;
RL=360;Rs=36;
while(1)
{
V2:V2_ON;
ST=1;
delay_ms(1000);
{
1=4;
initial();
datahandle();
disp();
}
else
{
goto V02;
}
V02:V02_ON;
1=3;
ST=0;
initial();
datahandle();
disp();
}
}
c(83): error C141: syntax error near '}'
这是什么情况啊,求解答 呜呜
|