PWM frequency

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
D.Bouchier
Posts: 28
Joined: Tue Sep 28, 2010 12:36 pm
Has thanked: 5 times
Been thanked: 1 time
Contact:

PWM frequency

Post by D.Bouchier »

Hi,

A nother problem, a nother topic...

My Ecio-40 is programmed for PWM, in the prooerties menu is written that it is +/- 48kHz, but when i meassure it, it's 3kHz. Any idea what can cause this, more important, how to solve this?

When i'm controlling a motor with it, it makes a high beep, probably the 3kHz sound wave, i have attached the flowcode...

I need this done by today, so a quick solution would be pleasent, thanks


solved by using timer0 instead of timer2
Attachments
Proto.fcf
(21.41 KiB) Downloaded 360 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PWM frequency

Post by medelec35 »

Hiya D.Bouchier,
Just had a quick look at your flowchart.
you are using, both PWM and timer2.
I believe since PWM is driven by timer2,there could there be a conflict here?
Try using timer0 instead of timer 2.
Martin

D.Bouchier
Posts: 28
Joined: Tue Sep 28, 2010 12:36 pm
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: PWM frequency

Post by D.Bouchier »

That could be the problem, i already solved it by using timer0, but i did not know why it solved it. i thought pwm was controlled by timer1, thanks anyway

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PWM frequency

Post by medelec35 »

Your welcome. Glad all working.
Thanks for letting us know.
Martin

Post Reply