www.8devices.com
|
|
|
Page 1 of 1
|
[ 1 post ] |
|
Author |
Message |
wtelecom
Joined: 24 Apr 2012, 10:46 Posts: 15
|
In case anyone is interested. To make the PCF8575 work with i2cget and i2cset a little trick is needed.
In my board I have a PCF8575 only using the first eight ports, 4 outputs and 4 inputs.
To disable/clear the 4 outputs i2cset -y 0 0x20 0xf0 0x00
To set the first output i2cset -y 0 0x20 0xf1 0x00
To set all the outputs i2cset -y 0 0x20 0xff 0x00
The trick is that the byte used in the "command" parameter of the i2cset command after the i2caddress is the first byte sent to the pcf8575.
Hope it helps.
|
22 Mar 2013, 11:16 |
|
|
|
Page 1 of 1
|
[ 1 post ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|