SCT applicaion - count PWM pluse number

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SCT applicaion - count PWM pluse number

2,277 次查看
yansinli
Contributor III

how to count PWM  pulse  by SCT ?

for example . sent 200K 100pulse(duty 50~40%) to SCT。

SCT can count 100 pulse(can not use SCTinterupt) 

please give me example.thanks.

------------------------------------------------------------------

如何使用SCT計算PWM脈波數

例如,送200K 100個PLUSE (duty50~40%) 到SCT

SCT 能計數到100個脈波數(不能使用SCT中斷)

請麻煩提供範例 謝謝

-------------------------------------------------------------------------

0 项奖励
回复
5 回复数

2,017 次查看
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

Could you please specify which MCU you are using?

Best Regards,

Sabina

0 项奖励
回复

2,017 次查看
yansinli
Contributor III

LPC1519

0 项奖励
回复

2,017 次查看
Sabina_Bruce
NXP Employee
NXP Employee

Hello,

I apologize for the delayed response. You can find much detail in the SCTimer/PWM Cookbook application note. I recommend checking section 7 of the application note. Here you will find sample code on how to initalize your module in order to count up or down. 

You may find example projects in the following path of your PC if you have download MCUXpresso as your IDE.

C:\nxp\MCUXpressoIDE_11.0.0_2516\ide\Examples\LPCOpen\lpcopen_2_20_lpcxpresso_nxp_lpcxpresso_1549.zip\periph_sct_pwm

Best Regards,

Sabina

0 项奖励
回复

2,017 次查看
yansinli
Contributor III

this section7 example is output PWM.  I neee  to count PWM.  

0 项奖励
回复

2,017 次查看
Sabina_Bruce
NXP Employee
NXP Employee

You can find further information regarding how to configure the SCTimer as a counter. In the reference manual the register and configurations choices are described in Section 15.7.10 to 15.7.12. Unfortunately there is not an example made using this configuration. However, if you have begun working on it and are having trouble. Please provide your configuration so that I may review it. 

Best Regards,

Sabina

0 项奖励
回复