Other Parts Discussed in Thread: PCF8575
hi all
my board = evm8168
my ezsdk = ti-ezsdk_dm816x-evm_5_01_01_80
my rootfs = tar from the ti-ezsdk_dm816x-evm_5_01_01_80/filesystem/ezsdk-dm816x-evm-rootfs.tar.gz
i want to control leds connected to pcf8575 (U13)
this is my log
root@dm816x-evm:~# i2cdetect -l
i2c-1 i2c OMAP I2C adapter I2C adapter
i2c-2 i2c OMAP I2C adapter I2C adapter
root@dm816x-evm:~# i2cdetect -r 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
20: 20 -- -- -- -- 25 -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
----------------- SW2[3:0] = 0001 --------------------------
root@dm816x-evm:~# i2cget 1 0x20
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-1, chip address 0x20, current data
address, using read byte.
Continue? [Y/n]
0xfe
---------------------------SW2[3:0] = 0000 ----------------------
root@dm816x-evm:~# i2cget 1 0x20
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-1, chip address 0x20, current data
address, using read byte.
Continue? [Y/n]
0xff
--------------------------------in order to turn on the leds -----------------------
root@dm816x-evm:~# i2cset 1 0x20 0 0x0f
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will write to device file /dev/i2c-1, chip address 0x20, data address
0x00, data 0x0f, mode byte.
Continue? [Y/n]
--------------------------now all leds are light ------------------------------
-------------------------- read -------------------------
root@dm816x-evm:~# i2cget 1 0x20
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-1, chip address 0x20, current data
address, using read byte.
Continue? [Y/n]
0x00
---------------------------- now in order to turn off leds ----------------------------------
root@dm816x-evm:~# i2cset 1 0x20 0 0xff
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will write to device file /dev/i2c-1, chip address 0x20, data address
0x00, data 0xff, mode byte.
Continue? [Y/n]
--------------------------------------read ------------------------------------------
root@dm816x-evm:~# i2cget 1 0x20
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-1, chip address 0x20, current data
address, using read byte.
Continue? [Y/n]
0x00
root@dm816x-evm:~#
1 . why my setting does not work
2. how can i use /sys interface to operate i2c
thank you for any help