这是什么鬼错了,MAIN.C(9): error C129: missing ';' before 'cnt10ms'
#include <reg51.h> #define uint8 unsigned char
#define uine16 unsigned int
#define TIMER0_HIGHT0xDC
#define TIMER0_LOW 0x00
sbit keyin=P3^1;
bit starttest;
uint16 cnt10ms; //10ms计数器 这行改了,怎么还错,是显示这里错啊,为嘛改了不得,
uint8 cnt1s;
uint8 Pulsecnt;
uint8 Pulsenum;
uint8 codeDispCode[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0X80,0X90};
void Init_Extint(void);
void TimerInitProc();
void initvar();
void Init_Sustem(void);
void Display(uint8 chose_dat,uint8 dat);
void ShowDisp(uint8 tPulsenum,uint8 tPulsecnt,uint8 tcntls);
void DelayMs(uint8 Ms);
void main()
{
Init_System();
while(1)
{
ShowDisp(Pulsenum,Pulsencnt,cntls);
}
}
/*************************************
***********/
void Ext0_interrupt(void)interrupt0
{
if(starttest==1)
{
Pulsencnt++;
}
}
void Timer0IntProc()interrupt1
{
TH0=TIMER0_HIGHT;
TL0=TLMER0_LOW;
if(++cnt10ms==100)
{
cnt10ms=0;
if(starttest==1)
{
if(++cnt1s==60)
{
starttest=0;
Pulsenum=Pulsecnt;
}
}
}
if(keyin==0)
{
if(starttest==1)
{
cnt10ms=0;
cnt1s=0;
Pulsecnt=0;
}
else
{
starttest=1;
cnt10ms=0;
}
}
}
void Init_Extint(voi)
{
IT0=1;
IE0=0;
EX0=1;
}
void TimerInitProc()
{
TMOD &=0xF0;
TMOD |=0X01;
TH0=TIMER0_HIGHT;
TL0=TMER0_LOW;
TR0=1;
ET0=1;
EA=1;
}
void initvar()
{
starttest=0;
vnt10ms=0;
vnt1s=0;
Pulsecnt=0;
Pulsenum=0;
}
void Init_System(void)
{
Init_Extint();
TimerInitProc();
initvar();
}
void Display(uint8 chose_dat,uint8 dat)
{
P0=dat;
P2=~(0x01<<chose_dat);
DelayMs(1);
P2=0xFF;
}
void ShowDisp(uint8 tPulsenum, uint8 tPulsecnt,uint8 tcntls)
{
Display(6,DispCode[tPulsenum%10]);
tPulsenum=tPulsenum/10;
Display(7,DispCode[tPulsenum%10]);
Display(3,DispCode[tPulsecnt%10]);
tPulsecnt=tPulsecnt/10;
Display(4,DispCode[tPulsecnt%10]);
Display(0,DispCode[tcntls%10]);
tcntls=tcntls/10;
Display(1,DispCode[tcntls%10]);
}
void DelayMs(uint8 Ms)
{
unsigned char i,j;
do
{
for(i=5;i>0l;i--)
for(j=98;j>0;j--);
}while(--Ms);
//Test for 12M
}
/////////////////////adsf////////////////