Terminating and Routing SPI

  • Thread starter saad87
  • Start date
In summary, the conversation discusses using source terminations for SPI signals going to an external PCB. The speaker plans to use a buffer and resistor to terminate SCK and MOSI signals, but is unsure about how to effectively terminate the MISO signal with multiple slave ICs. They mention using a potentiometer to empirically determine the appropriate source resistor value.
  • #1
saad87
85
0
I'm looking for some advice regarding how to terminate SPI signals which are going to an external PCB. I know that SPI isn't meant for board to board communication but in this case the connecting ribbon cable is short - about 6" max length.

My frequency isn't high, just 2 MHz but I have rising edges of about 4-7 ns which are causing issues. Here's what I'm thinking for in the next revision of the board: the "main" PCB needs to connect to 4 external PCBs each of which has two SPI slaves. I'm using a 10 wire ribbon cable and I should have each alternating wire has a ground.

To route SCK and MOSI I have a buffer just before the off board connectors. This dual buffer buffers SCK and MOSI. Each output drives a max. of two SPI slaves (because there's a buffer per PCB). Right at the buffer I have a source terminator resistor whose value I intend to find empirically. To illustrate:

MOSI and SCK from uC -> Buffer -> Ribbon Cable to nth PCB -> SCK and MOSI drive two SPI slaves.

So far so good - the slaves are located fairly near to each other so I think source termination will work OK here for both MOSI and SCK.

My main concern is regarding MISO. How do I effectively route and terminate this line? There's just one load (the master) but several slaves. Do I use source termination for this as well? Each slave could have a source resistance and the traces can join at some point on the slave PCB and then travel via the ribbon cable to the master. To illustrate:

Slave #1's MISO -> Source Resistor ___________________________ -> Ribbon Cable.
Slave #2's MISO -> Source Resistor ______________|

The ____ represents the trace on the PCB.

Note: I have already tried to slow down the rising edges on the current revision via series resistances. This works well but only to an extent. I feel I should make the effort to have proper termination on the next revision of the board.
 
Engineering news on Phys.org
  • #2
Yes, source terminations are the way to go with SPI. How far apart are the slave ICs? I think I would use a source resistor for each slave's MISO signal, but if they are all within a couple cm of each other, you might be able to get away with a single source termination resistor.
 
  • #3
BTW, it is probably easiest to empirically determine the value for the source resistors. Just put a potentiometer in the position and tune it to minimize the ringing...
 

1. What is terminating and routing SPI?

Terminating and routing SPI (Serial Peripheral Interface) is a communication protocol commonly used in electronic devices to transfer data between microcontrollers and peripheral devices. It allows for synchronous, full-duplex communication between two devices, with one acting as the master and the other as the slave.

2. How does terminating and routing SPI work?

In terminating and routing SPI, the master device sends a clock signal to the slave device, along with data that needs to be transmitted. The slave device then sends back a response to the master, also synchronized with the clock signal. This process continues until all the data has been transmitted.

3. What are the advantages of terminating and routing SPI?

Terminating and routing SPI has several advantages, including high data transfer rates, simple hardware implementation, and the ability to connect multiple peripheral devices to a single master device. It also allows for full-duplex communication, meaning data can be transmitted and received simultaneously.

4. What types of devices typically use terminating and routing SPI?

Terminating and routing SPI is commonly used in devices that require high-speed communication, such as microcontrollers, sensors, memory devices, and display screens. It is also used in applications where multiple devices need to communicate with each other, such as in automotive and industrial control systems.

5. Are there any limitations or drawbacks to terminating and routing SPI?

Although terminating and routing SPI has many advantages, it also has some limitations. It is a synchronous protocol, meaning devices must be synchronized with the clock signal, which can be a challenge in some applications. It also requires more pins and wires compared to other protocols, which can be problematic for small devices with limited space.

Similar threads

  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
4
Views
1K
Replies
5
Views
1K
Replies
2
Views
3K
  • Classical Physics
Replies
1
Views
2K
  • Electrical Engineering
Replies
23
Views
4K
  • Electrical Engineering
Replies
11
Views
13K
Replies
13
Views
7K
  • Electrical Engineering
Replies
5
Views
13K
  • Electrical Engineering
Replies
24
Views
4K
Back
Top