Page 1 of 1

Simulation time base

Posted: Tue May 18, 2010 4:39 pm
by Frank123
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

Re: Simulation time base

Posted: Tue May 18, 2010 4:44 pm
by Benj
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.

Re: Simulation time base

Posted: Tue May 18, 2010 5:11 pm
by Frank123
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