就是那个闪灯的范例,修改了一点点,3秒就跑飞了???
int main(void)
{
GPIO_Configuration();
while (1)
{
PCout(13)=1;
Delay(0xfffff);
Delay(0xfffff);
Delay(0xfffff);
Delay(0xfffff);
PCout(13)=0;
Delay(0xfffff);
Delay(0xfffff);
Delay(0xfffff);
Delay(0xfffff);
PCout(13)=1;
Delay(0xfffff);
Delay(0xfffff);
Delay(0xfffff);
Delay(0xfffff);
PCout(13)=0;
Delay(0x0ffff);
Delay(0xfffff);
PCout(13)=1;
Delay(0x0ffff);
Delay(0xfffff);
PCout(13)=0;
Delay(0xfffff);
Delay(0xfffff);
}
}
原来的程序是这样的:
int main(void)
{
GPIO_Configuration();
while (1)
{
PCout(13)=1;
Delay(0xfffff);
Delay(0xfffff);
PCout(13)=0;
Delay(0xfffff);
Delay(0xfffff);
}
}
这个就木有问题。
初次接触,还请大神帮忙看看? |