Page 1 of 1
Are variables available in interrupts
Posted: Thu Jul 23, 2009 2:24 pm
by DanDMan
Im trying to use flowcode 4 and the simulation does not seem to output anything to the pins.. Its a simple interrupt that outputs seconds to port a.
Are variables available inside interrupts to read and write and do you have to return values?
Re: Are variables available in interrupts
Posted: Thu Jul 23, 2009 3:47 pm
by Benj
Hello
The Flowcode simulation struggles a bit to deal with interrupts. The timer 0 interrupt and the port change and INT interrupts seem ok but the other timers currently do not simulate.
Have you tried running on hardware, you should find that this works much better.
If you are using a timer0 interrupt and it is not working in simulation or hardware then check your interrupt settings to make sure the clock source is set to CLKO and not T0CKI.
Variables are global to every macro including interrupts unless you define the variables as being local to a particular macro. Therefore you should have no problems reading, writing variables inside an interrupt.