6

I have two chips that are connected using two lines. One appears to be the clock line (50% duty cycle), but it doesn't have to be (sometimes constant high). The other line appears to be totally random, but still digital. It might be data.

There is a third line between the chips, but it appears to be for something else - it's on a way slower speed and is on another place on the PCB. It also doesn't use a pull-up, while the other two do.

How can I find out what protocol (I2C, SPI, RS232, ...) is being used on the lines, if any standard?

  • Might be related arduino.cc/forum/index.php?topic=19191.0 – cb88 Mar 26 '13 at 20:44
  • The only real way is to look at the traffic, apply each standard, and see if it works... The clock with sometimes constant high could an inverted clock for i2c with clock stretching, but that doesn't explain the third wire. – Robert Mason Mar 27 '13 at 3:03
  • 1
    @RobertMason I don't know the traffic, though I do know the devices are probably sending 8-bit bytes. The third wire does not have to be part of the protocol, it might be there for other purposes as well. – Keelan Mar 27 '13 at 6:52
  • 2
    It sounds like i2c with the third line irrelevant. – Mellowcandle Mar 27 '13 at 18:01
  • 1
    The easiest way to do this is to look at the chip datasheets usually. Then you don't need to do any work at all. – Cybergibbons Apr 4 '13 at 11:46
3

My guess is that the protocol is standard, using a non standard protocol between two devices involves using bitbanging which is not very useful. Let's assume then that the protocol is standard. It's not SPI, SPI needs 4 lines To work. I2C needs two, RS232 needs only two. I don't know what the third line job is, maybe it's used for trigerring/synchronization between the chips.

What now ? I would open the data sheet of the microcontroller and see what protocols the chips supports, usually if they are new 32bit SOC, they all support CAN, SPI, USART, etc. Then I would check the pinout of the corresponding lines, to see to which ports they are connected on the chip. This will point you to the exact protocol used.

Then connect a logic analyzer, such as this one, which is bundled with a software that can dumo the data transfered acordding to the protocol.

  • 1
    I have found bit-banging to be incredibly common in embedded systems. But the datasheet would be my first approach, especially if one of the two chips is not a microcontroller. – Cybergibbons Apr 5 '13 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.