# Protecting against reverse polarity

I'm building a JTAG programmer for the old Motorola 56k devices and I want to add some circuit protection before having some boards built. I'm more of a firmware/digital guy, but here's what I came up with based on this TI whitepaper. However, I was told it would not work because (I believe, this was a few weeks ago so my memory is foggy) because I wouldn't get current to turn on/off the transistors.

The idea is not necessarily to protect against the technician from reversing the programmer orientation, but rather to provide some protection in the case that the device being programmed is powered backwards. So, in other words, in the case that the 56K is powered backwards (something I'm guilty of doing because the wire colors were reversed on the unit I was given), it would more or less damage the programmer too.

So the idea is that pins 4,5, and 6 should normally be connected to ground and pin 11 should normally be connected to 3.3V. But if the polarity is reversed on the candidate device, the opposite would have happened. In this case, my hope is that both the PMOS and NMOS transistors would be turned off, thus preventing current flow. Based on the above diagram, is this true? Is there something else I need to do to make it work? Perhaps switching out the transistors for relays to avoid the aforementioned current flow issue?

---Edit---

Here's a higher-level diagram of what I'm trying to do.

simulate this circuit – Schematic created using CircuitLab

Of course, assume various DC-DC converters are present in the DUT to step down from 24V to 3.3V

• What exactly are you trying to protect against? The 56K is a chip so you are worried the board it's attached to might be connected backwards to power? Is the JTAG port powering the device or is there another supply? – Spehro Pefhany Apr 26 '18 at 15:01
• I am not familiar with the 56K, but I suppose it has the usual protection diodes. In this case, just putting some resistors on the out-going signals would cause the power dissipation in the 56K to be much higher than in your programmer. – Makotanist Apr 26 '18 at 15:02
• @SpehroPefhany the 56k is the device I'm programming. I'm not trying to protect that (it's already protected and not my design). I'm designing a JTAG programmer for it (because the chip is ancient and I need a newer solution). I want to protect the JTAG programmer I'm designing (which is designed on an 8051 chip). The connector shown in the schematic is the ribbon cable to be attached to the device under test. I'll edit my question with a higher-level diagram. – audiFanatic Apr 26 '18 at 15:09
• Reversing the usual 2x20 JTAG connector shorts out the supply so there is typically no damage. – Spehro Pefhany Apr 26 '18 at 15:20
• @SpehroPefhany I just inserted a diagram illustrating the problem. I'm not worried about reversing the JTAG connector (I've done it myself with my prototype and saw no damage, as you point out. I'm worried about reversing the DUT polarity... that causes real damage... and it does happen from time to time. – audiFanatic Apr 26 '18 at 15:29