Hi all,
I am designing a system like a PLC where I need multiple ATmega to communicate each other, but I need more than one master as some of then needs to start the communication.
I see this is not possible over SPI. But I think for what I read that it is possible with I2C. The key thing is how can I accomplish this without having collisions or communication problems?
Thing to do is:
Case1: CPU1 wants to talk with CPU2, and starts the communication over I2C. NO PROBLEM.
Case2: CPU3 have some data to send to CPU1, tells over I2c that it has some data, and now CPU1 reads CPU3 over I2C.
It can't be done over I/O pins, not enough pins for the amount of CPU's! But it is all centralized over CPU1.
I know CPU1 can read over regular intervals all the other CPU's, but this is a lack of time, too slow and not optimal. As I am learning I want to find the right solution.
Thanks all!