I2C Switch (Pca9545) - SMART Embedded Computing COMX-P2020 BSP User Manual

Hide thumbs Also See for COMX-P2020 BSP:
Table of Contents

Advertisement

5.4.5

I2C Switch (PCA9545)

The PCA9545 is a quad bi-directional translating switch controlled via the I2C bus#1. The
device's I2C address is: 0xE0(8-bit).
Chip Probe:
i2c dev 0
Setting bus to 0
i2c probe
Valid chip addresses: 50 70
The command "i2cswitch" can be used to connect and disconnect the I2C bus:
i2cswitch
Usage
i2cswitch connect I2CBusNo - connect I2C Bus to I2C Switch
i2cswitch disconnect I2CBusNo - disconnect I2C Bus to I2C
Switch
i2cswitch show - Show I2C Bus that connected to I2C Switch
Connect I2C Bus through PCA9545
The command: "i2cswitch connect" can be used to connect the channel 0 - 3 to I2C
Bus. For example, we can connect the channel 0 to I2C Bus:
i2c dev 0
Setting bus to 0
i2c probe
Valid chip addresses: 50 70
Excluded chip addresses: 29
=> i2cswitch connect 0
=> i2c probe
Valid chip addresses: 38 50 54 70
Excluded chip addresses: 29
=>
Once the channel 0 is connected to the I2C Bus, the other I2C chips (38, 54) can be
detected at the testing bed which connect the I2C#1 through channel 0:
Show the channel connected to the I2C Bus:
The command: "i2cswitch show" can be used to show all the channels that
connected to the I2C bus.
i2cswitch connect 0
i2cswitch connect 1
i2cswitch show
Connected I2C Bus: 0 1
COMX-P2020 BSP User Guide (6806800L84C)
U-boot Deployment
57

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COMX-P2020 BSP and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents