
Originally Posted by
Demon
I separated the input and output MCP23016 because I plan to have 8 of each later. I am only using one now to test the system.
Robert

Since the MCP (like most other I2C Devices) has 3 address bits you can have up to 8 devices of the same type sharing one bus.
For more than 8 (up to 16) devices of the same type share SCL for all of them and have separate SDA for each set of 8.
So to communicate with 16 Devices of the same type you need three Ports on the PIC.
I don't use the MCP, I prefer the PCF8574.
There is an "A" version available that has a control-byte different from the "non A" version, so you can have up to 16 (8x"A" & 8x"non A") devices sharing one pair of SDA cnd SCL lines.
Last edited by Demon; - 4th October 2016 at 18:10.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks