Hi all
I know that the ATMega chips runs at 20MHz but the language seems to only include times in milliseconds. Is it possible to measure smaller time segments?
Cheers
Mark
Hi all
I know that the ATMega chips runs at 20MHz but the language seems to only include times in milliseconds. Is it possible to measure smaller time segments?
Cheers
Mark
Depends on what you mean by "measure". There's the [
delayMicroseconds()
](http://www.arduino.cc/en/Reference/DelayMicroseconds) function and the [
pulseIn()
](http://arduino.cc/en/Reference/PulseIn) function, both of which have microsecond resolution.
NOPs are 1 cycle long, for 62.5ns resolution on the 16MHz models.
-j
Thanks J - microsecond resolution is what I'm after.
Obviously should have checked the docs a bit more thoroughly
Just to clarify, the ATmega chip is capable of a 20MHz clock but the Arduino platform includes a 16MHz or 8MHz crystal. (The minis that run at 3.3V use a slower clock.)