单片机源程序如下:
- #include "stm32f10x_lib.h"
- #include "led.h"
- void delay( vu32 ncount);
- int main(void)
- {
- LED_GPIO_Config();
- while(1)
- {
- LED1(ON);
- delay(0x02FFEF);
- LED2(ON);
- delay(0x02FFEF);
- LED3(ON);
- delay(0x02FFEF);
- LED1(OFF);
- delay(0x02FFEF);
- LED2(OFF);
- delay(0x02FFEF);
- LED3(OFF);
- delay(0x02FFEF);
- }
- }
- void delay( vu32 ncount)
- {
- for(; ncount != 0; ncount--);
- }
复制代码
所有资料51hei提供下载:
用Proteus8.6仿真STM32点亮LED.zip
(782.94 KB, 下载次数: 906)
|