PWM freq questions

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

PWM freq questions

Post 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?
Attachments
pwm question.fcf
(14.5 KiB) Downloaded 269 times

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

Re: PWM freq questions

Post 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
Martin

brandonb
Posts: 438
Joined: Mon Aug 29, 2011 12:26 am
Location: arizona
Has thanked: 175 times
Been thanked: 173 times

Re: PWM freq questions

Post 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

Post Reply