[Tinyos-devel] inconsistency between Telos and MicaZ I2C addressing

Philip Levis pal at cs.stanford.edu
Thu Sep 20 13:00:58 PDT 2007


On Sep 14, 2007, at 3:50 PM, Xiaofan Jiang wrote:

> Hi,
>
> I recently came across an inconsistency between Telos and MicaZ I2C  
> addressing scheme when I was porting my telos program to micaz.
>
> In Telos, the least significant 7 bits of the i2c address argument  
> is used whereas in MicaZ the most significant 7 bits is used.
>
> For example, to address an I2C device with the address 1010101, in  
> Telos, the command would be something similar to:
>
> call I2CPacket.write(I2C_START | I2C_STOP, 0x55, 1, &buff);
>
> but in MicaZ it would be:
>
> call I2CPacket.write(I2C_START | I2C_STOP, 0xAA, 1, &buff);
>
> It seems like those two should agree in one way or another.

Agreed -- the MSP430 and atm128 maintainers should figure this out.  
IIRC, Jonathan Hui wrote the MSP430 implementation, and I wrote the  
atm128.

As a programmer, which do you think was more intuitive, right- 
justified or left-justified? I think I implemented the atm128 the way  
I did because that's how a datasheet wrote it.

Phil


More information about the Tinyos-devel mailing list