What bus should I use? I2C, SPI or something else?

I'm currently looking to design a number of devices that link together and require small amounts of data to be transfered between them quickly. These are the three possible configurations. The = symbol represents the data lines connecting the different devices.

+---+ +---+=======+---+ | A |========| B | | C | +---+ +---+=======+---+

+---+ | D |

+---+ +---+===+---+====+---+ | A |========| B | | C | +---+ +---+===+---+====+---+ | E | +---+

+---+ +---+ +---+ | B |========| A |=======| C |

+---+ +---+ +---+

Redundant wiring runs between B and C in the first two so that if a single cable breaks the system continues to operate. D and E are optional devices that sit along the bus. Approximate cable lengths are no more than 1.5 metres, with total cable run from end to end being up to 3 metres but no more. Power and ground would all be included in the cable runs, I can use any form of cable provided its not too big.

My core objective is allowing the master in device A to be able to connect to the other devices reliably at a fast speed in any of the above configurations. Differences in support components, termination if required, etc are not a problem as they boards will be customised for their purpose and position on the bus.

In addition I would like to know if one of the cable routes fail. I'm not sure how to detect a cable fault, especially if multiple cable runs exist between boards. Any suggestions?

Mike

Reply to
mjt
Loading thread data ...

Use asynchronous serial over RS-485, or use CAN. In either case change your topology to (where a single line is a twisted-pair bus):

.----. | | | | '----' .----. || .----. | |---------o----|o----------| | | |--------o|----o-----------| | '----' || '----' .----. | | | | '----' (created by AACircuit v1.28.6 beta 04/19/05

formatting link

If you really want the dual redundancy you'll need to put it in -- there's a lot more devices with one UART than two for RS-485, and CAN devices aren't so thick on the ground that you can jump up and down and insist on dual ports -- but there may be ones out there.

The advantage of this scheme is that you can choose to add in devices 'C' and 'D' at production time without changing code, and without putting in more opportunities for single-point failures beyond their drivers.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

CAN comes to mind, but since you mention SPI in your subject I'll rule that out for you. SPI is not addressable -- you need individual slave selects for each device, and it's not two-wire -- in/out/clk are separate. I2C is addressable and uses one data + one clk, but it's not really "ruggedized" like CAN, and the maximum length is much shorter.

--
Ben Jackson AD7GD

http://www.ben.com/
Reply to
Ben Jackson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.