2020-09-10 01:15 PM
I'm a bit lost, so asking here. I'm currently writing the firmware for the device based on STM32F103RCT6 processor. I'd like to be able to have one master device and multiple slave devices, connect them and use the master device for managing other devices' settings. My initial idea was the following:
The idea was great, however:
So, questions:
Any help / advice is greatly appreciated.
2020-09-10 01:37 PM
1)
You've identified the issue. Slaves can't have the same address in I2C. There are ways to resolve bus contention like this but they're outside of the standard I2C tools. You could have each slave respond to the initial call with its unique identifier, and then for each bit, if the SDA line is driven low by another slave, drop off of the communication. This would let you assign unique addresses.
> I understand that most probably it's not clear what happens if I don't share the code
Activity on the bus taken with a logic analyzer or scope may be more useful than the code.
2)
I2C or CAN are probably best, depending on your speed requirements.