5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



4.2 Viewing IIC Bus Line Peripherals Using I2C Tools

Posted by Fiona Su on

Here is a general introduction to the use of i2c-tools:

Installation:

apt-get install libi2c-dev i2c-tools

Detecting devices mounted on the i2c bus:

Use i2cdetect to detect several sets of i2c buses on the system:

i2cdetect -l 

Detecting devices mounted on the i2c bus:

Use i2cdetect to detect devices mounted on the i2c-1 bus:

i2cdetect -r -y 1

image.png 

View the values of all device registers:

Use i2cdump to view the values of all device registers:

i2cdump -f -y 1 0x40

image.png 

0 comments

Leave a comment

Please note, comments must be approved before they are published