#include
#define port P0
sbit lsa=P2^2;
sbit lsb=P2^3;
sbit lsc=P2^4;
unsigned char code contr[10]={0x3f,0x06,0x5b,0x4f,0x26,0x6d,0x7d,0x07,0x7f,0x67};
void Delay10ms(int c);
void main(){
int i=0;//计数器
lsa=0;
lsb=0;
lsc=0;
while(1){
port=contr[i];
Delay10ms(150);
i++;
if(i==10) i=0;
}
}
void Delay10ms(int c){
unsigned a,b;
for(;c>0;c--)
for(b=38;b>0;b--)
for(a=130;a>0;a--);
}
有可能输出口不是p0之类的的问题么?求助