go away spammer

Author Topic: ? timer uC  (Read 4095 times)

0 Members and 1 Guest are viewing this topic.

Offline henryTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
? timer uC
« 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
   

Offline iNFINITE

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
    • iNTBOTS.iNFO | My Homepage
Re: ? timer uC
« Reply #1 on: July 27, 2007, 05:34:53 AM »
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..

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: ? timer uC
« Reply #2 on: August 11, 2007, 10:28:26 AM »
first, what uC?

second, google for source code . . .

 


Get Your Ad Here