Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
Does i2c slave work correctly
I`m trying to use i2c_slave on the Seeduino Arch Pro connected to a raspberry Pi and getting some unexpected results .
if I set the slave address to 0x80 and do a "i2cdetect -y 1" it showing up as address 0x41 ( should be 0x40 ) and if I change the slave address to 0x40 it showing up as 0x19 ( should be 0x20 ) , and 0x30 not showing up at all.
Not sure if it the raspberry Pi , which is not the best platform for i2c , but the other chip which are connected to same bus show up.
1 Answer
10 years, 8 months ago.
As this points out, the 7 bit i2c address is actually shifted one bit left, with the R/W bit as the 8th - least significant bit - in the address. Could that be what you're seeing? I use an I2C temp/barometer sensor on an RPi and it works fine.
http://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html