Hello ,

This millisecond level timer is a binary precision millisecond level timer.

1 sec = 1024 binary milliseconds

so, a call like Timer.start(TIMER_REPEAT, 40) has  frequency 25.6 Hz

as timer fires every = 40 binary milliseconds = 40/1024 (real seconds) =
0.0390625 (real seconds)

So frequency in Hz = 1/0.0390625 (real seconds) = 25.6 Hz

Hope this helped.

Somnath Mitra


Date: Wed, 9 Jul 2008 19:07:34 +0100
From: "Rafael Aguilar Velez" <[EMAIL PROTECTED]>
Subject: [Tinyos-help] Timer function in TinyOS
To: <[email protected]>
Message-ID:
       <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Dear all,



I would really appreciate if you could help me. I am using TinyOS and I am
trying to understand the Timer function. As I have read the units are
(depending if I am using Tmili) in binary milliseconds; it means a function
of 1024 ticks per second. My doubt is this because I don't know if this is
correct or if the function is just in milliseconds (a function of 1000 ticks
per second).

For example if I define the function like: call Timer.start(TIMER_REPEAT,
40)? means that I am working with sensors reading periodically 25.6Hz or
25Hz?



Thank you very much for your answers



Rafael
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to