Hello
I have a program that uses the timer0 to generate a time base of 1 ms (with an interruption). The program runs fine on my hardware but when I want to simulate, the 1 ms interruptionis generated far too often and keeps me from seeing some problem. How can I done that this interruption will occur when it should occur ?
Thank's
Simulation time base
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: Simulation time base
Hello Frank,
Flowcode does not simulate interrupts very well at the moment. I think things like timer interrupts may be triggered once every cycle of the main. This is obviously not ideal but it means we are not spending hours and hours getting this small feature perfect and neglecting all of the other more important features. If it helps you could use something like the FlowKIT tool to debug your hardware while it is running.
Flowcode does not simulate interrupts very well at the moment. I think things like timer interrupts may be triggered once every cycle of the main. This is obviously not ideal but it means we are not spending hours and hours getting this small feature perfect and neglecting all of the other more important features. If it helps you could use something like the FlowKIT tool to debug your hardware while it is running.
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
-
Frank123
- Posts: 36
- Joined: Fri Jan 15, 2010 5:17 pm
- Location: Saint-Nazaire - France
- Has thanked: 1 time
Re: Simulation time base
Hello Ben
I found my problem, in fact I set the timer 0 with a prescaler of 1 which is a very high frequency. Then I chargetTmr0h tmr0l and with a value that gives 1ms. I do not know how in floxcode and so I use a block C. .. Flowcode which ignores. How can I do to affect directly tmr0h and tmr0l Flowcode?
Frank
I found my problem, in fact I set the timer 0 with a prescaler of 1 which is a very high frequency. Then I chargetTmr0h tmr0l and with a value that gives 1ms. I do not know how in floxcode and so I use a block C. .. Flowcode which ignores. How can I do to affect directly tmr0h and tmr0l Flowcode?
Frank
Frank
Electronics teacher
Electronics teacher