Problem with C code

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

Moderators: Benj, Mods

Post Reply
serstel
Posts: 22
Joined: Thu Jan 25, 2007 1:34 am
Been thanked: 1 time

Problem with C code

Post by serstel »

I use pic 18f4550 and I am trying to output PWM using this code:
{
ccpr2l = FCV_speed;
}

{
ccpr1l = FCV_speed;
}
the two channels are implemented in two different C code blocks. However when I try to convert the flowchart into assembly I get the folowing errors:
C:\Documents and Settings\Administrator\Desktop\Flowcodeprog\Flowcodetest.c(382): error: missing semicolon
C:\Documents and Settings\Administrator\Desktop\Flowcodeprog\Flowcodetest.c(383): error: missing semicolon
C:\Documents and Settings\Administrator\Desktop\Flowcodeprog\Flowcodetest.c(448): error: missing semicolon
C:\Documents and Settings\Administrator\Desktop\Flowcodeprog\Flowcodetest.c(449): error: missing semicolon
Can anyone help? Thank you in advance.

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

Post by Steve »

Flowcode variables are converted to all capitals in the C code, so use this:

Code: Select all

ccpr2l = FCV_SPEED;
Although when I tried to replicate your error, I got a different error message ("variable undefined") - so there may be something else going wrong with your code. The above line should work fine on its own within a C icon (i.e. no curly brackets, etc).

Post Reply