Page 1 of 1

Delay and interrupt in example

Posted: Sun Feb 24, 2008 2:42 am
by veedubmachine
Hi,
I have just downloaded the TMR0-Int-1sec example and have found something odd in it,
Now the way I understand it is the interrupt occurs and a counter is incremented,
every 38 interrupts X is incremented. regardless of what main is doing, since its an interrupt.
The main loop just outputs X value.

Question is why does it not work properly if the 10ms delay is removed, or increased to say 5 seconds.
if the delay is 5 seconds shouldn't it just update portb every 5 seconds and X continue to increment every second?

Re: Delay and interrupt in example

Posted: Mon Feb 25, 2008 10:00 am
by Benj
All examples are provided on a as is basis and will not be supported unless there is a recognised problem with Flowcode itself.
The 10ms delay should have no effect on the interrupt and second count.