Page 1 of 1

Compiler reports 'unknown identifier' using PWM

Posted: Fri Sep 07, 2007 10:56 am
by cleverchip
When compiling to hex I receive an error from the compiler, 'unknown identifier' using PWM component. The identifiers which it thinks are undefined (I presume) are the PWM variables (Enable, ChangePeriod, etc).

Have I missed a step in using the PWM component? ie, was I supposed to copy some code into the Supplementary Code box, etc?

Any help appreciated...

Posted: Fri Sep 07, 2007 3:00 pm
by Steve
The PWM component should work on its own without any additional code.

Please post your FCF and C files to us (support@matrixmultimedia.co.uk) and we'll look into this.

Posted: Fri Sep 07, 2007 4:33 pm
by cleverchip
Thanks, Steve - I'll mail the files to you. However, I think I have made some progress in terms of the symptoms - the errors are present whenever I try to use the PWM component in a flowcode program that also contains the Formula Flowcode component. Is there some conflict here?

(I was simply trying to make comparisons between the FF macro and a simple one that I wrote using the PWM component. I intended the buggy to drive forwards for a couple of seconds on the FF macro, pause, then do it again using my own driver macro!)

Cheers...

Posted: Fri Sep 07, 2007 4:40 pm
by Steve
I've just tried the PWM and the Formula Flowcode components in the same program and not been able to get this error.

I will look at your code when I receive it.

Posted: Mon Sep 10, 2007 9:15 am
by Steve
Hello,

Thanks for the files. I now know why the errors are generated...

You will get the same error if you add the Formula Flowcode component to a new blank program, but do not call any of its macros.

To get around this, simply add a call to one of the Formula Flowcode macros somewhere in your program.