[Tinyos-help] Timing issues - Tmote Sky - microsecond accuracy

Jose Araujo araujo at kth.se
Sat Jan 26 13:35:51 PST 2008


Dear All,

 

I am working with a Tmote Sky, and i am trying to use it in order to get
data from the ultrasound sensors to calculate the position of a robot.

 

I use one tmote for Tx and another to Rx. Here goes the list of “tools” that
I use in the program:

 

-          ReadNow from the ADC in order to read the pin

-          Printf

-          Alarm32KhzC – to call the ReadNow..in order to read the pin in a
32Khz frequency

-          Msp430CounterMicroC – to count the time..because I need a micro
second resolution

-          Message Reception..since I am sending the ultrasound plus a
message in the Tx and then I calculate the time difference

 

At the moment the program goes like this:

 

I tag the time when the msg arrives and then I tag it again when the
ultrasound arrives in the ReadNow event. Then I subtract the value and I
have the time between the msg and ultrasound. It seemed to be a good plan
but in fact I am having a lot of trouble with this:

 

-          Since I use the alarm.fired() event in order to call the
ReadNow() and both are async events I am not able to have the 32Khz..so the
better I can get is a 1ms period
instead of the 31.25us..

 

My question was if somebody has a better way to calculate this..to use
different functions that the ones I use at the moment..because I notice that
working with this processor and with this time restrictions I have a lot of
conflicts..

 

Thanks a lot for the help,

 

José

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080126/15fb65be/attachment.htm


More information about the Tinyos-help mailing list