Just whining I guess. Was kinda on a roll, now having to go back & make a bunch of tweaks to fix those.
Here's another question regarding timing:
I am writing what's basically a big sequencer, driving a low level signal out and watching for it to come back on another pin for a couple of mS (need 2mS min contact time for example).
I'm figuring if I do this:
unsigned long currentMicros = micros(); // see how long its been
if (currentMicros - previousMicros >= interval) // more than our 0.1mS interval? (100uS)
// save the last time we okayed time updates
previousMicros = currentMicros;
tenth_mS_interval = tenth_ms_interval+1;
// do stuff on 0.1mS intervals, 1mS intervals, ets.
That would allow 1600 operations between intervals, correct?
100uS/62.5nS = 1600
and I could control/time stuff with 0.1mS timing if needed?