Determining communication direction in SPI ports

AI Thread Summary
Determining the communication direction on a two-wire SPI bus without a slave select line poses challenges due to the bi-directional nature of the data lines. Techniques such as using diodes and series resistors have been attempted but yield unclear results, particularly with open collector drives. One suggested method involves adding small capacitors at each data pin with resistors in series to create an RC delay, helping to identify which device is transmitting and receiving. Understanding the SPI protocol and analyzing the serial data with an oscilloscope can also aid in decoding the communication. This process is more complex than it appears, especially given the lack of documentation for the consumer-level devices involved.
fizz_it
Messages
29
Reaction score
0
Hi

I have to reverse engineer/decode the communication on a two wire SPI bus, there is no slave select line to help determine master and slave. How do I determine which side is communicating at any point in time? I think I can determine which side is the clock with a couple of back to back diodes. But the data line is more difficult. I have tried diodes and series resistors but I have difficultly interperating the results. The difficulty comes from probable open collector drives for the data lines.

What can I do?
 
Engineering news on Phys.org
I forgot most of SPI, read up the protocode and the interface, read the serial data with the scope and find out what's going on. Particular if you can control and send out certain command and data. I debugged interface like this before. This is a simple communication link, shouldn't be hard to figure out.
 
I understand the protocol and can list the data that comes out of the communications channel quite easily. The question is how do I determine the direction of the data without a slave select line? One side of the of the communication channel always clocks but I know that there is bi-directional communication. This is a more difficult problem than most people realize as most have never had to do this activity. The two devices are commercially available consumer level products for which there is no documentation.
 
I would temporarily put a small capacitance at each data pin, with a resistor in series between the two devices. Size the caps and resistor to give you just a little RC rounding of the edges. That will show you who is transmitting and who is receiving.
 
I'll give it a try, thanks!
 
Very basic question. Consider a 3-terminal device with terminals say A,B,C. Kirchhoff Current Law (KCL) and Kirchhoff Voltage Law (KVL) establish two relationships between the 3 currents entering the terminals and the 3 terminal's voltage pairs respectively. So we have 2 equations in 6 unknowns. To proceed further we need two more (independent) equations in order to solve the circuit the 3-terminal device is connected to (basically one treats such a device as an unbalanced two-port...
suppose you have two capacitors with a 0.1 Farad value and 12 VDC rating. label these as A and B. label the terminals of each as 1 and 2. you also have a voltmeter with a 40 volt linear range for DC. you also have a 9 volt DC power supply fed by mains. you charge each capacitor to 9 volts with terminal 1 being - (negative) and terminal 2 being + (positive). you connect the voltmeter to terminal A2 and to terminal B1. does it read any voltage? can - of one capacitor discharge + of the...
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Back
Top