I am trying to control a single hobby servo using a PIC18F14K50 in Flowcode 5. The documentation for this chip indicates it has 4 PWM outputs. Trying to compile a simple Flowcode 5 program to sweep the servo yields the cryptic errors below.
I am using professional flow code 5.2. In searching the forums, there seem to be some posts that imply that these errors are generated when the target micro controller does not have necessary PWM support. In searching the web, there are numerous example of the 18F14K50 driving up to 8 hobby servos in C.
I am not finding any documentation on how to configure the servo component or what the limits are to use it, where can this be found on Flowcode web site?
I am making my way through the videos posted on the Flowcode web site, but have not found any that seems to explain servos. Side question, it it just me or are many of the videos 'silent movies' with NO audio?
Thanks for your help!
Dave
Code: Select all
Dave servo motor control v0.c
Starting preprocessor: C:\PROGRA~1\Flowcode\v5\Tools\boostc\pp.exe "Dave servo motor control v0.c" -i C:\PROGRA~1\Flowcode\v5\Tools\boostc\include -d _PIC18F14K50 -la -c2 -o "Dave servo motor control v0.pp" -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
.....
Dave servo motor control v0.c(407:2): error: unknown identifier 'ccp2con'
Dave servo motor control v0.c(407:2): error: invalid operand 'ccp2con'
Dave servo motor control v0.c(407:10): error: failed to generate expression
Dave servo motor control v0.c(409:21): error: unknown identifier 'CCP2IE'
Dave servo motor control v0.c(409:21): error: invalid operand 'CCP2IE'
Dave servo motor control v0.c(409:16): error: failed to generate expression
Dave servo motor control v0.c(409:16): error: invalid operand '<<'
Dave servo motor control v0.c(409:10): error: failed to generate expression
Dave servo motor control v0.c(523:2): error: unknown identifier 'ccpr2h'
Dave servo motor control v0.c(523:2): error: invalid operand 'ccpr2h'
Dave servo motor control v0.c(523:9): error: failed to generate expression
Dave servo motor control v0.c(524:2): error: unknown identifier 'ccpr2l'
Dave servo motor control v0.c(524:2): error: invalid operand 'ccpr2l'
Dave servo motor control v0.c(524:9): error: failed to generate expression
Dave servo motor control v0.c(531:24): error: unknown identifier 'CCP2IF'
Dave servo motor control v0.c(531:24): error: invalid operand 'CCP2IF'
Dave servo motor control v0.c(531:19): error: failed to generate expression
Dave servo motor control v0.c(531:19): error: invalid operand '<<'
Dave servo motor control v0.c(531:14): error: failed to generate expression
Dave servo motor control v0.c(531:55): error: unknown identifier 'CCP2IE'
Dave servo motor control v0.c(531:55): error: invalid operand 'CCP2IE'
Dave servo motor control v0.c(531:50): error: failed to generate expression
Dave servo motor control v0.c(531:50): error: invalid operand '<<'
Dave servo motor control v0.c(531:45): error: failed to generate expression
Dave servo motor control v0.c(531:14): error: invalid operand '& '
Dave servo motor control v0.c(531:45): error: invalid operand '& '
Dave servo motor control v0.c(531:34): error: failed to generate expression
Dave servo motor control v0.c success
failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED