#include<reg51.h>
#define uchar unsigned char
#define uint unsigned
int warn_l2 = 50;
int warn__shi=0;
uchar cod table[] = {
0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,
0xbf,0x86,0xdb,0xcf,
0xe6,0xed,0xfd,0x87,
0xff,0xef,
0x40
};
void delay(int z)
{
int a,b;
for(a = 0;a < z ;a++)
for(b = 0;b < 120; b++);
}
void display(uchar num , uchar dat)
{
uchar i;
dula = 0;
wela = 0;
wela = 1;
i = 0x00;
i = i | (~(((0x01)<<(num))));
P0 = i;
wela = 0;
dula = 1;
P0 = table[dat];
dula = 0;
P0 = 0xff;
dula = 0;
delay(3);
}
void dis_temp(int t)
{
uchar i;
i = t100;
display(1,i);
i = t%10010;
display(2,i+10);
i = t%100%10;
display(3,i);
delay(5);
}
code.c(6): error C129: missing ';' before 'table'
不知道要怎么解决求助各位大神
|