I have a project which uses two Arduino Unos each of which are driving MCP23017 chips. The MCP23017 outputs are connected to LEDs.
The control between the UNOs and MCPs is I2C. As two independent Master/Slave configurations they are both working as expected and the results are good. However I need to make one of the Unos a controlling master such that it can trigger the second master as required.
I am able to control the second master using Master-Master I2C control, but only if I remove the Slave processing from the second configuration. When I try to combine the slave element of the second master the system freezes.
I have noted that it is the SCL bus wire which interconnects the two master/slave configurations that freezes the system - without it connected the two Master/Slave systems work independently ok.
Is it possible to configure two Master/Slaves on the same I2C bus?
I have seen on other topics a simple semaphore control between two Unos and that would work for me, but I thought I2C was more elegant!