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!
 
Hey guys. I have a question related to electricity and alternating current. Say an alien fictional society developed electricity, and settled on a standard like 73V AC current at 46 Hz. How would appliances be designed, and what impact would the lower frequency and voltage have on transformers, wiring, TVs, computers, LEDs, motors, and heating, assuming the laws of physics and technology are the same as on Earth?
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Thread 'Electromagnet magnetic field issue'
Hi Guys We are a bunch a mechanical engineers trying to build a simple electromagnet. Our design is based on a very similar magnet. However, our version is about 10 times less magnetic and we are wondering why. Our coil has exactly same length, same number of layers and turns. What is possibly wrong? PIN and bracket are made of iron and are in electrical contact, exactly like the reference design. Any help will be appreciated. Thanks. edit: even same wire diameter and coil was wounded by a...
Back
Top