now I have a problem about timeing accurately .
if i want to do some thing within a period , how to used the timer0 or 1 for counter ? I don’t konw the AVR timer very much , have anyone can show me some information or code example… thx…
when I used 8051 befor I can use the timer interrupt like this:
TimeOutCnt = 20;
TimeOut = 0;
while (!TimeOut)
{ my acctions ;}
unsigned long millis()
Description
Returns the number of milliseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days
Description
Specifies a function to call when external interrupt 0 or 1 occurs, on digital pin 2 or 3, respectively. Replaces any previous function that was attached to the interrupt.