Hey guys! I'm working on a project which is going using roughly 100 inputs and outputs, which is quite a daunting task for me. I'm using a Mega, which helps, but it seems as though I2C expanders are going to be my friend. I read that you can use multiple of the 8575 chips with the same I2C bus but I haven't been able to find any information as to how to go about doing this.
If someone could shed some light or point me in the right direction it'd be much appreciated!
Did you've read the data sheet? Can't find any information, really? Try Google.
I2C bus is based on addressing several devices so each device must have unique address. If we are discussing PCF8575 it is able to set address with pins A0-A2. Address in bits is then: 0 1 0 0 A2 A1 A0. There can be 8 PCF8575 on the bus it means 8*16 I/Os. That's it. Everything is in the data sheet.
Just a thought, why not a second Mega acting as a slave? (could save a lot of time and expense if you are going to make up a lot of boards).
Another option is there are some cheap boards for interfacing to LCD displays on Ebay, using the PCF8574 that can be adapted, only 7 I/O's but you can use 8 of them so possible 56 I/O's just change the address by soldering the links A0-2), (one port is for driving the back light on LCD but could be used to drive something else).
using the PCF8574 that can be adapted, only 7 I/O's but you can use 8 of them so possible 56 I/O's just change the address by soldering the links A0-2)
Just note that there is PCF8574A variant exists which has different beginning of the address PCF8574: 0100, PCF8574A: 0111 so the number of devices could be twice more.
Budvar10:
Just note that there is PCF8574A variant exists which has different beginning of the address PCF8574: 0100, PCF8574A: 0111 so the number of devices could be twice more.
Good point but unfortunately I would suspect most sellers on Ebay would not list which device their boards were loaded with, or even understand the difference.
Just had a look on Ebay, and noted there are some small PCB boards mounted with PCF8574 (8 I/O's) and some with PCF8575 (16 I/O's) so even easier.
New to the forum and not sure on the rules regarding posting links to Ebay so have not, but a search of the devices will soon through up some interesting finds.