I2C: Diferență între versiuni

De la YO3ITI
Sari la navigare Sari la căutare
Linia 19: Linia 19:
I2C Block Read                  yes
I2C Block Read                  yes
</syntaxhighlight>
</syntaxhighlight>
i2cdetect  is  a  userspace  program to scan an I2C bus for devices. It outputs a table with the list of detected devices on the specified bus. i2cbus  indicates  the number or name of the I2C bus to be scanned, and should correspond to one of the busses listed by i2cdetect -l.  The optional  parameters first and last restrict the scanning range (default: from 0x03 to 0x77).
<code>i2cdetect</code> is  a  userspace  program to scan an I2C bus for devices. It outputs a table with the list of detected devices on the specified bus. <code>i2cbus</code> indicates  the number or name of the I2C bus to be scanned, and should correspond to one of the busses listed by <code>i2cdetect -l</code>.  The optional  parameters first and last restrict the scanning range (default: from 0x03 to 0x77).
<syntaxhighlight lang="shell">
tom@raspberrypi:~ $ sudo i2cdetect -l
i2c-1 i2c      bcm2835 (i2c@7e804000)          I2C adapter
i2c-11 i2c      bcm2835 (i2c@7e205000)          I2C adapter
i2c-0 i2c      i2c-11-mux (chan_id 0)          I2C adapter
i2c-10 i2c      i2c-11-mux (chan_id 1)          I2C adapter
</syntaxhighlight>
 
<syntaxhighlight lang="shell">
<syntaxhighlight lang="shell">
tom@raspberrypi:~ $ sudo i2cdetect -y 0
tom@raspberrypi:~ $ sudo i2cdetect -y 0

Versiunea de la data 23 iulie 2020 17:25

I2C Probing

tom@raspberrypi:~ $ sudo i2cdetect -F 0
Functionalities implemented by /dev/i2c-0:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Block Write                yes
SMBus Block Read                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Block Write                  yes
I2C Block Read                   yes

i2cdetect is a userspace program to scan an I2C bus for devices. It outputs a table with the list of detected devices on the specified bus. i2cbus indicates the number or name of the I2C bus to be scanned, and should correspond to one of the busses listed by i2cdetect -l. The optional parameters first and last restrict the scanning range (default: from 0x03 to 0x77).

tom@raspberrypi:~ $ sudo i2cdetect -l
i2c-1	i2c       	bcm2835 (i2c@7e804000)          	I2C adapter
i2c-11	i2c       	bcm2835 (i2c@7e205000)          	I2C adapter
i2c-0	i2c       	i2c-11-mux (chan_id 0)          	I2C adapter
i2c-10	i2c       	i2c-11-mux (chan_id 1)          	I2C adapter
tom@raspberrypi:~ $ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Specificații

Utile

Discuții de prin forumuri