Page 1 of 1

Macro and IRQ

Posted: Thu Jun 05, 2008 10:05 pm
by Xsusakamei
Hello!

I have a big Problem with Flowcode v3.4.7.48. I have searched here but nothing found yet.

I use Timer0 at 45Hz. So, i want to count an Variable each Call of the IRQ Routine. But Flowcode looses the Value each IRQ Call. So the Variable has even the Value 0 at Startup the IRQ-Makro.

So, i fight against the switches, Return- and Transfervalues to build an Makro. So, after a few hours, i have it! The Simulation works good(without IRQ - only Loop). So i want to choose the Makro to call in the Interrup-Icon. But, the Macro was not there. It was not listet in the Dropdown. Why ???? :evil:

I dont understand the handling of Variables. So, there are Local Variables for the Makros(Propertys of an Macro) "normal" Variables and Transfer Variables. So, where are the Different between? All Variables, except the "Transfer Variables" looses the Values after exiting the Macros! :!:In Asm i dont have this Problem ... . Here i am responsible for the right use of the Registers.

J. Schol

Re: Macro and IRQ

Posted: Fri Jun 06, 2008 6:09 am
by Steve
"Normal" (i.e. global) variables should not lose their values. If they are, then I suspect that the chip is resetting itself periodically (perhaps because the WDT is turned on).

I don't know why the macro is not listed. You need to export it and then import it into your program with the Interrupt icon.

Re: Macro and IRQ

Posted: Fri Jun 06, 2008 10:00 am
by Xsusakamei
Hello!

Thx for answer.
Yes, i have tested it yet. When i fill an "normal" Variable, die Variable can i use in an other Macro.
The IRQ does not function.

Perhaps i'm stupid :roll: :?:

A Testfile is in the attachment ... . If you start the Sim you earn an Error ... after stop the Sim you can try to choose the IRQ-Macro!