I think the solution I said is a bit "complex" :) I've tried another option, I think low low level :)
Components:
components HplMsp430GeneralIOC as GeneralIOC;
Wiring:
ModuleC.DigA -> GeneralIOC.Port23; // This is pin#3 from the
6-pin connector
ModuleC.DigB -> GeneralIOC.Port26; // This is pin#4 from the
6-pin connector
In your application module (named ModuleC) you must define these interfaces:
uses interface HplMsp430GeneralIO as DigA;
uses interface HplMsp430GeneralIO as DigB;
Documentation for this interface:
http://www.tinyos.net/tinyos-2.1.0/doc/nesdoc/telosb/ihtml/tos.chips.msp430.pins.HplMsp430GeneralIO.html
You can use "selectIOFunc()" command to set pin for I/O funcionality, and then, e.g. "makeOutput()" to set pin direction to output, etc.
Regards, Jose A. ------------------------------------------------------------------------ El 15/12/2010 2:13, "José A. Tarifa" escribió:
I've tried to use these functionality... and it seems it works!! :D Components: components HplMsp430GeneralIOC as GeneralIOC; components new Msp430GpioC() as DigitalA; components new Msp430GpioC() as DigitalB; components new Msp... (etc). Wiring:DigitalA -> GeneralIOC.Port23; // This is pin#3 from the 6-pin connector DigitalB -> GeneralIOC.Port26; // This is pin#4 from the 6-pin connectorModuleC.DigA -> DigitalA; ModuleC.DigB -> DigitalB;And then, in your application module (named ModuleC) you must define these interfaces:uses interface GeneralIO as DigA; uses interface GeneralIO as DigB; For example, if you want to set pin#3 to output, you write call DigA.makeOutput(); If you want to set pin#4 to "1" (like output), you can write: call DigB.makeOutput(); ... call DigB.set(); http://www.tinyos.net/tinyos-2.1.0/doc/nesdoc/telosb/ihtml/tos.interfaces.GeneralIO.htmlI hope to help you... if you need further help... ask to the mailing list :)Regards, Jose A. ------------------------------------------------------------------------ El 15/12/2010 0:11, Joey Wilson escribió:Hello all,I am trying to figure out an easy way to turn on/off a digital output from the TelosB hardware from TinyOS software. I have been searching the web and found that some people say to use the MSP430GeneralIOC component in the application wiring, but this is not working. I have tried a lot of variants and can't seem to figure it out. Could anyone explain how to wire the MSP430's general IO components correctly?Thanks for your time. _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help-- Jose A. Seville, Spain _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
-- Jose A. Seville, Spain
<<attachment: jostargal.vcf>>
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
