9 years ago.

How can I do if I connect 2 or more device on one I2C port on mbed?

How can I do if I connect 2 or more device on one I2C port? Because different thread should access the I2C at the same time. Thanks

1 Answer

9 years ago.

You can not access two devices on one I2C port at the same time. There are two solutions for this problem. 1. Use two I2C ports and connect two devices to different ports. 2. Use two devices in arbitrated fashon, like round-robin scheduling.

Thanks for your kindly reply. Yes, I think the second way is the right choice for some hardware, but I can not find the source code to do this, and I should find the right place to place the code, mbed API, mbed common or mbed HAL API ......

posted by Aaron Huang 08 Apr 2015