當前位置:編程學習大全網 - 網站源碼 - 脈搏波指數源代碼

脈搏波指數源代碼

脈沖的頻率是多少?占空比是多少?

如果不要求這些,就產生壹個方波。以51單片機為例。

# include & ltREG51。H & gt

sbit out=p1^0;//引腳可以修改。如果使用P0端口,應增加壹個拉電阻。

void delayus(無符號整數t)

{

while(t-);

}

void main()

{

while(1)

{

out = ~ out

德拉尤斯(10);//正脈沖時間,可以改變。

out = ~ out

德拉尤斯(5);//負脈沖時間,可以改變。

}

}

  • 上一篇:mfc unicode 獲取網頁源碼亂碼如何解決
  • 下一篇:舵機程序源代碼
  • copyright 2024編程學習大全網