Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI Maximum Distance for 16 Devices

Status
Not open for further replies.

lynch

Newbie level 6
Joined
Jul 3, 2007
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,371
spi distance

Hi
Im designing 4 cirucit boards, one is a processor module (PIC33F device) the other 3 are for sensor measurments, each has a simple A2D with (SPI) interface.

The circuit boards will be connected directly with a plug and socket arrangement (no wires).

What is the maximum distance you can use SPI over? (as i may design more boards in the future although the max distance will be less than 70cm).

Should i use some kind of SPI driver chip to help buffer the SPI from the processor?

Is SPI the worng way to go as i have been told I2C is most often used over long distances?

Thanks in advance for any advice
 

spi maximum distance

The distance will depend on the bus speed. 70cm is OK, question is, how fast do you want to go?
I've connected an SPI accelerometer with a ~1/2m cable, I was able to use 1.5MHz clock speed.
 

    lynch

    Points: 2
    Helpful Answer Positive Rating
spi distances

hey try to study the SPI specification i think there u will get all the details
 

spi long distance

Hi, Wirelength and speed and number of devices connected is what matters. So if you have 100 devices connected your speed will be lower but if you only have a few devices connected you can go 1 meter. Unless your enviroment has lots of noise !/
 

    lynch

    Points: 2
    Helpful Answer Positive Rating
spi bus distance

Guys,
I have up to 16 devices and our software engineers have specified a clock speed of 2MHz although this will most likely change during the development phase.

My environment is potentially very noisy (industrial) which means i must also isolate each SPI interface with appropriate opto's or equivelent devices i can find.

Anyone used any decent high speed, low If optos for isolating SPI?
 

spi interface distance

DO NOT SELECT SPI !!!.. Go For CAN Bus !. If you select SPI you will regret later you ever did !. Completely wrong choice for your application/enviroment
 

distance spi

Paul,
I would certainly like to use CAN bus but only one of the modules im designing has a processer with CAN the remaining modules just have SPI IC's thus no processor. Which meant SPI was the easy way to go forward.

I cannot use a processor on the remaining modules as the cost exceeds my budget.

Are there any usefull SPI to CAN interface IC's i can use without incurring the cost of a procesor/software etc?

Or can you suggest a different approach.

Cheers
Chris
 

isolating spi

Design a current loop for SPI yourself using Transistors etc... something like 10 - 20mA for high and 4mA for low... but do not use SPI just as is since it will give many problems. other options are LIN bus very low-cost and I believe Microchip makes a CAN chip with SPI interface :). Designing a low cost product is nice but if the cost is making quality or reliability bad your loosing only and have a low-cost non working product :)
 

    lynch

    Points: 2
    Helpful Answer Positive Rating
spi max distance

Paul ill look into this straight away, i have used some mA transmitters from TI before ill have a look at these and see what freq i can work with.

Ill also check out the CAN SPi devices
Thanks fo the advice
Chris
 

long distance spi

I agree with the other posts, do not use SPI in a noisy enviroment, use a differential bus like CAN or rs-422/485.
The microchip SPI CAN controller is the MCP2515, the CAN transceiver is the MCP2551.
 

    lynch

    Points: 2
    Helpful Answer Positive Rating
can spi

SPI and I2C can be extended beyond the spec. For example, have a look at Philips AN255-02, which describes the use of their PCA9511...PCA9518 'rugged I2C' transceivers.

As a side note, I wouls choose the I2C over SPI, because it may let you "daisy-chain" the sensor nodes in the field. SPI would require individual chip-select lines.
 

    lynch

    Points: 2
    Helpful Answer Positive Rating
Re: spi distances

vijaya_narayana said:
hey try to study the SPI specification i think there u will get all the details

If there is a specification
 
SPI distance

Other than using differential, I2C would be better at a distance, you can even get extender chips. If you wanted high speed, you would need MCUs with hardware I2C rather than bit banging.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top