On Monday 04 June 2007 05:07, Joan Cortes wrote:
> I'm trying to use in Tmotes the exclusive Digital I/O 0, 1, 2 and 3. I
> use the command TOSH_MAKE_GIO0_OUTPUT(); in the StdControl.init() and
> later I set or clr the pins in the application when appropriate. However
> I couldn't use the GIO0 and GIO1, even when I make also outputs the ADC2
> and ADC3, the set and clr instruction don't work when pointing to GIO0
> and GIO1. Therefore I have been using ADC2 and ADC3 names to make it
> work. Any one knows how to solve this problem?
Setting the IO direction won't help if the given port pins are set to
peripheral mode. I believe that all of the msp430 TinyOS platforms set the
Port6 pins by default to module function (aka ADC).
Assuming this invocation has been made:
TOSH_ASSIGN_PIN(GIO0, 6, 0)
Then you can use:
TOSH_MAKE_GIO0_IOFUNC()
to put the pin into IO mode. Now, a call to
TOSH_MAKE_GIO0_OUTPUT()
will make a difference on the physical pin's state.
See $TOSDIR/chips/msp430/msp430hardware.h for details.
BTW, if you're using TinyOS-2.x, you might want to look at using the Low Level
IO componentry instead, as defined in TEP 117 section 2. Low level IO
componentry affords a more modular way to connect logic to digital IO
resources.
> Additionally, using the Pong application, I don't know why the
> destination address always appears as 0 in the output RSSI,LQI files. I
> checked application.nc and java code and everything seems right. Any
> idea?
Sorry, can't help you with this one.
Steve
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help