Hi,

I used external interrupts for similar purposes. I enabled interrupts 
(call Interrupt.enable()), set the edge transition (e.g., call 
Interrupt.edge(TRUE)), set a certain microcontroller pin of some TelosB 
motes as an input pin (by a command like call Port21.makeOutput()), and 
connected the pins to the output of a function generator (I had to make 
a kind of a simple "splitter" with a voltage divider, which connected 
the generator's BNC plug to 2.54 pin connectors previously mounted on 
motes' boards and connected to microcontrollers' pins). Whenever a pulse 
edge arrived (one per second), a respective interrupt happened (e.g. 
event Interrupt.fired()) and the interrupt handler performed reading of 
the timer.

I did this experiment, because I needed timestamps of different motes at 
the same moment (when a rising edge appeared on the pins) to compare the 
clock drift rates of the motes. You can make the same testbed and reset 
motes' timers when the first edge arrives (instead of reading timers). 
The function generator  (e.g. Agilent 33220A which has LAN and GPIB 
interfaces) can be controlled by some soft running on a PC - I don't 
know, something like LabView.

Anton.




Philip Perold wrote:
> I am currently  playing around with the routing layer on tmote sky 
> modules. In order to measure precise latency, I need some sort of 
> synchronization to take place between the pc (where the base station 
> is connected), and the other motes. At the moment I have millisecond 
> counters running on each mote. My idea is to connect all the motes to 
> the pc, simultaneously, and then reset all of them at a scheduled time 
> (the individual counters would then all be zero'd at a known time). I 
> know how to reset the motes with the embedded code (set the watchdog 
> variable), but the order needs to come from the pc. I presume it would 
> be done with some java app and the serialforwarder, or something of 
> the sort, I just don't know exactly how. Any help would be greatly 
> appreciated.
>
> Philip
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


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

Reply via email to