PWM Limitations

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
steve50j
Posts: 1
Joined: Wed Aug 12, 2009 3:21 pm
Contact:

PWM Limitations

Post by steve50j »

Hi

Im new to flowcode and it seems like a wonderfull tool but I have one problem that I cant seem to figure out
and the help file isn't very helpful with this.

I want to use flowcode (v3 or v4) to output four different pwm signals on the PIC18F4431 but it seems that
you can only generate two at a time. Is there a way to do more than two and can you assign them to specific
pwm pins on the PIC. Also I want to generate the signal at 50Hz using a 20kHz Xtal on the pic. I havent played around with it too much but I couldn't seem to get it that low. Is it possable?

Thanx
Steve

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: PWM Limitations

Post by Steve »

The current PWM implementation only allows a maximum of 2 PWM outputs. However, you could do what you are asking by embedding your own custom C code into your Flowcode program.

fresh
Posts: 47
Joined: Mon Jun 08, 2009 11:11 am
Contact:

Re: PWM Limitations

Post by fresh »

Hello,

I need also more than two PWM Signals in V4.
Is it technically feasible to integreat the PWM Feature more than 2 Limitations
in the Future?
My "C-Code" knowledge are very bad and i don't know how to
integrate this in Flowcode with "C".

Thank you for response

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: PWM Limitations

Post by Steve »

Flowcode will eventually support as many PWMs as are available on the device. But this will not happen soon.

You should be able to use custom code to manipulate all available PWM outputs, but you'll need a bit of C programming skills for this (or a friend who can help).

Perhaps this would make a good article for the newsletter/forum. We give away up to Β£100 of E-Blocks (or other software/hardware) for suitable articles, so if anyone fancies having a go...

fresh
Posts: 47
Joined: Mon Jun 08, 2009 11:11 am
Contact:

Re: PWM Limitations

Post by fresh »

Thank you for information steve.
So I must learn C-Code to use 3 PWM Channels and I hope
in the future it is integrated in Flowcode.

regards Andreas

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times
Contact:

Re: PWM Limitations

Post by dannyvanneijenhoff »

Hello
Is there maybe allready news, to work with more than 2 pwm channels in Flowcode? Is there maybe a update FC4 in the near future.

Is it easy (for someone with c-code experience) to copy and change the c-code of Flowcode from 2 to 4x PWM channnels.
Or is that a lot of work.

Thanks Danny

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 Limitations

Post by medelec35 »

Have you looked at:
http://www.matrixmultimedia.com/mmforum ... 19&start=0
THis only applies if more than 2 CCP channels.
Will not apply if only using ECCP.
I believe the facility to use more than two PWMs will be added to Flowcode V5
Martin

User avatar
Dan81
Valued Contributor
Valued Contributor
Posts: 268
Joined: Sun Jan 15, 2006 4:07 pm
Location: Albi France
Been thanked: 60 times
Contact:

Re: PWM Limitations

Post by Dan81 »

Hello

if you want to use more than 2 PWM (actually Pic Hardware possibility)

- if the frequency is not to high (about 1 kHz) you can use Timer interrupt.
- or use a special IC like Led dimmer for example (with I2C bus)

Daniel

Post Reply