| Electronics > Projects, Designs, and Technical Stuff |
| Multi microcontroller communication |
| (1/5) > >> |
| servoGuy:
Dear friends, I would like to build some modular system to be able to use my previously designed hardware and stack boards up according to my needs. (e.g. anlog card, 24V IO card ...) I am currently hanging at the protocol and hardware for the communication. I would definitely like to be flexible in the total number of boards I stack together so I would not like to use standard SPI which needs a slave select. I thought about USART or SPI with ss always enabled. The protocol therefore would have to define some kind of identifier so the slave boards know when to respond. Do you have any recommendations? What kind of physical layer is used in modern PLC-systems? Looking forward to any recommendations or literature to get some inspiration. |
| ataradov:
The problem with SPI for this application id that you will have a hard time convincing MCUs to not drive MISO line when SS is permanently enabled. If super high speeds are not required, then I2C seems like a good option. |
| ogden:
You shall check CAN bus. It could be what you are looking for. |
| nctnico:
It depends a bit on how much intelligence is available on the boards. If the boards are inside the same (small enclosure) and there isn't more than 20cm of cable in total then I2C may be an option. Still I'd like to warn you that getting a distributed system up&running reliably is much harder than it seems. You'll need to account for the situation where a board doesn't respond at all and bring the system in a safe state nevertheless. |
| rstofer:
Here is a general purpose multi-master protocol based on RS485 which is just a driver chip after the UART. I suspect it might be overkill but it is about as general as a protocol can be. http://bdmicro.com/code/robin/ I used this for a Halloween project one time and it worked well. |
| Navigation |
| Message Index |
| Next page |