wondering if its ok to set 2 i2c IC's (same type) to the same address if they need to preform the same function.
idea being (this is for a multi room audio switcher) that the same status updates can be displayed in a remote area as well as on the front panel without having to write a 2nd round of code just for the front panel.
if this is possible for outputs (leds etc) would it also be possible to have the function inputs (buttons) also or would this error out as it will be receiving the same info from 2 sources ?
wondering if its ok to set 2 i2c IC's (same type) to the same address if they need to preform the same function.
idea being (this is for a multi room audio switcher) that the same status updates can be displayed in a remote area as well as on the front panel without having to write a 2nd round of code just for the front panel.
if this is possible for outputs (leds etc) would it also be possible to have the function inputs (buttons) also or would this error out as it will be receiving the same info from 2 sources ?
Thanks
Jesse
Each 'device' attached to a I2C bus must have it's own unique address, so what you asking to do is not possible and could only lead to problems. However many I2C device ICs have the ability to respond to different address by hardwiring a pin to positive voltage or to ground to modify it's default address. So if you could identify the specific IC(s) you are considering we could check if they can be set up for alternate I2C addresses.
im not sure what type of IC's im going to use yet,
ive designed all main PCB that does all the switching and volume control for a 4x4 matrix, as everything will interface on i2c i can design bits at a time,
this is mainly for the wall plates to be put in each room and if i could replicate each wall plate on the main system front panel, i might just use a screen and send the info to it if i have to code further.
I saw in an Adafruit project where two I2C LEDmatrix displays show the same output when they are wired to the same address. It is in the eyes of this demon costume, if you are keen on some reading: link to explanation.
That certainly uses the concept you suggest, so I'd be inclined to give it a try.
The only problem is that I2C is an interaction between master & slave - the slave has to send back an ACK bit as part of the message.
If both devices do not respond identically, there could be problems with the interface getting hung up.
CrossRoads:
The only problem is that I2C is an interaction between master & slave - the slave has to send back an ACK bit as part of the message.
If both devices do not respond identically, there could be problems with the interface getting hung up.
So, likely safe, with the caveat that they all have to be the same device type sharing any one address?
idea being (this is for a multi room audio switcher) that the same status updates can be displayed in a remote area as well as on the front panel without having to write a 2nd round of code just for the front panel.
How much time are you trying to optimize? As it is for a display (human reader) timing cannot be that critical I assume or ...
You can optimize the send communication by only send info when the numbers have actually changed.
You need to buffer the state of the remote display for that of course.
I was thinking to use LEDs as volume / zone indicators on the wall plates as i cant find a screen that will fit nicely on one - also its not really needed on the wall plates,
the idea was to duplicate each wall plates buttons and leds on the main systems front panel, but i think ill just install an LCD screen on the front panel for status updates, and like you said with both just hold in buffer as it wont change very much at all.
i was also thinking of using arduino minis (DIL ones) in each of the wall plates to expand them further int eh future given they are only $12 each and the coding on each one will really be the same (just an i2c address change with jumpers on the back) but still unsure, given each one will already have i2c connections its not that hard to expand them anyway ...