Random PWM generation

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

Random PWM generation

977 次查看
oakie_doke
Contributor III

Hi,

I use Code Warrior 10.6 with Processor Expert and MCF51MM256CLK mcu. I use TimerInt component to measure 10ms impulse on some pin and after this time in interrupt i want to generate one period of pwm on another pin. I use PWM component with setted 20ms period, 19ms starting pulse width and low initial polarity. Problem is on scope I see that time between impulses is random, not 19ms, almost always is shorter. I think here is problem with pwm. Could you propose some solution of this problem?

0 项奖励
回复
1 回复

841 次查看
marek_neuzil
NXP Employee
NXP Employee

Hello Sebastian,

Could you provide me the project you are using, please? There are many possibilities how to cerate the application. The TimerInt and PWM support several devices that can be used for the application. Please, provide the description of the configuration at least.

There can be also problem of unstable clock source (e.g. unadjusted internal oscillator). Do you use external crystal as clock source for the PWM device?

Best Regards,

Marek Neuzil

0 项奖励
回复