Close

Allow shoot-through?

A project log for piculear

Coercing the GPIO of an arbitrary device to control a simplistic PIC programmer.

psmaypsmay 03/11/2014 at 21:440 Comments

TL;DR summary: Are the resistors I've placed between the drains of complementary MOSFETs really necessary?

The Vpp and Vdd power switches in my current draft are conceptually based on a mix of the switches from the PICkit 2. (Follow along in the PICkit 2 User's Guide, appendix A, if you like.)

In the original circuit, the Vpp switch consists of a low switch (on signal "MCLR TGT"), which is just an NPN transistor, and a high switch (on signal "Vpp ON") that is an NPN transistor whose output is pulled up to the high Vpp voltage and fed into a PNP transistor, which switches the high voltage into the output. The outputs of the low and high switches are tied together with a 100-ohm resistor, presumably to avoid a "shoot-through" condition blowing either of the transistors during the transition while neither high nor low transistor is fully turned off. The two input signals are controlled independently, making hi-Z output possible.

The Vdd switch is decidedly different, but similar. MOSFETs are used, and the level shifting seems a bit less involved (because the programmer's own voltage and the target Vdd are similar enough that the extra input transistor is not necessary). There are still two distinct input signals ("Vdd TGT N" and "Vdd TGT P"), so the output can still go hi-Z. Though the schematic makes it harder to read, there is still a resistor between the two outputs, this time 1K, and there is also a Schottky diode from the high side, which appears to relate to the fact that the target may be self-powered and thus assert its own voltage (which could be higher than Vdd of the programmer). If the target voltage were too high, current would back up through the body diode of the PFET (and, in the PICkit 2, through that of the target Vdd adjustment PFET, into the programmer's Vdd rail) which could be nasty.

My current draft of the schematic includes two nearly identical switches that combine elements of these two. Both have a level-changing input transistor, mostly in the interest of allowing the programmer to be 3.3V but be able to program at 5V (or higher). On the Vpp switch, the transistors are changed to MOSFETs because it seemed to be an opportunity to factor out unnecessary base resistors.

My draft also retains the 100 and 1K shoot-through resistors. I'm trying to decide whether these are actually necessary for my version of the circuit.

I've seen similar MOSFET-based topologies that don't place any resistor between the P and N drains, even when their gates are tied together rather than separately controlled as they are here. The excuse seems to be that, since MOSFETs have a positive temperature coefficient (PTC), they don't have to be protected from the condition in the same way as BJTs which have negative (NTC); in a sense, they behave as their own polyfuses. By this logic, either of the resistors might be unnecessary.

So, does anyone have any input regarding whether this is the case?

Discussions