On Sat, 24 Feb 2007 Ankur Kamthe wrote : >Hi Joe, > >I tried with the pullup resistor on the SCL lines, but still couldnt >get any response on the Cyclops side. I then viewed the i2c clock and >data signals on an oscilloscope once with the tmote connected to the >cyclops and then with a micaz. The signals appear totally different in >the two cases. (Waveform photos: >http://www.flickr.com/photos/[EMAIL PROTECTED]/ ) > >In case of the micaz, the data lines are pulled high after the write >is completed (address of device + data written to the bus) whereas in >case of the tmote the clock lines are high and the data lines remain >low after the first byte and nothing else seems to be transmitted. On >the tmote, the leds toggle indicating a write and writeDone event but >the oscilliscope shows no change on either lines till the mote is >reset. > >> From the I2C specification description, it says that slave holds the >clock lines low to force the master into a wait state. In my case, the >slave device does not try to force a wait state but doesnt allow a >transfer to continue as well. > >I am pasting code snippets for the micaz, tmote and cyclops programs >in the space below. In the program, I used different interfaces for >the micaz and tmote but I use the same set of parameters (slave >address, data) in both cases. I am puzzled by this behavior and would >deeply appreciate any further help in this matter. > >thanks, >ankur. > >FOR MICAZ: >In Configuration file: >MoteI2CRelayM.I2CPacket -> I2CPacketC.I2CPacket[0x80]; > >In Implementation >call I2CPacket.writePacket(2,(char *)imgData, 0x00); > >FOR TMOTE: >In configuration file; >SimpleResponderM.I2CPacketMaster -> I2CPacketC.MSP430I2CPacket; >SimpleResponderM.I2CStdControl -> I2CPacketC.StdControl; >SimpleResponderM.ResourceCmd -> I2CResourceC; > >in implementation file: >interface MSP430I2CPacket as I2CPacketMaster; > >// when user button is pressed, call task >task void getImageTask() { > imgData[0] = imgResolution; > imgData[1] = SEGMENTSIZE; > atomic {i2c_task = GET_IMAGE_TASK;} > call ResourceCmd.request( RESOURCE_NONE ); >} > >// After the resource is granted >event void ResourceCmd.granted(uint8_t rh) { > imgData[0] = 64; > imgData[1] = 64; > call I2CPacketMaster.writePacket(rh, i2c_slave_addr, 2, (char*) (imgData)); > call ResourceCmd.release(); >} > >event void I2CPacketMaster.writePacketDone(uint16_t addr, uint8_t >length, uint8_t* data, result_t success) { >if (!success) { > call Leds.redToggle(); >} >else { > call Leds.greenToggle(); > } >} > > >CYCLOPS: >In Implementation file: >event char *I2CPacketSlave.write(char *data, uint8_t len) { > call Leds.redToggle(); > return data; >} >_______________________________________________ >Tinyos-help mailing list >[email protected] >https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
