microseconds
is there way measure microseconds? want find out interval between events (in case, bytes received arduino) , milliseconds bit crude.
there not call measuring microseconds.
you use delaymicroseconds() , polling repeatedly wait while , check rough idea of how long was.
you @ tcnt1 16 bit register increments every 4 microseconds in standard arduino configuration. going roll on frequently, , should block interrupts around reads it, this...
... assumes know interrupts off when started. (true normal arduino code).
you use delaymicroseconds() , polling repeatedly wait while , check rough idea of how long was.
you @ tcnt1 16 bit register increments every 4 microseconds in standard arduino configuration. going roll on frequently, , should block interrupts around reads it, this...
code: [select]
cli();
myvar = tcnt1;
sei();... assumes know interrupts off when started. (true normal arduino code).
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > microseconds
arduino
Comments
Post a Comment