交谈中请勿轻信汇款、中奖信息、陌生电话,勿使用外挂软件。
卟^wei^别*锝!!(393491459) 9:01:01
#include
#define npos 0x01
unsigned char Disbuf[8]={1,2,3,4,5,6,7,8};
unsigned char seg []={0x3f,0x06,0x5b,
0x4f,0x66,0x6d,0x7d,0x07,0x7f,
0x6f,0x77,0x7c,0x39,0x5e,0x79,0x79,0x71}
void Delay (unsigned int wDelay)
{
while (wDelay !=0)
wDelay--;
}
void Disp()
{
unsigned char i=0;
unsigned char npos=0x01;
P1DIR = 0xff;
P5DIR = 0xff;
for(i=0;i<8;i++)
{
P1OUT=~npos;
npos<<=1;
P5OUT=seg[DispBuf];
Delay();
}
}
哪位师兄看下咋会错了
Building configuration: 数码管13 - Debug
Updating build tree...
main.c
Error[Pe065]: expected a ";" C:\Documents and Settings\Administrator\桌面\单片机练习\新建文件夹\数码管\数码管13\main.c 9
Warning[Pe012]: parsing restarts here after previous syntax error C:\Documents and Settings\Administrator\桌面\单片机练习\新建文件夹\数码管\数码管13\main.c 30
Error while running C/C++ compiler
Total number of errors: 1
Total number of warnings: 1
unsigned char seg []={0x3f,0x06,0x5b,
0x4f,0x66,0x6d,0x7d,0x07,0x7f,
0x6f,0x77,0x7c,0x39,0x5e,0x79,0x79,0x71}后面少个分号
回复 楼主 11016377796 的帖子
还有调用delay里面咋滴没有值?