Go Down

Topic: SPI line length (Read 2507 times) previous topic - next topic

hello,

Is there limit for SPI wire length for connecting devices ?

johnwasser

Depending on your cable and transmission speed there WILL be a distance beyond which it will not work reliably.  I have no idea if it's possible to calculate.  Perhaps you should just try it and see what happens.  For maximum distance you'll want to use minimum bit rate.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Graynomad

Do you have a particular length in mind?

Worst case it you either bit bang the SPI and run it really slow, or use line driver chips, that would get you a few km I would think.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

TeslaFan

#3
Apr 13, 2011, 04:19 am Last Edit: Apr 13, 2011, 04:23 am by TeslaFan Reason: 1
LOL

No, you can't bit bang the SPI. The slowest it can possibly go is clock / 128.

It's a synchronous transfer. The Master and Slave have to be in close proximity. Like... on the same PCB.

Go with... 1 foot max distance and you'll be good.

Dude! Did you really mean to use km? Kilometers? Really?
Linux and Arduino, two great things that go great together!
http://www.roboticcore.com

Graynomad

Quote
No, you can't bit bang the SPI.

Why not? I've done so many times. Not using the SPI hardware of course, just pick 3 pins and wiggle the bits.

Quote
Dude! Did you really mean to use km? Kilometers? Really?

Well I haven't actually tried it :), but if you use RS-485 drivers and run fairly slow I don't see why not. RS-485 is rated for 1200m at 100kbps but would do longer at slower speeds I would think.

Quote
It's a synchronous transfer. The Master and Slave have to be in close proximity. Like... on the same PCB.

That's basically true and the way it's normally used, but you can think outside the square.

Of course if you really needed that line length SPI would not usually be the best choice. OTOH say you want a 7-segment display running from a few shift registers 300m away. If you use async you have to add a remote processor, with SPI  you just need a shift register.

(note I use the term SPI to mean any clock/data style sync protocol which may or may not use real SPI hardware)

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up