|
在網上買的開發板,有光盤附帶程序,直接下載光盤中編譯好的程序,開發板有反應,但我自己重新在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--);
}
}
}
|
|