hi,
In the above section, it monitor the switches every 10ms. Close to be constant monitoring.
BTW, i case you have more complex routines, the most interesting stuff to do it is to use interrupts (rb0 or else other interrupt source that your PIC can provide).
In this case, it will monitor in background your push button and jump to the "interrupt handler" when he is pressed. In the interrupt handler, set a flag or variable that will say to your previous task that you have to change to another task.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks