Page 1 of 1

Timer not working

Posted: Tue Sep 28, 2010 1:16 pm
by D.Bouchier
Hello dear people,

I made a program in Flowcode with PWM and a timer to turn it on and off, this did not quite work in the simulation so i made a different program with just the timer because i know PWM also uses a timer so it might have caused problems, but even without the PWM it still acts strange, it does work in the simulation now but not on my MIAC.

Also looked at some examples but those didnt really make any sense for me when simulating them

Could anybody take a look at this and shed some light on my problem and/or give advice how to make it work?

thanks in advance

Re: Timer not working

Posted: Tue Sep 28, 2010 3:38 pm
by medelec35
Hello D.Bouchier.

The main issue is having a delay within your interrupt. This delay is occurs for a longer duration than the interrupt takes to fire which is a big no no.
Any delays or component macros which also have delays should not be used within timer interrupts. Also you have got your timer interrupt to trigger on external pin, and not via oscillator.
Try this.

Re: Timer not working

Posted: Tue Oct 12, 2010 7:49 am
by D.Bouchier
Thank you for this insight, i have learned something from this.