標(biāo)題: stm32 GPIO點(diǎn)亮led燈程序 [打印本頁(yè)]

作者: 324334    時(shí)間: 2020-5-23 15:16
標(biāo)題: stm32 GPIO點(diǎn)亮led燈程序
stm32GPIO點(diǎn)亮led燈實(shí)驗(yàn)程序

單片機(jī)源程序如下:
  1. #include "stm32f10x.h"
  2. #include "led.h"

  3. void Delay(uint32_t  count)
  4. {
  5.         for(;count!=0;count--);
  6. }

  7. int main(void)
  8. {
  9.         LED_GPIO_B();
  10.         
  11.         while(1)
  12.         {
  13.                 GPIO_SetBits(GPIOB,GPIO_Pin_0);
  14.                 Delay(0xFFFF7);
  15.                 GPIO_ResetBits(GPIOB,GPIO_Pin_0);
  16.                 Delay(0xFFFF7);
  17.         }
  18. }
復(fù)制代碼

所有資料51hei提供下載:
GPIO-LED.7z (173.76 KB, 下載次數(shù): 11)







歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1