include<reg.51.h>
#define uchar unsigned char
sbit LED=P1^0;
uchar n;
void main()
{
n++;
if(n=50)
{n=0;
LED=!LED;
}
}
有2个worings 不知道错哪 求告知
下面是警告:
Build target 'Target 1'
linking...
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
ADDRESS: 000DH
Program Size: data=9.0 xdata=0 code=15
"aa" - 0 Error(s), 2 Warning(s).
此帖出自
小平头技术问答
#define uchar unsigned char
sbit LED=P1^0;
uchar n ; //此处赋初值会更好,否则会多几次空循环
void main()
{
n++;
if(n==50) //等于写成赋值符,有时会出Waring,有时不会,依keil版本而定
{
n=0;
LED=!LED;
}
}
//试试这个。
一周热门 更多>