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.
Problem with C code
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Flowcode variables are converted to all capitals in the C code, so use this:
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).
Code: Select all
ccpr2l = FCV_SPEED;