when on rs232 two cts collide: will it kill the device? - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: July 11, 2019, 09:30:23 am
content: so, one week ago I got a phone call by a customer claiming that some of his equipment was not working and they sent me the whole inside a parcel. They assembled the cables by their self, and the software doesn't use any handshake, but rather a NULL-modem setup, which weirdly manifested a randomly bad behavior, so they phoned me thinking the problem was in the electronics.After some inspection, I found out that pin 7 and pin 8 on their RS232 serial cable are swapped.Pin7 is RTS, inputPin8 is CTS, outputThis means that the host (a laptop? a computer? whatever they used) had its CTS signal wired to the CTS signal of the equipment, two outputs signals wired together in a collision.host CTS --------------?-------------- CTS equipmentI haven't visited this customer yet, and I wonder if this kind of mistake in cables wiring can cause permanent damage.What do you think?

author: legacy
author_rank: Super Contributor
timestamp: July 11, 2019, 09:35:45 am
content: CTS0 = host CTSCTS1 = equipment CTSCode:CTS0 CTS1 current0 0 no current flows0 1 current does flow -> any damage?1 0 current does flow -> any damage?1 1 no current flows

author: AndyC_772
author_rank: Super Contributor
timestamp: July 11, 2019, 09:43:39 am
content: I've never seen a serial interface physically damaged this way. Getting inputs and outputs swapped is incredibly common.

author: nfmax
author_rank: Super Contributor
timestamp: July 11, 2019, 10:15:03 am
content: IIRC, it is a design goal and a requirement of the RS-232 standard that any pin can be connected to any other pin without causing damage, if the transmitters & receivers are in specification.

author: legacy
author_rank: Super Contributor
timestamp: July 11, 2019, 10:24:30 am
content: ok, that's reassuring, thanks guysJust a note. The equipment doesn't use any handshake, the software is NULL-modem (it only uses TX and RX), but the customer reported a randomly reset of their equipment only for cables with pin 7 and pin 8 swapped. What I wonder is: what did cause the random reset? In theory, since the software doesn't use the CTS, those reset should haven't happened(probably there is more to investigate)

author: GromBeestje
author_rank: Frequent Contributor
timestamp: July 11, 2019, 10:33:20 am
content: Even when the pins aren't used in software, they do have some state. Is the equipment also made by yours, so you can be sure it doesn't care etiher? Also, some boards (such Arduino) (ab)use the RTS pin to RESET the device, might this reset mechanism be implemented in your equipment?

author: Kleinstein
author_rank: Super Contributor
timestamp: July 11, 2019, 10:41:38 am
content: With some not so good designed drivers the CTS-CTS connection may draw more current than expected and this way result in a temporary malfunction (e.g. charge pump does no longer deliver enough voltage). Still it should normally not cause a crash - this is more like a windows thing.Even if not used the false handshake signal could stop the transmission on the PC side.

author: legacy
author_rank: Super Contributor
timestamp: July 11, 2019, 11:12:24 am
content: Quote from: GromBeestje on July 11, 2019, 10:33:20 amNo the equipment is not made by me, I am the software guy in this case, working on a thirdy party hardware.Quote from: GromBeestje on July 11, 2019, 10:33:20 amYup, even the MIT "Handyboard" and its clone "Fingerboard" (m68hc11 boards made in the 90s) used a similar mechanism to reset the board on firmware upload, but it was possible to exclude it by a jumper.It just costs 0.10 Euro, and it doesn't take too much space on the PCB, but Arduino does not have any jumper.Anyway, according to the documentation, my customer's equipment doesn't have a reset-mechanism wired to RTS.

author: nali
author_rank: Frequent Contributor
timestamp: July 11, 2019, 11:16:33 am
content: Just to muddy the water a little bitNote that the function of CTS can be either an input or an output depending on whether the equipment is a DTE (e.g. a PC) or DCE (modem)DTE - inputDCE - Output

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 11, 2019, 12:45:11 pm
content: I recall that RS232 drivers are supposed to be protected against short circuits. That's not to say a 7c Shenzhen market special is guaranteed to survive, of course.