0
\$\begingroup\$

USB 1.0 and 2.0 has D+ and D- two differential pins.

USB Pins

My understanding is that differential signals are symmetrical so any of the two lines carries an inverted signal of the other line.

But in the case of USB if I swap the two lines then the USB ceases to function. Is it because the USB lines are differential as well as tri-state logic also to reverse the data direction in them?

\$\endgroup\$
  • 1
    \$\begingroup\$ The USB receiver expects one line to be high and the other to be low, swapping them means that the signals do not come in as expected. I don't think I've seen any spec anywhere that shows USB as being "tri-state". \$\endgroup\$ – Ron Beyer Jul 29 at 13:58
1
\$\begingroup\$

At the receiver end, the Data- is substracted from Data+ (a difference is calculated). Then if the difference is positive, and above a threshold it is translated to a logic 1 or 0, depending on the protocol, if it is negative and below a threshold, it is translated to the opposite. By swapping the lines, you basically invert the logic levels, thus messing up the protocol.

Edit: Chris Stratton pointed out the non-differential use of the lines during speed identification. More info about this here

\$\endgroup\$
  • 1
    \$\begingroup\$ Yes, but there are also non-differential uses of the lines, including for initial speed identification. One of the first things that happens with a mixup is that a high or full speed device is mis-identified as a failed low speed device, and a low speed device is mis-identified as a failed full speed device. \$\endgroup\$ – Chris Stratton Jul 29 at 14:05
  • 1
    \$\begingroup\$ Information about the actual encoding can be found here: en.wikipedia.org/wiki/USB_(Communications) \$\endgroup\$ – vangelo Jul 29 at 14:35
  • \$\begingroup\$ @ChrisStratton Does it means that initially the USB lines are in non-differential state and after this initial phase once the USB is ready for data communication then the lines turn into differential lines? \$\endgroup\$ – alt-rose Jul 30 at 5:49

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.