HelloWorld program for PCA9547: an I2C bus multiplexer control library. PCA9547 is an I2C multiplexer which enables to select 1:8 multiplexed I2C bus. The multiplexer is useful for deviding I2C bus to avoiding slave address conflict and separating capacitive loads. For more information about PCA9547: http://www.nxp.com/documents/data_sheet/PCA9547.pdf
What is this?
This is a sample code to demonstrate the PCA9547. The PCA9547 is a 8 channel multiplexer for I2C bus.
The code shows how the bed can access the I2C device (LM75B) through PCA9547.
Demo hardware block diagram
Connection between mbed and PCA9547
For more information, please visit component page.
--- a/main.cpp Tue Jul 01 00:10:44 2014 +0000 +++ b/main.cpp Tue Jul 01 00:28:38 2014 +0000 @@ -7,6 +7,7 @@ PCA9547 mux( p28, p27, 0xE0 ); mux.select( 0 ); + mux.disable( ); LM75B tmp0( p28, p27 ); // making instance after a branch of I2C bus (which is connecting the LM75B) enabled