[Tinyos-help] Questions about using I2C on MicaZ / MTS300 (TinyOS 2)

Thomas Wagner tw796021 at inf.tu-dresden.de
Wed Jan 3 12:50:45 PST 2007


Hi again,

Would you mind if I ask you another question?

We have to write our program (wich communicates with the Mote Network) 
in VB.net, so we are about to code some kind of message listener in 
.net. Now we're hanging in decoding / encoding our messages. In 
particular, building the checksum (which we think are the last 2 bytes 
before the "ending" (7E)). Could you give us a few tips about the 
algorithm? Could you also give us a little insight what Bytes 1 to 10 (0 
= "beginning" (7E)) mean? (We think that Bytes 3 and 4 are the 
destination address, Byte 7 the count of the payload bytes + checksum 
and Byte 9 is eventually the AM Type, but the other ones we don't know.)

Many Thanks...


Thomas

>
> Your usage of the I2CPacket interface looks right. Where are you 
> configuring the IO pins and activating the I2C device? The code there 
> has the operations commented out. If it's not on, then you might see 
> it hang. I've found I2C devices to be really finicky; often, the 
> fastest way to debug them us to go into Atm128I2CMasterPacketP.nc and 
> figure out which state the operation is failing in.
>
> I've attached a file for the I2C driver for an ADS7823 ADC device. 
> Hopefully it will help.
>
>
> Phil


More information about the Tinyos-help mailing list