下面这个程序编译器提示的错误查找不到:
#include<reg52.h> #define uint unsigned int #define uchar unsigned char sbit dula=P2^6; sbit wela=P2^7; sbit D1=P1^0; uchar code table[]={ 0xc0,0xf9,0xa4,0xb0, 0x99,0x92,0x82,0xf8, 0x80,0x90,0x88,0x83, 0xc6,0xA1,0x86,0x8E}; uchar num; void delay(uint z); void main() { EA=1; EX0=1; wela=1; P0=0x55; wela=0; while(1) { for(num=0;num<16;num++) { dula=1; P0=table[num]; dula=0; delay(1000); } } }
void delay(uint z) { uint x,y; for(x=100;x>0;x--) for(y=z;y>0;y--); }
void exter0 interrupt 0 { D1=0; } |