Electronic – Multi node bus options


I want a master node consisting of a TI Stellaris Cortex M3 core connected to what can be up to 32 slave nodes of TI MSP430 (or possibly more Stellaris slave nodes). These will be maximally 0.5 meters between master to most distant slave. Bit rates of around 0.5-1mbps will be needed. What kind options are available for internal communications?

From docs they both seem to support SPI, UART and I2C.

  • SPI will from what I find, need 1 selector wire pr node. Way too many wires.
  • I2C seems easy, but for from docs I get the max speed is 400KHz. Too slow without degrading quality or maximum number of nodes.
  • UART seems to acheive the speed, but can it be used outside of A to B communication?
  • Did I miss anything?

Update: As noted in comments, updated I2C speed for msp430 to 400KHz. Still too slow though. Also the network is purely one master and n slaves.

Best Answer

I would suggest either RS485 or CAN; RS485 has the advantage of almost universal availability (if you've got a UART, you can have RS485; if your UART has automatic RTS control, you have a perfect RS485 solution). You can find cheap, small devices that will go up to several megabaud as well.

CAN is a little more robust, but if your microcontroller doesn't have the peripheral it can be an additional cost you're not willing to add to the project. CAN's main advantage over RS485 (IMO) is that in the case of bus contention, a complete message will still get through; If two devices start talking on an RS485 network, nothing intelligible is received and there is no built-in means of bus management, so you have to take care of this in software.

For your given speed and given that I don't believe the microcontrollers you mentioned have built-in CAN controllers, I'd suggest a token-based RS485 network. Essentially none of the nodes speak until it's their turn to speak, and this is done though the passing of a "token" (a short network message granting the use of the bus) to each of the nodes in turn. It's relatively easy to set up, is far more reliable than CSMA/CD and I think you could have something up and running within a day or so.