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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2109|回復: 0
打印 上一主題 下一主題
收起左側(cè)

InputCapture_PWM-Library (STM32F4)

[復制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:263845 發(fā)表于 2017-12-19 19:14 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
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, 下載次數(shù): 84)

pwm_in-300x118.jpg

Demo_51_PWM_IN.zip

227.07 KB, 下載次數(shù): 10, 下載積分: 黑幣 -5

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

使用道具 舉報

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

本版積分規(guī)則

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

Powered by 單片機教程網(wǎng)

快速回復 返回頂部 返回列表
主站蜘蛛池模板: www.中文字幕.com | 亚洲精品乱码久久久久久按摩观 | 韩国主播午夜大尺度福利 | 农村黄性色生活片 | 国产丝袜一区二区三区免费视频 | 久久精品国产免费一区二区三区 | 欧美国产亚洲一区二区 | 91麻豆精品国产91久久久久久久久 | 欧产日产国产精品视频 | 亚洲精品免费看 | 日韩国产欧美在线观看 | 91精品国产91久久久久久密臀 | xnxx 日本免费 | 人人做人人澡人人爽欧美 | 国产一区二区不卡 | 六月婷婷久久 | 亚洲欧美在线观看视频 | 日韩精品久久久久 | 中文字幕在线观看www | 欧美男人天堂 | 中文字幕 在线观看 | 欧美黄色一区 | 在线视频 中文字幕 | 激情黄色在线观看 | 97国产成人| 国产成人精品免费视频大全最热 | 国产精品美女久久久 | 国产999精品久久久久久 | www.yw193.com| 国产精品免费观看 | 国产精品18hdxxxⅹ在线 | 亚洲精品不卡 | 91毛片在线观看 | 国产精品不卡 | 国产精品亚洲精品 | 午夜爽爽爽男女免费观看 | 成人久久18免费网站麻豆 | 国产精品久久久 | 99国内精品 | 精品国产一区二区三区免费 | 久久久久亚洲av毛片大全 |