You probably have several timer interrupts while it's inside your DO LOOP, so I ends up with unexpected values.In my DEBUG line "I" shows up as 0,2,4,5 randomly
Example: With i = i + 1 being first in your timer interupt, it's changing the value of i on every interrupt, and sometimes even during the process of PBP trying to output everything with DEBUG.
When DEBUG actually starts, your interrupt is still changing I before PBP outputs it.
Bookmarks