|
在网上买的开发板,有光盘附带程序,直接下载光盘中编译好的程序,开发板有反应,但我自己重新在keil中编写程序,后再编译后,下载程序板子就没反应了!求问是为什么啊!求各位大神帮助!
程序如下,就是最简单的led闪烁程序:
#include <reg51.h>
void Delay10ms(unsigned int c);
void main()
{
while(1)
{
P0 = 0x00;
Delay10ms(50);
p0 = 0xff;
Delay10ms(50);
}
}
void Delay10ms(unsigned int c)
{
unsigned char a, b;
for (;c>0;c--);
{
for (b=38;b>0;b--);
{
for (a=130;a>0;a--);
}
}
}
|
|