Arduino: Better Microsecond Resolution Than Micros()?
Answer : Yes, depending your Arduino's basic clock rate. For example here are the counter-timer input frequencies and periods after pre-scaling, for an ATMega2560's counter-timer 2, and a basic clock rate of 16MHz. The timer has built in "prescaler" value options which determine frequency/period, shown in this table: TCCR2B bits 2-0 Prescaler Freq [KHz], Period [usec] after prescale 0x0 (TC stopped) -- -- 0x1 1 16000. 0.0625 0x2 8 2000. 0.500 0x3 32 500. 2.000 0x4 64 250. 4.000 0x5 128 125. 8.000 0x6 256 62.5 16.000 0x7 1024 15.625 64.000 For better timing resolution, you use a value called TCNT2. There is build in counter that goes from 0 to 255 becaus...