8devices Community https://www.8devices.com/community/ |
|
i2ctools and pcf8575 https://www.8devices.com/community/viewtopic.php?f=1&t=377 |
Page 1 of 1 |
Author: | wtelecom [ 22 Mar 2013, 11:16 ] |
Post subject: | i2ctools and pcf8575 |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |