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?
Are variables available in interrupts
Moderator: Benj
- 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: Are variables available in interrupts
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel