利用我這個程序可以教你入門STm32F103 單片機寄存器版的第一步。
單片機源程序如下:
- #include "led.h"
- #include "sys.h"
- #include "delay.h"
- #include "stm32f10x.h"
- void led_init(void);
- int main()
- {
- Stm32_Clock_Init(9);
- delay_init(72);
- led_init();
-
- while(1)
- {
-
- GPIOE->BSRR|=1<<5;
- GPIOB->BSRR|=1<<5;
- delay_ms(500);
- GPIOE->BRR|=1<<5;
- GPIOB->BRR|=1<<5;
- delay_ms(500);
-
-
- }
- }
復制代碼
所有資料51hei提供下載:
project1_LED.7z
(78.6 KB, 下載次數: 10)
2020-3-31 00:36 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
|