On Wednesday 13 December 2006 04:02 am, Matteo Andretto wrote: > I would connect 2 Tmote Sky by I2C bus in TinyOS 2, one as > master and the other as slave, but I have some problems. > Master mote starts write operation, it sends slave address on bus, but > slave mote does not answer with acknowledge signal. > I have programmed slave mote with code suggested by Steve McKown in this > post > > http://tinyurl.com/ynyqhk > > It seems slave mote doesn't recognize its address, but I have checked > and it is correct in SlaveI2CConfC.nc > > Has Anyboy suggests?
My code was a hack used to do some bench testing. If I were you, I would get the TI MSP430 User's Guide from www.ti.com/msp430 and use it as a reference as you do some debugging on the I2C transaction code on the the slave code. For example, you can turn on a LED if the slave sees the start sequence (I2CIV_STT), and if so, then you can instead turn on the LED where the slave gets a read or write request (I2CIV_RXRDY, I2CIV_TXRDY). You can "walk" the LED debug code along the I2C process to find out where the code is broken. Take a look at I2CInterrupts.fired() in Msp430I2CP.nc. The problem might be electrical, but from prior posts I expect you've got this resolved. You need a pull-up resistor on (only) one mote between the SCL pin and DVCC. You need three wires connecting the two motes, between their SDA, SCL and Ground signals, respectively. One final thought: the code worked on TinyOS 2.0.0beta2-3. It's possible that changes to tinyos since then have made the hack I wrote invalid. Best of luck, Steve _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help