Analog Timing issue.
this has got me beat. i'm doing time critical measurements , problem. i'm chasing why there large steps in time measurements. i'm supplying 50 hz signal board. time between cycles 20000 usec. i'm send serial output once second. in order nice clean signal wait falling edge, rising 1 make sure trigger voltage d goes >200. record time. i wait falling edge , rising , take next time measurement. i subtract 2 time per cycle. now question, when add small delay, way below 20000 usec period, why timing measured change , why such odd numbers. timing should not change @ all. for delaymicroseconds(1); or no delay i 20048 20048 for delaymicroseconds(4); i 20064 20064 for delaymicroseconds(20); i 20080 20080 for delaymicroseconds(40); i 20096 20096 for delaymicroseconds(60); i 20000 20000 for delaymicroseconds(70); i 20016 20016 code: [select] unsigned long rpmstarttime = 0; unsigned long rpmendtime=0; unsigned long rpmduration=0; void s...