Hello everyone, I am using PIC micro controller to program a series of leds.
My question: is it possible to break out of while(1) loop in the animation with an interrupt? I know that this code doesn't do it, since all that happens after the interrupt flag is detected is the reset of the counter and animation selection is being incremented. I was thinking of stack pointers, but not sure if that will do the trick, any help?
Thanks in advance!
So i attempted writing like this. The first break out of the while loop happens but it never goes to the next switch case (another animation). I need to clear g_status bit, but not sure how to do it... It does not work if I do it so in the interrupt routine anyway. Is this the good approach or should i try to do it as JLBorges suggested?