FAQ
- M051 Base Series(95)
- M0518 Series(97)
- M0519 Series(43)
- M0564 Series(1)
- Mini51 Base Series(90)
- Nano100/102 Base Series(101)
- Nano103 Base Series(10)
- Nano110/112 LCD Series(100)
- Nano120 USB Series(111)
- Nano130 Advanced Series(110)
- NUC029 Series(94)
- NUC100/200 Advanced Series(102)
- NUC120/122/123/220 USB Series(116)
- NUC121/125 Series(1)
- NUC126 USB Series(2)
- NUC130/230 CAN Series(103)
- NUC131/NUC1311 CAN Series(98)
- NUC140/240 Connectivity Series(114)
Products
Applications
Function
+
常見問答
PWM Capture的主要功能為何? 日期:2015-05-27
PWM Capture與PWM Output共用相同的硬體,當發生上緣觸發或下緣觸發時,PWM計數器的值會被鎖存到對應的上緣或下緣鎖存暫存器中,此時可以決定是否重載PWM計時器,或是觸發中斷事件發生。
PWM Capture主要是用來量測輸入波形的高電平和(或)高電平的脈波寬度。
以下圖為例:

如果要測量上緣到下緣(高電平)W2的時間,可以設定上緣觸發時重載PWM計數器的值(CN),並在下緣觸發時,得到下緣鎖存的值CFL。使用下面公式
(CN+1-CFL)*(prescale+1)*(clock divider)/PWM_CLK
就可以算出W2的時間。
註:prescale:8位元prescale
clock divider:預除頻器的選擇
PWM_CLK:PWM時鐘源頻率
| 產品: | 微控制器 ,Arm Cortex-M0 微控制器 ,M051 系列 ,M0518 系列 ,M0519 系列 ,Mini51 系列 ,Nano100 / 102 系列 ,Nano110 / 112 LCD 系列 ,Nano120 USB 系列 ,Nano130 USB+LCD 系列 ,NUC029 系列 ,NUC100 / 200 系列 ,NUC120 / 122 / 123 / 220 USB 系列 ,NUC130 / 230 CAN 系列 ,NUC131/NUC1311 CAN 系列 ,NUC140 / 240 USB+CAN 系列 ,Arm Cortex-M4 微控制器 ,M451 Base 系列 ,M451M 系列 ,M452 USB 系列 ,M453 CAN 系列 ,NUC442 / 472 系列 ,NUC505 系列 |
|---|---|
| 應用: | |
| 功能: | Peripherals,Timer and PWM,PWM-Capture |