
Originally Posted by
Kamikaze47
Statement (1) will not always be true. The interrupt routine services all interrupts. Statements (1)-(4) are just checking which interrupt flag is set (which interrupt went off). If it was the INT interrupt then it jumps to the ZeroCrossingInt section. If it was the TMR0 interrupt then it continues on to the T0Overflow section.
I don't know what else is happening in your program, so I can only tell you what that interrupt routine is doing which is this:
When timer0 overflows: set oDimmer to 1.
When external interrupt (INT) occurs: set timer0 value to "DimmerVal" and set oDimmer to 0.
Is it possible to PM you?
___________________
WHY things get boring when they work just fine?
Bookmarks