#include "reg51.h"
#define uint unsigned int
sbit led=P0^0;
void delayxms(uint xms)
{
uint x,y;
for(x=xms;x<0;x--)
for(y=110;y>0;y--);
}
void main()
{
while (1)
{
led=0;
delayxms(1000);
led=1;
delayxms(1000);
}
}
Rebuild target 'Target 1'
compiling test.c...
linking...
Program Size: data=9.0 xdata=0 code=62
".\Objects\test" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:00
没问题的,你应该把你的整个工程上传,是不是设置的问题 |