Electronics > Projects, Designs, and Technical Stuff
Multi microcontroller communication
<< < (3/5) > >>
David Hess:

--- Quote from: ogden on December 26, 2018, 12:37:58 am ---For lower end systems USB could be good idea to consider - due to vast number of various microcontrollers with built-in USB FS device peripheral.
--- End quote ---

The reason I did not recommend USB is that it cannot operate on a shared bus.  If point to point connections and a hub are acceptable, then USB might be a solution although I am not sure it would be better than Ethernet.

ogden:

--- Quote from: David Hess on December 26, 2018, 01:24:01 am ---
--- Quote from: ogden on December 26, 2018, 12:37:58 am ---For lower end systems USB could be good idea to consider - due to vast number of various microcontrollers with built-in USB FS device peripheral.
--- End quote ---

The reason I did not recommend USB is that it cannot operate on a shared bus.  If point to point connections and a hub are acceptable, then USB might be a solution although I am not sure it would be better than Ethernet.

--- End quote ---

TP Ethernet is point-point and requires switch/hub as well. Please tell me which is better - nail or screw? Hammer or screwdriver? USB is easier to implement, much more popular in microcontrollers, needs less resources (flash/ram/power). On the other hand Ethernet is multi-master network which could be considered as huge advantage, also you may "spread" your modular device all over the place, not necessarily single chassis needed.
David Hess:

--- Quote from: ogden on December 26, 2018, 04:35:36 am ---TP Ethernet is point-point and requires switch/hub as well. Please tell me which is better - nail or screw? Hammer or screwdriver? USB is easier to implement, much more popular in microcontrollers, needs less resources (flash/ram/power). On the other hand Ethernet is multi-master network which could be considered as huge advantage, also you may "spread" your modular device all over the place, not necessarily single chassis needed.
--- End quote ---

10/100 Ethernet can operate over a shared media which is essentially what a hub, but not a switch, creates.  In the past this was commonly seen with 10BASE2.  A hub is required for 100 Mbit/s Ethernet because otherwise the stub length would be too long but this would not be a problem in an embedded application where the stub length can be controlled and very short.

Whether current 10/100 Ethernet MACs still support the functions required for CSMA/CD is the problem but since they still work with hubs, it seems likely.
speakerguy:
At work we have legacy systems that use a 9-bit addressed UART scheme for multi-processor communications. Newer stuff is all CAN. Our data rates are not high though.
SiliconWizard:
If your system allows one master only and several slaves, the simplest IMO would be to use RS485 or any LVDS phy interface on a 2-wire bus. The interface itself after the phy transceivers can be a simple UART. Just implement a protocol with at least the address of the slave in its header. Control the TX/RX state on the master and each slave according to the state it's in (listening or talking). That's straightforward. 10Mbit/s is no problem as long as your MCUs' UARTs allow it. A lot of RS485 transceivers can handle 20Mbit/s. LVDS transceivers can get you much higher than that as well.

If your system can be a multi-master topology, that gets trickier as you'll need to handle collisions and such. In that case, using an existing complete solution such as CAN would probably be easier.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod