I retraced the "wiring" of the SHT11 of the MTS400 sensorboard and found this in ~/xbow/tos/sensorboards/mts400: #define HUMIDITY_SET_CLOCK() TOSH_SET_PW3_PIN() // sbi(PORTC, 3) #define HUMIDITY_CLEAR_CLOCK() TOSH_CLR_PW3_PIN() // cbi(PORTC, 3) #define HUMIDITY_SET_DATA() TOSH_SET_INT3_PIN() // sbi(PORTD, 3) #define HUMIDITY_CLEAR_DATA() TOSH_CLR_INT3_PIN() // cbi(PORTD, 3) #define HUMIDITY_MAKE_DATA_OUTPUT() TOSH_MAKE_INT3_OUTPUT() // sbi(DDRD, 3) #define HUMIDITY_MAKE_DATA_INPUT() TOSH_MAKE_INT3_INPUT() //cbi(DDRD, 3)
Does this mean that the DATA pin of the SHT11 is connected in *PortD3* and the SCK to PortC3? If the answer is yes, why does the schematic diagram of the MTS400 < www.xbow.com/support/.../MTS-MDA_Series_Users_Manual.pdf> shows that the DATA pin of SHT11 is connected to INT3 (*PortE7 of the Atm128L*)? Can someone clarify to me this thing? On Wed, Mar 10, 2010 at 5:22 PM, Mark Patrick Cabrera <[email protected] > wrote: > Hi everyone! I am having a problem interfacing an SHT11 sensor into a Micaz > mote. > > From the SensirionShtLogicP.nc, I got a return FAIL message from these > lines: > error_t waitForResponse() { > call DATA.makeInput(); > call DATA.set(); > call CLOCK.set(); > if (call DATA.get()) { > // the device didn't pull the DATA line low > // the command wasn't received or acknowledged > return FAIL; > } > call CLOCK.clr(); > return SUCCESS; > } > > Retracing the wiring of the DATA interface, I found from > HalSensirionSht11C.nc that: > SensirionSht11LogicP.DATA -> HplSensirionSht11C.DATA; > > Now I'm not sure if I got the right connection for the DATA interface. This > is my revised code of the HplSensirionSht11C: > configuration HplSensirionSht11C { > provides interface Resource[ uint8_t id ]; > provides interface GeneralIO as DATA; > provides interface GeneralIO as SCK; > provides interface Interrupt as InterruptDATA; > } > implementation { > components HplAtm128GeneralIOC; > > // components new Msp430GpioC() as DATAM; > // components new Msp430GpioC() as SCKM; > // components new Msp430GpioC() as PWRM; > > // components new HplAtm128GeneralIOPinP() as DATAM; > // components new HplAtm128GeneralIOPinP() as SCKM; > // components new HplAtm128GeneralIOPinP() as PWRM; > > // DATAM -> HplAtm128GeneralIOC.PortE7; > // SCKM -> HplAtm128GeneralIOC.PortC3; > // PWRM -> HplAtm128GeneralIOC.PortC0; > DATA = HplAtm128GeneralIOC.PortE7; > SCK = HplAtm128GeneralIOC.PortC3; > // DATA = DATAM; > // SCK = SCKM; > > components HplSensirionSht11P; > HplSensirionSht11P.PWR -> HplAtm128GeneralIOC.PortC0; > HplSensirionSht11P.DATA -> HplAtm128GeneralIOC.PortE7; > HplSensirionSht11P.SCK -> HplAtm128GeneralIOC.PortC3; > ... > > Can someone help me check if I got the connections right? I revised these > codes from the application that uses Msp430 (telos) instead Atm128 (micaz) > > Thank you in advance for those who will help. > > Mark Patrick Cabrera > Patrick
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
