Page 1 of 1

Using More than 1 CCP with Flowcode V5

Posted: Tue Dec 25, 2012 9:41 am
by medelec35
I have posted this so you can see how to use more than 1 PWM component with Flowcode V5.
Attached Flowcharts use 5 PWM components.
Thanks to opieflus for giving me the idea as I thought it would help people who are not sure how it is achieved.

The main thing to remember are:
1) You need to add an additional PWM component for each extra PWM channel your using.
E.g if your using 4 PWMs, you need to add 4 PWM components in total.

2) You must change PWM Channel of every PWM component used.
Also you you have to alter every Period register & and Prescaler divide, so all PWM components match.

If not, when compiling you will see something like:

Code: Select all

PWM  using components V1 (1).c(283): PWM prescale value must be the same in all PWM modules

1 errors detected
Error: preprocessing error

failure

....Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
Although the error message is nice and clear.

Martin

Re: Using More than 1 CCP with Flowcode V5

Posted: Wed Dec 26, 2012 11:09 am
by jgu1
Hi Martin!

Very nice and usefull. :D

Jorgen.

Re: Using More than 1 CCP with Flowcode V5

Posted: Wed Dec 26, 2012 4:24 pm
by medelec35
Thanks Jorgen.
So long that it helps, especially if you get use to V4 method.
V5 is great, but may be a bit confusing at first.

Martin