Pages: [1]   Go Down
Author Topic: SPI line length  (Read 2169 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

hello,

Is there limit for SPI wire length for connecting devices ?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 202
Posts: 8711
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: April 12, 2011, 09:23:11 pm by TeslaFan » Logged

Linux and Arduino, two great things that go great together!
http://www.roboticcore.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8474
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley, 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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: