Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Determining communication direction in SPI ports

  1. Jul 26, 2012 #1
    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?
     
  2. jcsd
  3. Jul 26, 2012 #2
    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.
     
  4. Jul 27, 2012 #3
    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.
     
  5. Jul 27, 2012 #4

    berkeman

    User Avatar

    Staff: Mentor

    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.
     
  6. Jul 27, 2012 #5
    I'll give it a try, thanks!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Determining communication direction in SPI ports
  1. Serial Port (Replies: 3)

  2. USB communication (Replies: 2)

  3. Serial communication (Replies: 12)

Loading...