PWM Component in Flowcode V3

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

Moderators: Benj, Mods

Post Reply
Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times

PWM Component in Flowcode V3

Post by Mark »

Hi there,

I have been trying to identify the PWM component (as on page 9 of the FCv3 Datasheet) in Flowcode v3, where is it?

thanks,
Go with the Flow.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hi Mark

It is there but I dont think it is all finished quite yet. Eg there isn't an icon for it yet. I know that it is possble to use it though. I will try to explain how it works but to be honest Steve is your man. He will be back on monday.

Firstly you set up a variable for each PWM you wish to use.

Eg pwm1, pwm2

Set this variable with a value. I could be wrong about these numbers but I think they are right.
255 = always off. 0 = always on. 122 = 50:50 mark space.

The use a C code variable

Code: Select all

ccpr1l = FCV_PWM1;  //Sends variable pwm1 to first PWM module. 
ccpr2l = FCV_PWM2;  //Sends variable pwm2 to second PWM module. 
The ccpr1l and ccpr2l point to the PWM registers and the FCV_PWM1 is the C code equivalent of the pwm1 variable. Note the capitalisation and the preceeding FCV_

Fully intergrated PWM modules are going to arrive shortly so sorry for the wait.

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times

Post by Mikat »

Benj wrote:
Fully intergrated PWM modules are going to arrive shortly so sorry for the wait.

Hi Ben.
How about the upcoming pwm component,will it support some of 18f devices,witch have 5 pwm output,like 4450 (if i remember rigt),it is on supported devices list,can i use all outputs with flowcode?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Milkat

I think the PWM component will support the vast range of the 18F devices and I dont see any reason why all PWM outputs wouldn't be allowed.

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times

Post by Mark »

Benj,

Thanks. I can wait for the full module on this one. Please include full notes in the help file for it as to what resources are used on a chip and what other features/modules may be affected.

Mark
Go with the Flow.

Post Reply