Page 1 of 1

PWM Component in Flowcode V3

Posted: Wed Jan 10, 2007 5:10 pm
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,

Posted: Thu Jan 11, 2007 11:44 am
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.

Posted: Thu Jan 11, 2007 12:45 pm
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?

Posted: Fri Jan 12, 2007 11:56 am
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.

Posted: Fri Jan 12, 2007 1:17 pm
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