Macro and IRQ

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

Moderators: Benj, Mods

Post Reply
Xsusakamei
Posts: 12
Joined: Sat Sep 15, 2007 11:40 pm
Contact:

Macro and IRQ

Post 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

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

Re: Macro and IRQ

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

Xsusakamei
Posts: 12
Joined: Sat Sep 15, 2007 11:40 pm
Contact:

Re: Macro and IRQ

Post 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!
Attachments
Test.fcf
(6.5 KiB) Downloaded 290 times
Greetings
J. Schol

Post Reply