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?
Delay and interrupt in example
- 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
The 10ms delay should have no effect on the interrupt and second count.All examples are provided on a as is basis and will not be supported unless there is a recognised problem with Flowcode itself.
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