错误 C129: missing ';' before 'main'怎么回事呢?
#include<reg52.h>#include<intrins.h>#defineuintunsignedint#defineucharunsignedcharuch...
#include<reg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar tt,aa,num;
sbit dula=P2^6;
sbit wela=P2^7;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
void delay(uint z);
viod main()
{
aa=0;
tt=0;
num=0;
EA=1;
TOMD=1;
ET0=1;
TR0=1;
TL0=(65536-50000)%256;
TH0=(65536-50000)/256;
while(1)
{
tt++;
tt++;
if(tt=6)
{tt=0;}
wela=1;
P0=tt;
wela=0;
}
}
viod time() interrupt 1
{
uint i,j;
TL0=(65536-50000)%256;
TH0=(65536-50000)/256;
aa++;
if(aa=40)
{
aa=0;
num--;
if(num=0)
{num=6;}
dula=1;
P0=table[num];
dula=0;
}
} 展开
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar tt,aa,num;
sbit dula=P2^6;
sbit wela=P2^7;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
void delay(uint z);
viod main()
{
aa=0;
tt=0;
num=0;
EA=1;
TOMD=1;
ET0=1;
TR0=1;
TL0=(65536-50000)%256;
TH0=(65536-50000)/256;
while(1)
{
tt++;
tt++;
if(tt=6)
{tt=0;}
wela=1;
P0=tt;
wela=0;
}
}
viod time() interrupt 1
{
uint i,j;
TL0=(65536-50000)%256;
TH0=(65536-50000)/256;
aa++;
if(aa=40)
{
aa=0;
num--;
if(num=0)
{num=6;}
dula=1;
P0=table[num];
dula=0;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询