Page 1 of 1

Inter uC communication

Posted: Sun Oct 22, 2017 11:49 am
by Docara
Hello everyone,

What is the procedure and protocol to connect two (or more) microcontrollers together so that they can share some info.

It would be nice to use I2C purely because of limited wires between two locations. The data is minimal a few bytes occasionally .

Additionally, would it be possible to use this data to trigger an interrupt?

Thanks
Matt

Re: Inter uC communication

Posted: Sun Oct 22, 2017 12:49 pm
by medelec35
Hi Matt,
Have you seen this by viki2000
Some very interesting reading and example flowcharts.

Martin

Re: Inter uC communication

Posted: Sun Oct 22, 2017 12:51 pm
by kersing
Serial. Easiest to use and most controllers implement it in hardware. I2C would require slave mode which is not commonly available in hardware and is harder to handle.
CAN would be another option...

Re: Inter uC communication

Posted: Sun Oct 22, 2017 2:28 pm
by Docara
Thanks Martin

Re: Inter uC communication

Posted: Sun Oct 22, 2017 2:34 pm
by Docara
kersing wrote:Serial. Easiest to use and most controllers implement it in hardware. I2C would require slave mode which is not commonly available in hardware and is harder to handle.
CAN would be another option...

Hi Kersing

I'm juggling with other stuff which will be hanging off I2C (temperature sensors and addressable switches). I'm currently looking at CAN but also LIN. Serial would be nice between the two but the possible project is in a noisy environment and I have run out of room for a screened cable in the installed conduit.

Thanks
Matt

Re: Inter uC communication

Posted: Sun Oct 22, 2017 4:54 pm
by LeighM
RS485?

Re: Inter uC communication

Posted: Sun Oct 22, 2017 8:51 pm
by kersing
Docara wrote:Serial would be nice between the two but the possible project is in a noisy environment and I have run out of room for a screened cable in the installed conduit.
If the environment is too noisy for serial you should not even consider the i2c you mention in the original message as it is for short connections only and will not work well in a noisy environment.
CAN or other protocols using differential drivers should work.