Page 1 of 1

Timer Interrupt problems FC7 PIC18F4680

Posted: Mon Feb 20, 2017 11:30 am
by beanie
I don't know who can help, but I'm trying to compile some changes to some code I originally didi in FC6.

I am getting the following problem from the compiler:

PARC100v1rev4d.c: FCM_TimerInterrupt()
16229: tmr0h = 0x80;
^ (192) undefined identifier "tmr0h"
(908) exit status = 1
(908) exit status = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe reported error code 1

Now I've gone through my code and the function FCM_Timer Interrupt is never called by my programme, and when exported as c code and searched the function only appears as a prototype and the included function.

Does anyone know how I can get this to compile?

cheers

Re: Timer Interrupt problems FC7 PIC18F4680

Posted: Mon Feb 20, 2017 12:35 pm
by Benj
Hello,

Even though the macro is not called in the program the compiler still has to make sense of it just in case there is anything in there it needs to pay attention to.

In Flowcode 7 we changed the PIC compiler and the new compiler requires register names to be in upper case.

So your C code would change to look like this.

Code: Select all

TMR0H = 0x80;

Re: Timer Interrupt problems FC7 PIC18F4680

Posted: Mon Feb 20, 2017 12:53 pm
by beanie
ah that makes sense.

Is there a way to change this in the code as this is part of the auto generated code from FC6 so I could not see anywhere to edit it myself.

Re: Timer Interrupt problems FC7 PIC18F4680

Posted: Mon Feb 20, 2017 12:59 pm
by Benj
Please can you attach your Flowcode program and the generated C file and we will take a look for you.

Anything auto generated from Flowcode should be moved over to the v7 way of doing things and I've just double checked the 18F4680 resource file and everything looks ok.

Re: Timer Interrupt problems FC7 PIC18F4680

Posted: Mon Feb 20, 2017 1:39 pm
by beanie
pm'd