久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2140|回復: 0
打印 上一主題 下一主題
收起左側

InputCapture_PWM-Library (STM32F4)

[復制鏈接]
跳轉到指定樓層
樓主
Input Capture Library (STM32F4)
To measure the frequency and duty cycle of a PWM signal, I created these libraries.
(there is also an extra LIB if only the frq should be measured)

There is one library each for the timers "TIM2, TIM3, TIM4, TIM5".

The timers are operated in PWM InputCapture mode, with MasterSlave and Autoreset. The interrupt function is triggered by the signal at each hi-edge and determines the period duration and the pulse length of the signal.

Only one signal can be measured per timer in this mode. And there are only channels 1 or 2 available.

The channel and port pin to be used must be entered in the C file.

In the H-file, the clock frequency is set by the timer. This affects the resolution and the minimum frequency that can be measured.

Note: the function for reading the frequency only transfers the timer value of the period. The conversion into a frequency must be made extra if necessary. If there is no signal (or the measurement is not finished yet), the return value = 0. This means that a missing signal can be detected.

Image :

pwm_in-300x118.jpg (5.04 KB, 下載次數: 84)

pwm_in-300x118.jpg

Demo_51_PWM_IN.zip

227.07 KB, 下載次數: 10, 下載積分: 黑幣 -5

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 成人午夜又粗又硬又大 | 免费黄色片视频 | 91免费观看视频 | 精品福利在线 | 一区二区三区四区视频在线观看 | 国产成人在线免费观看 | 精品日韩| 亚洲国产成人av | 国产乱码精品一区二区三 | 亚洲精品免费看 | 欧美日韩免费在线观看 | 国产精品成人一区二区网站软件 | 亚洲一区二区免费 | 精品一区二区三区四区 | 久操福利视频 | 伊人91| 欧美日日日 | 亚洲精品乱码久久久久久 | 日本国产在线观看 | 亚洲欧美日韩国产 | 国产www视频| 免费福利在线观看 | 亚洲狠狠干 | 精品在线观看视频 | 日韩理论在线 | 色综合五月天 | 亚洲爽妇网 | 日韩精品 | 一区二区三区免费看 | 激情久久网 | 中文字幕一区二区三区四区视频 | 国产午夜免费 | 成人免费黄色片 | 久久黄色大片 | 久久久天堂国产精品女人 | 成人欧美一区二区三区白人 | 久久综合五月天 | 黄色成人在线观看 | 国产人成一区二区三区影院 | 国产激情综合 | 一区二区国产精品 |