Difference between revisions of "Toggling an External Pin on the Imote2"

From Cyber-Physical Systems Laboratory
Jump to navigationJump to search
Line 1: Line 1:
Sometimes toggling an external pin is useful when evaluating an Imote2.  By toggling this pin at certain intervals, an oscilloscope can be used to measure the latency of an operation.  The following instructions describe how to toggle pin 14 of interface J7 via the Leds.redOn and Leds.redOff interface.
+
Sometimes toggling an external pin is useful when evaluating an Imote2.  By toggling this pin at certain intervals, an oscilloscope can be used to measure the latency of an operation.  The following instructions describe how to toggle pin 14 of interface J7 via the interface that controls the red LED.
 +
 
 +
See the [[media:Imote2-ds-rev2_2.pdf|Intel Imote2 Engineering Data Sheet]] for the locations of interface J2 and pin 14.
 +
 
 +
When measuring the voltage of pin 14, it is high when red is off and low when red is on.
 +
 
 +
== TinyOS 1.x ==
  
 
Open the following file:
 
Open the following file:
Line 5: Line 11:
 
<pre>$TOSROOT/tos/platforms/imote2/hardware.h</pre>
 
<pre>$TOSROOT/tos/platforms/imote2/hardware.h</pre>
  
One line 141, change 103 to be 94.
+
On line 141, change 103 to be 94.
 +
 
 +
== TinyOS 2.x ==
 +
 
 +
Open the following file:
  
This maps the red LED control pin to be GPIO 94, which is exposed as pin 14 of J7 as shown on page 5 of [[media:Intel.ITS400.DataSheet.pdf|Imote2 engineering manual]].
+
<pre>$TOSROOT/tos/platforms/intelmote2/hardware.h</pre>
  
When measuring the voltage of pin 14, it is high when red is off and low when red is on.
+
On line 192, change 103 to be 94.

Revision as of 01:44, 22 September 2009

Sometimes toggling an external pin is useful when evaluating an Imote2. By toggling this pin at certain intervals, an oscilloscope can be used to measure the latency of an operation. The following instructions describe how to toggle pin 14 of interface J7 via the interface that controls the red LED.

See the Intel Imote2 Engineering Data Sheet for the locations of interface J2 and pin 14.

When measuring the voltage of pin 14, it is high when red is off and low when red is on.

TinyOS 1.x

Open the following file:

$TOSROOT/tos/platforms/imote2/hardware.h

On line 141, change 103 to be 94.

TinyOS 2.x

Open the following file:

$TOSROOT/tos/platforms/intelmote2/hardware.h

On line 192, change 103 to be 94.