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
Inter uC communication
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Inter uC communication
Hi Matt,
Have you seen this by viki2000
Some very interesting reading and example flowcharts.
Martin
Have you seen this by viki2000
Some very interesting reading and example flowcharts.
Martin
Martin
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Inter uC communication
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...
CAN would be another option...
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: Inter uC communication
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
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Inter uC communication
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.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.
CAN or other protocols using differential drivers should work.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis