Timer Interrupt problems FC7 PIC18F4680

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

Moderator: Benj

Post Reply
beanie
Posts: 18
Joined: Fri May 09, 2014 12:47 pm
Has thanked: 1 time
Been thanked: 6 times

Timer Interrupt problems FC7 PIC18F4680

Post 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

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: Timer Interrupt problems FC7 PIC18F4680

Post 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;

beanie
Posts: 18
Joined: Fri May 09, 2014 12:47 pm
Has thanked: 1 time
Been thanked: 6 times

Re: Timer Interrupt problems FC7 PIC18F4680

Post 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.

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: Timer Interrupt problems FC7 PIC18F4680

Post 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.

beanie
Posts: 18
Joined: Fri May 09, 2014 12:47 pm
Has thanked: 1 time
Been thanked: 6 times

Re: Timer Interrupt problems FC7 PIC18F4680

Post by beanie »

pm'd

Post Reply