各位大神:
帮忙看下,编译器一直报错,说这个地方有错误,我看了很多遍也找不出问题在哪
#include //包含有左右循环移位子函数的库
#define uint unsigned int //宏定义
#define uchar unsigned char //宏定义
#define time 3000 //宏定义定时初值时间 ***it dula=P2^6;
***it wela=P2^7;
uchar code tabledu[]={ //显示数据编码--段码
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71,
0x76,0x79,0x38,0x3f,0};
uchar code tablewe[]={ //显示数据编码--位码
0xfe,0xfd,0xfb,0xf7,0xef,0xdf};
uchar num,numwe,numdu,i;
uint bai,shi,ge;
void init();
void display();
void display0(uint bai,uint shi,uint ge); //编译器一直报错,说这个地方有错误
void delay();
void main()
{
init();
while(1)
{
if(num==1)
{
num=0;
display();
}
for(i=0;i<34;i++)
{
static uint a = 432;
a--;
bai=a/100;
shi=(a/10)%10;
ge=a%10;
display0(uint bai,uint shi,uint ge);
delay();
}
}
}
void init()
{
numwe=0;
numdu=8;
TMOD=0x10;
TH1=(65536-time)/256;
TL1=(65536-time)%256;
EA=1;
ET1=1;
TR1=1;
}
void timer1() interrupt 3
{
TR1=0;
TH1=(65536-time)/256;
TL1=(65536-time)%256;
TR1=1;
num++;
}
void display()
{
numdu--;
if(numdu==1)
numdu=7;
dula=1;
P0=tabledu[numdu];
dula=0;
wela=1;
P0=tablewe[numwe];
wela=0;
numwe++;
if(numwe==6)
numwe=0;
}
void display0(uint bai,uint shi,uint ge)
{
dula=1;
P0=tabledu[bai];
dula=0;
wela=1;
P0=0xf7;
wela=0;
dula=1;
P0=tabledu[shi];
dula=0;
wela=1;
P0=0xef;
wela=0;
dula=1;
P0=tabledu[ge];
dula=0;
wela=1;
P0=0xdf;
wela=0;
}
void delay(void) //误差 -0.000000000023us 延时100ms
{
uchar a,b;
for(b=221;b>0;b--)
for(a=207;a>0;a--);
}
0