Thanks for your reply again.

I am not sure how precise is the LocalTime interface - but since it is
provided by the LocalTimeMicroC component which is wired to Msp430TimerA,
(now as you said in your previous mail  that the TimerA which clocks at
1Mhz) i would expect it to give near MicroSecond precision.

Moreover as LocalTime.read() is an async command, it might take some 10+
cycles handling the interrupt - which is nominal, but reduces the precision.
So we might loose some precision there.

Somnath Mitra


On Wed, Jun 18, 2008 at 1:47 AM, Eric Decker <[EMAIL PROTECTED]> wrote:

>
>
> On Tue, Jun 17, 2008 at 11:25 PM, Shomnat Mitra <[EMAIL PROTECTED]> wrote:
>
>> Thanks for the reply.
>>
>> One more related question.
>>
>> I used the LocalTimeMicroC component in Tinyos1.x, and wired the LocalTime
>> interface to my application, to measure the time difference between the
>> sending of a packet and receiving an ACK(using GenericComm ).
>>
>> I just did:
>>
>> sendTime = call LocalTime.read(); // just before sending
>>
>> and
>>
>> receiveTime = call LocalTime.read(); // upon receiving the ack packet
>>
>> and computed
>>
>> timeDiff = receiveTime - sendTime
>>
>> This is giving me values like: 14,857
>>
>> So is this value in exact Microseconds? If it is - then I think I am
>> getting decent values: 14.8 ms - time to send a packet and receive its ack.
>
>
> That is how I would read it.
>
> In T2, I'd use TMilli and the call looks like call LocalTime.get().  Do you
> really need uS resolution?
>
> eric
>
>
>>
>>
>> Somnath Mitra
>>
>>
>>
>> On Wed, Jun 18, 2008 at 12:57 AM, Eric Decker <[EMAIL PROTECTED]> wrote:
>>
>>>
>>>
>>> On Tue, Jun 17, 2008 at 8:35 PM, Shomnat Mitra <[EMAIL PROTECTED]>
>>> wrote:
>>>
>>>> Hello ,
>>>>
>>>> The telosb has a 32768 Hz crystal.
>>>>
>>>> So the lowest precision of time that it can measure is :
>>>>
>>>> 1/ 32768 seconds = 30.517us
>>>
>>>
>>> That is the underlying clock running timerB which is used to provide
>>> TMilli.
>>>
>>>>
>>>>
>>>> So when we use a Timer<TMicro> interface , is this precision we get ?
>>>
>>>
>>> TMicro is actually based on the main system clock running TimerA.  It
>>> clocks at 1MHz
>>> and the 32K timer is used to calibrate it.  This is the timing source
>>> used for TMicro.  You
>>> really do get close to 1us ticks.
>>>
>>> eric
>>>
>>>
>>>>
>>>>
>>>> What about LocalTime.get() 's precision ?
>>>>
>>>> Thanks in advance ,
>>>> Somnath Mitra
>>>>
>>>> _______________________________________________
>>>> Tinyos-help mailing list
>>>> [email protected]
>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>>
>>>
>>>
>>>
>>> --
>>> Eric B. Decker
>>> Senior (over 50 :-) Researcher
>>> Autonomous Systems Lab
>>> Jack Baskin School of Engineering
>>> UCSC
>>>
>>
>>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
> Autonomous Systems Lab
> Jack Baskin School of Engineering
> UCSC
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to