Electronic – Communication between micro controllers – I2C, SPI, UART

communicationi2cmicrocontrollerspiuart

Basically I have two microcontrollers that I need to communicate with each other.

Both controllers send and receive data.

Basic idea that I have:

  1. I2C, SPI – What I think we can NOT use these protocols in this case. Because both are master slave based protocols. So if one controller is configured as master and other as slave, then in that case if the slave uC wants to transmit data then it can not initiate the transmission and it is also not allowed to generate the clock.

  2. UART – I guess this should work as it's asynchronous. So nobody is bound to be slave or master.

My question is, if the above made assumptions are right? If no then please correct me.

Best Answer

Your assumptions are correct, yes. SPI and I2C are both normally master/slave protocols, though there are ways of "bending" them to be able to work either way around.

But for simplicity, yes, UART is probably the easiest and most sensible.