Page 1 of 1
PWM freq questions
Posted: Sun Oct 02, 2011 7:44 am
by brandonb
by using the examples i created a pwm, then added a display as feedback, --> is it possible to have another analog input to vary frequency? if so how could this be done?
Re: PWM freq questions
Posted: Sun Oct 02, 2011 9:06 am
by medelec35
Hi Brandon,
You can adjust the period register ( 0 to 255) and clock source (1, 4 or 16) using a pot via PWM ChangePeriod component.
The only thing with changing period is:
If pwm duty (0 to 100%) was obtained with a 0 to 255 value, then with new period or clock source values this may not be the case.
This will add some complexity to the flowchart.
Take a look here:
http://www.matrixmultimedia.com/mmforum ... 84&p=20729
If you scroll down, you will see Dan81 posted a flowchart that the frequency of PWM can be changed.
Martin
Re: PWM freq questions
Posted: Sun Oct 02, 2011 9:39 am
by brandonb
yep i've explored the options previously in the pwm period macro, it makes the display not match, i've also created desisions based on these and it make the pot sensitive since the resolution is divided , i didnt see the obvious in the link but will study, i've been trying to do this with interputs but cant get the macro to work right