freq_counter

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

Moderators: Benj, Mods

Post Reply
franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm

freq_counter

Post by franky »

hi,

I'm making some tests whit your example "freq_counter" whit flowcode v3, but if I set Ecio40 I have an error when I try to compile to hex..

can you help me?

best regards!

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

Re: freq_counter

Post by Steve »

Please supply the FCF, C and MSG.TXT files and I will have a look.

franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm

Re: freq_counter

Post by franky »

HI Steve!

this is the text of the message file; i've tried to compile the example file "freq_counter" from your site

thank you and best regards!



"File name: C:\Users\FRANKY\Documents\_LABORATORIO\_MOTO ACQUA\_CONTAGIRI\Freq_Counter.c
Generated by: Flowcode v3.6.11.53
Date: Friday, December 04, 2009 10:35:28
Licence: Professional
Registered to: francesco capuzzo
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic18.flowcode.exe -v -t PIC18F4455 "Freq_Counter.c"
BoostC Optimizing C Compiler Version 6.70 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited
Freq_Counter.c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "C:\Users\FRANKY\Documents\_LABORATORIO\_MOTO ACQUA\_CONTAGIRI\Freq_Counter.c" -i "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC18F4455 -la -c2 -o Freq_Counter.pp -v -d _BOOSTC -d _PIC18
..........
C:\Users\FRANKY\Documents\_LABORATORIO\_MOTO ACQUA\_CONTAGIRI\Freq_Counter.c(404:2): error: unknown identifier 'tmr0'
C:\Users\FRANKY\Documents\_LABORATORIO\_MOTO ACQUA\_CONTAGIRI\Freq_Counter.c(404:2): error: invalid operand 'tmr0'
C:\Users\FRANKY\Documents\_LABORATORIO\_MOTO ACQUA\_CONTAGIRI\Freq_Counter.c(404:7): error: failed to generate expression
Freq_Counter.c success
failure
Return code = 1
Flowcode non Γ¨ in grado di compilare i codici C per via dei seguenti errori.
. Se la flowchart contiene codici C riesaminatela attentamente. Se no contattate il Supporto tecnico.
FINISHED

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

Re: freq_counter

Post by Steve »

I think this is a known issue that some versions of Flowcode use "tmr0" instead of "tmr0l".

Also, I can't find the FCF file - please post it here, along with the generated C code file and I will be able to help.

franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm

Re: freq_counter

Post by franky »

Hi Steve!,

please find the attached file.

best regards!
Attachments
Freq_Counter.c
(9.57 KiB) Downloaded 365 times
Freq_Counter.fcf
(8.5 KiB) Downloaded 365 times

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

Re: freq_counter

Post by Steve »

In the "TMR_INT" macro, change the final C code icon from this:

Code: Select all

tmr0 = 0x00;
to this:

Code: Select all

tmr0l = 0x00;

franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm

Re: freq_counter

Post by franky »

I have tried but nothing change..

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: freq_counter

Post by Benj »

Hi Franky

If you go into the View Menu and select Supplementary code and then add the following line to the defines window then your program should compile correctly.

#define tmr0 tmr0l

This line of code simply states to use the tmr0l register included on the ECIO device whenever the standard tmr0 register is referenced in the code.

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

Re: freq_counter

Post by Steve »

franky wrote:I have tried but nothing change..
Note that it is the letter "l" and not the number "1" in "tmr0l = 0x00;".

franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm

Re: freq_counter

Post by franky »

Hi Steve and Hi Benj
I'll go to try
thank you very much!!!

Post Reply