Toggling an External Pin on the Imote2

From Cyber-Physical Systems Laboratory
Revision as of 04:56, 26 October 2009 by Liangfok (talk | contribs) (→‎TinyOS 2.x)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.