单位共阳的数码管,我是想静态显示0-9,间隔500ms,但是报错了,一直没有搞明白,我单个显示单独数字就可以。
坐等解答,感谢了
#include<reg52.h>
sbit p1_1=P1^0;
void delay(unsigned int z)
{
unsigned int x,y;
for(x=z;x>0;x--)
for(y=110;y>0,y--);
}
void main()
{
p1_1=1;
P3=0xff;
while(1)
{
P3=0xc0;
delay(500);
P3=0xF9;
delay(500);
P3=0xa4;
delay(500);
P3=0xb0;
delay(500);
P3=0x99;
}
}
Build target 'Target 1'
compiling lesson2-1
LESSON2-1 C(8): error C141: syntax error near ')'
Target not created
|