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

From Cyber-Physical Systems Laboratory
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
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:
 +
 
 +
<pre>$TOSROOT/tos/platforms/intelmote2/hardware.h</pre>
 +
 
 +
On line 192, change 103 to be 94.
  
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]].
+
Another option is to change 103 to 95, which toggles GPIO pin 93 (this is better in that it does not conflict with ITS400 sensor board).  This maps to pin number 31 of connector J7.

Latest revision as of 04:56, 26 October 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.

Another option is to change 103 to 95, which toggles GPIO pin 93 (this is better in that it does not conflict with ITS400 sensor board). This maps to pin number 31 of connector J7.