Delay and interrupt in example

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
veedubmachine
Posts: 6
Joined: Tue Feb 19, 2008 12:01 pm

Delay and interrupt in example

Post 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?

User avatar
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: Delay and interrupt in example

Post 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.

Post Reply