go_away

Author Topic: ? timer uC  (Read 2372 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
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,585
  • Helpful? 169
    • Society of Robots
Re: ? timer uC
« Reply #2 on: August 11, 2007, 10:28:26 AM »
first, what uC?

second, google for source code . . .

 

Related Topics

  Subject / Started by Replies Last post
30 Replies
11784 Views
Last post April 10, 2010, 05:56:17 PM
by corrado33
9 Replies
1096 Views
Last post September 28, 2010, 06:04:15 PM
by kidwidget
1 Replies
599 Views
Last post October 19, 2010, 01:22:17 AM
by knossos
5 Replies
428 Views
Last post February 16, 2012, 08:00:02 PM
by Soeren


Get Your Ad Here

data_list