7
\$\begingroup\$

I am currently designing a board where there is a UART, as well as SPI and I2C, should I length match or take care of differential pairs on those interfaces?

\$\endgroup\$
3
  • 3
    \$\begingroup\$ From your previous question, I assume you are still talking about a TI device, from the TI System Design Guidelines PDF (I linked it in my answer to your previous quesion) "An I2C bus should be routed such that the I2CxSCL and I2CxSDA signals follow similar layer transitions and stay within approximately 1000 mils of each other. It is not recommended that these signals be routed as a differential pair and there is no length-matching requirement for them." \$\endgroup\$
    – Tyler
    Jun 8, 2016 at 14:59
  • 2
    \$\begingroup\$ UART, SPI and I2C I consider low speed and as such intricate length matching, impedance matching and differential signals are not needed. That does not mean they can differ a factor 10 in length. But if one connection is 50 mm long and the other is 60 mm, it will work. Best case: route the wires close to eachother like Tyler says and everyone else does and it will work fine. \$\endgroup\$ Jun 8, 2016 at 15:05
  • 2
    \$\begingroup\$ @FakeMoustache it will also work if one connection is 50mm and the other is 5mm. A factor of 10 is not really a criterion here. \$\endgroup\$ Jun 8, 2016 at 15:08

2 Answers 2

7
\$\begingroup\$

No, these signaling types don't need length matching. Operating at 1.2kbps-115.2kbps (UART), 100kbps-1.5Mbps (I2C), or up to about 50Mbps (SPI) over the usual board-level or cabled (UART) distances, the signal wavelength is still much longer than the electrical medium size. The signal quality will not be predominantly influenced by the electrical length of the conductor, but by parameters such as parasitic capacitance and the strength of pull-up resistors. A general rule of thumb is if the signal wavelength is less than 10x or 20x the size of the electrical medium, transmission lines are required and it is a "high speed design."

Additionally, none of the interfaces use differential signaling, if UART is RS-232. There are serial standards like RS-422 and RS-485 that use differential (balanced) signaling.

\$\endgroup\$
5
\$\begingroup\$

This answer assumes that the traces/wires are not so long as to require terminations to prevent reflections.

On all of them No.

For UART transmissions they are unidirectional in transmit and unidirectional in receive i.e. you send the signal and it gets received and maybe some form of asynchronous reply is sent back. Clocks are not sent and not required but it is different on SPI.

For a simple master to slave SPI transmission, clock and data arrive at the same relative phase at the far end and, if that is all the transmission is about then great - no further worries because at the slave end data is clocked into the slave synchronously and if there is a few nano second differences in timing due to slight length mismatches this isn't going to hurt things.

However, if the slave is expected to synchronously respond to the master a potential problem occurs because the data received at the master is displaced from the clock edges seen at the slave. This is now due to the end-to-end time delay because of the length of the SPI bus traces.

Normal SPI and IIC deal with this by not allowing lengths of traces to be massively long - if they are then you have to use a slower data rate. This is the bigger problem by far compared to keeping traces the same length.

\$\endgroup\$

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