Maximum length of SPI bus MCF51JM128

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Maximum length of SPI bus MCF51JM128

7,509件の閲覧回数
rizq
Contributor I

Hi all

 

I am a college student trying to utilize SPI protocol as a method of communication between a master (MCF51JM128) and three AVR microcontroller for my final project. I wonder, is there any limitation regarding bus/cable length to implement the SPI? I have read somewhere that the cable length should not be longer than 20 cm. Is that right?

 

Thanks in advance

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

3,565件の閲覧回数
TomE
Specialist II

It depends on the clock speed and whether the bus is terminated or not. I also depends on the cable type.

 

It is possible to make SPI go "for ever" if you don't mind a clock speed of a few HERTZ (I'm kidding, kilohertz) and redesign all the drivers and so on.

 

What you want to know is the maximum length for the hardware you have. Some of the manufacturers may have given a recommendation in their documentation.

 

It all depends on the signal integrity. Put an oscilloscope on the pins and look at the signal quality. If you see undershoots, overshoots, ringing, reflections and so on you might be in trouble.

 

If you do need to lengthen the cables you'll need to learn about transmission line theory, and check the speed of light against the clock rate and the cable delay too.

 

Tom

 

 

 

0 件の賞賛
返信

3,565件の閲覧回数
rizq
Contributor I

I use clock speed of ~2MHz. The cable length that i need is probably not longer than 30cm, and i use ordinary copper wire without shielding (sorry, i don't know the type). Is this configuration reliable enough?

 

Thanks in advance

0 件の賞賛
返信

3,565件の閲覧回数
TomE
Specialist II

"Put an oscilloscope on the pins and look at the signal quality." still applies. You're playing with electrons. Sometimes you have to look at them.

 

I can't see your wire from here :smileyhappy:

 

The "wire" should be twisted pair, with a ground twisted with each signal wire, or it should be a flat-flex cable with every alternate pin being a ground wire.

 

You shouldn't rely on the power supply grounds to be the return for the signals.

 

1MHz has a 300 meter wavelength in air and about half that in wire, so you're probably not going to run into speed of light problems at that clock rate. If the SPI drivers (that you're connecting to your cable) have a slew rate of a new nanoseconds, then the frequencies there are going to notice a foot of cable.

 

Are these boards professionally designed with connectors and cabling designed to be plugged together like this, or are they something you've designed.

 

This stuff is all part of the project.

 

Tom

 

0 件の賞賛
返信