Society of Robots - Robot Forum
Software => Software => Topic started by: henry on July 27, 2007, 04:21:39 AM
-
how to get a time of interupt in uC??
example : I make the first interupt..and then the second....
I want to know the time between the first and the second interupt...
thanks
henry
-
Use a timer, set a proper prescale
Set the Timer counter(e.g TCNT) to zero in the first interrupt.
Read the timer counter value in the 2nd interrupt, which will give you the time inbetween the interrupts..
-
first, what uC?
second, google for source code . . .