[Tinyos-help] Need help with recording the time difference between 2 events

Kartik Siddhabathula siddhabathulakartik at yahoo.com
Thu Apr 29 22:25:23 PDT 2010

Hi Eric,
Please find attached my code. The problem that I am facing is inconsistent result. Am getting the value for the difference of the two events as FFFFAD / FFFF63 in hex. That makes it 16777059 in int and nearly 16384 secs when divided by 1024 whereas the difference between the two events is hardly 10/15 secs. So, am not convinced with the results. Please advice.
Thanks in advance,Kartik

--- On Thu, 4/29/10, Eric Decker <cire831 at gmail.com> wrote:
From: Eric Decker <cire831 at gmail.com>
Subject: Re: [Tinyos-help] Need help with recording the time difference  between 2 events
To: "Kartik Siddhabathula" <siddhabathulakartik at yahoo.com>
Cc: "TinyoS help" <tinyos-help at millennium.berkeley.edu>
Date: Thursday, April 29, 2010, 11:53 PM

I've used localtime<TMilli> with out trouble.  What kind of problems have you had with it?  Keep in mind that its resolution is a mis (binary millisecond, 1/1024 second).
For higher resolution timing I just grab the value of TAR the timer register which is set up for 1uis ticks.   1/(1024*1024) seconds.

On Thu, Apr 29, 2010 at 5:42 PM, Kartik Siddhabathula <siddhabathulakartik at yahoo.com> wrote:

Hi All,

I am using tinyos-2.x and telosb motes. I am looking to record the time difference between two events. Can I use moteclockp.nc to get the difference? LocalTimeMilliC is not giving accurate results. Am having a lot of trouble with it.

Please help.

Thanks in advance,


Tinyos-help mailing list

Tinyos-help at millennium.berkeley.edu


Eric B. Decker
Senior (over 50 :-) Researcher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100429/c5b374e2/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BroadcastC (1).nc
Type: application/octet-stream
Size: 3644 bytes
Desc: not available
Url : https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100429/c5b374e2/attachment.obj 

More information about the Tinyos-help mailing list