Searching \ for 'More on (ab)use of PIC protection diodes & bad des' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'More on (ab)use of PIC protection diodes & bad des'.

Truncated match.
PICList Thread
'More on (ab)use of PIC protection diodes & bad des'
1999\10\09@012315 by Russell McMahon

picon face
Re allowing current to flow in PIC protection diodes, various people have
said-

> The "specification" is an Absolute Maximum Rating.  The only thing these
> ratings are good for is to ensure the PIC won't burn out, i.e. suffer
> permanent damage.

> There is no specification for a current through the
> protection diodes durring operation that won't disturb proper operation.
> The closest they come to specifying that is specifying the input voltage
> ratings.  We'd have to assume that the maximum "normal operation" current
> allowed through a protection diode is zero.

/Mike is absolutely right.
/
/EXTERNAL clamps are needed to prevent the reverse protection
/diodes being biased on, for normal operation.
/
/Thanks for clarifying.
/
/-Barry.
/------------

All good stuff.


MANY people over time on this list have supported the use of the PIC's
internal diodes to clamp signals to an acceptable level.
DON'T DO IT.
The PIC is guaranteed "safe" at up to 20ma protection diode current.
The PIC is NOT guaranteed to work properly with ANY protection diode
current.

It will often (even "usually") work "OK".
It is unacceptable design practice.
It is not guaranteed to work.
There is no certainty what the results on the processor will be.
Sometimes a whole design will fail because of it.
Thjere will often be no indication of what is wrong.

The "proper" way is to externally limit the voltages external ti the PIC as
noted above.

The easiest (not cheapest) way to do this is to use series input resistors
to limit input current and to place 2 Schottky diodes (eg BAT85 or similar)
from the PIC input pin to supply rails so that they conduct before the
body/protection diodes. This is in spec for the PIC. The major danger here
is that if the input voltage is high and the input resistor small so that
the input current to the Schottky diode is higher than the PIC supply
current then the PIC supply may be "pumped up" by the input current. This
can be overcome by placing a suitable zener across the supply (say 5v6 for a
5v supply). Note that a standard 3 terminal regulator will NOT prevent this
happening - they will just shut down and let the rail voltage rise.

There are other ways of clamping input. A cheaper and not perfect but very
tolerable way is to use two input resistors in series and clamp the mid
pount as above with eg 1N4148 diodes. This is much cheaper than using
Schottkys but still potentially allows a "whisper" of body diode current
(microamps). This is also techniucally bad design but much better bad design
than not doing it at all :-).

Next come zener clamps or diode clamps to reference voltages just below
supply and above ground but these are more complex and arguably unnecessary.


regards,


     Russell McMahon
_____________________________

>From another world - http://www.easttimor.com

What can one man* do?
Help the hungry at no cost to yourself!
at  http://www.thehungersite.com/

(* - or woman, child or internet enabled intelligent entity :-))

1999\10\09@022245 by William Chops Westfield

face picon face
   MANY people over time on this list have supported the use of the PIC's
   internal diodes to clamp signals to an acceptable level.
   DON'T DO IT.
   The PIC is guaranteed "safe" at up to 20ma protection diode current.
   The PIC is NOT guaranteed to work properly with ANY protection diode
   current.

There's a MICROCHIP App Note (AN521) that uses the internal protection
diodes to allow a PIC to be connected to AC mains voltage using only a (5M)
resistor.  They mention a +/-500uA allowable current (into/outof an input
pin) which is backed up by a number in that "absolute maximum" section of
the specs (for 16C54, in my 1992 databook.)

Has microchip retracted that app note?

(and where are people getting this "20mA" number, which I only see as
maximum output current for an OUTPUT pin, with nothing about the
protection diodes.)

BillW

1999\10\10@161205 by Richard Prosser

flavicon
face
The allowable limit appear to be different for different device families.
The 12C series have the 500uA limit while the 16C7X series have a 20mA
limit. (I think)

Either way I would advise you to provide alternative protection and use the
internal diodes as secondary protection for cases of extreame abuse.
Richard P



> {Original Message removed}

1999\10\11@063041 by Caisson

flavicon
face
> Van: Russell McMahon <spam_OUTapptechTakeThisOuTspamCLEAR.NET.NZ>
> Aan: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Onderwerp: More on (ab)use of PIC protection diodes & bad design
> Datum: zaterdag 9 oktober 1999 1:38

Hello Russel,

 The story below tell's me that the protection-diodes should be protected
..

Normally I would discard such a story as an hoax.  But you seem to be
serious about it.  Could you try to explain ? (in as simple as terms as
possible please ...)

What's so specific of those internal protection-diodes that they can't be
used like their external counterparts ?

Regards,
 Rudy Wieser



{Quote hidden}

1999\10\11@083340 by Russell McMahon

picon face
Rudy  said -

>The story below tells me that the protection-diodes should be protected
>Normally I would discard such a story as an hoax.  But you seem to be
>serious about it.  Could you try to explain ? (in as simple as terms as
>possible please ...)


This is my perspective - others should by all means correct me or improve on
my descriptions if I seem to be in error.

Protection diodes are intended to protect against electrostatic voltages
which may be applied to i/o pins. They are not intended to ensure normal IC
operation while the diodes are conducting, so -

Protection diodes may be purposefully integrated into the product as
discrete devices on the main die or may be "parasitic" diodes which occur
when silicon and metallization is laid down on the basic IC substrate.
Generally the latter will only be input-to-ground diodes. Others here will
be able to describe this in much more detail than I.

However, whether purposefully or incidentally provided on chip diodes which
are intended for protection against electrostatic or out of spec voltages
will most probably be integrated into the IC "where they occur" - ie it is
likely that the shortest path to Vcc or ground will be taken from the pin
which the diode is protecting. I'll refer only to diodes from input to Vcc
from here on but the same applies to diodes to ground. When such diodes do
conduct the voltages at the "common" point will be about 0.6 volts above
Vcc. If they are in fact in close proximity to other connections to the
common Vcc "plane" these voltages will be available for "injection" to other
unrelated parts of the circuitry. Any impedance in the common Vcc circuit
will increase the chance that such stray voltages will couple into an
unintended circuit point. (A discrete circuit analog equivalent is
"motorboating" - an oscillation which occurs when input and output circuitry
of a gain stage have a common power supply impedance in their power supply
paths.)  When the currents involved are very small it is likely that digital
circuitry will NOT be affected adversely or at least, not to a noticeable
extent. Where currents are large, strange things WILL happen. BUT, even when
currents are small strange things MAY happen. If the currents are injected
into analog portions of the circuitry (eg oscillator section) all bets are
off as to what will happen. A lot of the time you can get away with using
the protection diodes this way. Microchip's data sheets (and all other
reasonable manufacturers datasheets) specifically warn you that operation
like this MAY cause problems.

Why are discrete catch diodes different?
If diodes are provided to eg Vcc external to the PIC etc the currents are
connected at what should be a very low impedance point (the supply pin) and
appear in the same way as supply noise. Potentials which occur on the chip
due to them will always have a positive gradient (ie they will be greater
than the nominal positive supply) and the chip maker will have designed to
have noise at this point have as little affect as possible. It is possible
to design external catch diode circuits so that they have almost zero affect
on Vcc noise and the results can be fully designed. Injecting the currents
into the IC at randomly chosen points in the midst of the IC can not be
designed for - the IC maker does not provide details on what goes on inside
at this level of detail.

If a manufacturer wanted to include catch diodes to clamp input pins to
supply voltage DURING NORMAL OPERATION the could design the IC such that
injected currents and potential rises were isolated from random internal IC
points. As this is not what the diodes are meant for this is not usually
what the manufacturer does.

My practical experience indicates that the strange performance expected from
using the protection diodes to limit pin voltages during operation does in
fact sometimes occur.



regards


     Russell McMahon
_____________________________

>From another world - http://www.easttimor.com

What can one man* do?
Help the hungry at no cost to yourself!
at  http://www.thehungersite.com/

(* - or woman, child or internet enabled intelligent entity :-))


{Quote hidden}

1999\10\11@084548 by paulb

flavicon
face
Caisson wrote:

> Normally I would discard such a story as an hoax.

 No hoax.  Well-known aspect of IC design.

> What's so specific of those internal protection-diodes that they can't
> be used like their external counterparts ?

 Because they aren't external!  They are in fact on the same silicon
die as all the other components.  Recall that a transistor is in fact
just two diodes.  But it doesn't *behave* as just two diodes, as charge
injected into the junction of one diode can be passed into the other.

 Well, these on-chip diodes are similar.  They are sitting near other
components, other junctions on the die, and if you inject *enough*
current into them, they may firstly cause other (reverse-biassed)
junctions to conduct.

 Worse, other junctions may also inject charge back into them.  If both
things happen together, there is an avalanche effect which happens to be
the same as in a thyristor, and the whole chip may "switch on" from rail
to rail.  Nasty!

 Common occurrence in CMOS chips such as 4066s which are *not*
symmetrical.  Connected one way, they always behave, but swap the
"switch" connections over and pull too much current and - very hot chip!
--
 Cheers,
       Paul B.

1999\10\11@090037 by Morgan Olsson

picon face
Hej Caisson. Tack fšr ditt meddelande 10:09 1999-10-11 +0200 enligt nedan:
> > Van: Russell McMahon <apptechspamKILLspamCLEAR.NET.NZ>
> > Aan: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
> > Onderwerp: More on (ab)use of PIC protection diodes & bad design
> > Datum: zaterdag 9 oktober 1999 1:38
>
>Hello Russel,
>
>   The story below tell's me that the protection-diodes should be protected
>..
>
>Normally I would discard such a story as an hoax.  But you seem to be
>serious about it.  Could you try to explain ? (in as simple as terms as
>possible please ...)
>
>What's so specific of those internal protection-diodes that they can't be
>used like their external counterparts ?
>
>Regards,
>   Rudy Wieser

I am not an expert but I«ll try to explain from what I have read somewhere:

Often the "on chip protection diodes" are implemented in a "low budget way".
That way of doing it, the diodes when conducting leak charges (electrons/holes) into the rest of the chip silicon, possibly causing all sorts of misbehaviour.
Actually the diodes are often bipolar transistors, I've read, but maybe not always.

The same effect also causes the latch up effect: a transient into a chip pin can turn on a transistor connected to Vcc, and at the same tima a one connected to Vdd, and then thay are conducting the process continues, effectively making a triggerted SCR!  The only way to get out of it is to shut down power.

Ten-twnenty years ago chip was much more sensitive top latch up tnan nowadays, but we shall still take care.

Possibly it is the guaranteed limit current before latch up that is the 20 mA stated in the datasheets?

There are ways of creating charge barriers around separate protection diodes on the chip, but that would use more silicon, so the PIC would maybe be 0,0001 USD more expensive... ;)

...But it is of course be much cheaper than external protection or product havoc...

FWIW
/Morgan
Morgans Reglerteknik, HŠllekŒs, 277 35 KIVIK, SWEDEN
  tel +46(0)414-446620, fax -70331,   EraseMEmrtspam_OUTspamTakeThisOuTiname.com

1999\10\11@095000 by Jim Hartmann

flavicon
face
All due respect, but I here lots of lore about "accepted practice" but
nothing concrete.  You wrote about external protection diodes as "in the
spec.".  Where did you see this?  I've searched the data books over and
over and have never seen anything.  In fact on microchip's web site, AN521
"Interfacing to AC power lines" uses only a current limiting resistor to
connect a PIC input directly to 110VAC power line.  Where can we see some
hard facts?

Regards,
Jim Hartmann






Russell McMahon <apptechspamspam_OUTCLEAR.NET.NZ>spamspam_OUTMITVMA.MIT.EDU> on 10/09/1999
07:38:27 AM

Please respond to pic microcontroller discussion list
     <@spam@PICLISTKILLspamspamMITVMA.MIT.EDU>

Sent by:  pic microcontroller discussion list <KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU>


To:   RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU
cc:
Subject:  More on (ab)use of PIC protection diodes & bad design


Re allowing current to flow in PIC protection diodes, various people have
said-

> The "specification" is an Absolute Maximum Rating.  The only thing these
> ratings are good for is to ensure the PIC won't burn out, i.e. suffer
> permanent damage.

> There is no specification for a current through the
> protection diodes durring operation that won't disturb proper operation.
> The closest they come to specifying that is specifying the input voltage
> ratings.  We'd have to assume that the maximum "normal operation" current
> allowed through a protection diode is zero.

/Mike is absolutely right.
/
/EXTERNAL clamps are needed to prevent the reverse protection
/diodes being biased on, for normal operation.
/
/Thanks for clarifying.
/
/-Barry.
/------------

All good stuff.


MANY people over time on this list have supported the use of the PIC's
internal diodes to clamp signals to an acceptable level.
DON'T DO IT.
The PIC is guaranteed "safe" at up to 20ma protection diode current.
The PIC is NOT guaranteed to work properly with ANY protection diode
current.

It will often (even "usually") work "OK".
It is unacceptable design practice.
It is not guaranteed to work.
There is no certainty what the results on the processor will be.
Sometimes a whole design will fail because of it.
Thjere will often be no indication of what is wrong.

The "proper" way is to externally limit the voltages external ti the PIC as
noted above.

The easiest (not cheapest) way to do this is to use series input resistors
to limit input current and to place 2 Schottky diodes (eg BAT85 or similar)
from the PIC input pin to supply rails so that they conduct before the
body/protection diodes. This is in spec for the PIC. The major danger here
is that if the input voltage is high and the input resistor small so that
the input current to the Schottky diode is higher than the PIC supply
current then the PIC supply may be "pumped up" by the input current. This
can be overcome by placing a suitable zener across the supply (say 5v6 for
a
5v supply). Note that a standard 3 terminal regulator will NOT prevent this
happening - they will just shut down and let the rail voltage rise.

There are other ways of clamping input. A cheaper and not perfect but very
tolerable way is to use two input resistors in series and clamp the mid
pount as above with eg 1N4148 diodes. This is much cheaper than using
Schottkys but still potentially allows a "whisper" of body diode current
(microamps). This is also techniucally bad design but much better bad
design
than not doing it at all :-).

Next come zener clamps or diode clamps to reference voltages just below
supply and above ground but these are more complex and arguably
unnecessary.


regards,


     Russell McMahon
_____________________________

>From another world - http://www.easttimor.com

What can one man* do?
Help the hungry at no cost to yourself!
at  http://www.thehungersite.com/

(* - or woman, child or internet enabled intelligent entity :-))

1999\10\11@122437 by Wagner Lipnharski

picon face
Well, when we think about protective diodes we should remember about ESD
(electro static discharges).  Since the primordial of this 3 letters,
everyone heard about protective diodes connecting all pins to Vcc, is
that right?
This could be.  Most of the devices produced with that intention had
diodes anodes to Vcc, but all of them? I am not so sure, "diodes" here
could be a die composition of a transistor. What happens if you apply a
signal 10Volts bigger than Vcc to any I/O pin?  You will be raising VCC
through those diodes, right?  What happens if you apply 500V for 30us at
any I/O pin?  ESD can reach much higher voltages, y'all know that.
Suppose your circuit just have a high impedance alkaline battery (3
Ohms) driven directly the PIC, with just one 10uF capacitor as a Vcc
filter... you can calculate how much the Vcc will raise with that
500V/30us.

I will not say it happens, but it is possible that to avoid that, some
companies use a voltage clipping circuit at each I/O pin, referenced to
VCC (or Ground) as clipping point.  It means that then input clipping
circuit is in true deviating to [Ground] the *internal* input +voltage,
or to Vcc then *internal* input -voltage, the one that would be driven
to the circuit, not exactly what is present at the pin, via somehow
20-100 Ohms input serial (high level) impedances... easy to do.  So, by
this way in presence of Vin > Vcc, Vcc does not rise, or Vin < Ground,
Ground does not goes negative, just an internal chip function clipping
it to ground or Vcc.

Think about as a Protective Gas Capsules or Solid State devices to
protect phone lines and power lines... it doesn't conduct high energy
surge back to the line, doesn't make sense, so it deviates it to ground.

I think it is easy to verify.  Just attach a PIC to a stable +5V Vcc via
a 200 Ohms resistor. If it consumes 5mA, voltage at PIC Vcc pin would be
+4Vdc. Now connect the same supply +5Vcc via another 200 Ohms resistor
to any I/O pin, and measure dc voltage at that I/O pin and also at PIC
Vcc pin, both referenced to ground.  If the PIC Vcc pin increases
voltage from 4V to 4.2V than an internal protective silicon diode (0.6V
drop) connecting I/O pin to Vcc is present.

This should be the "common" diagram:

        Measures 4.0Vcc at this point
                           |
              200 Ohms     V
+5Vcc----o-----RRRRR--------o---PicVccPin (5mA)
             1V drop       |
                           |     NoVdrop
                           '------|<------.
                                          |
                           ----PicI/OPin--o---


        Measures 4.2Vcc at this point
                           |
              200 Ohms     V
+5Vcc----o-----RRRRR--------o---PicVccPin (5mA)
        |     0.8Vdrop     |
        |     4mA          |     0.6Vdrop
        |                  '------|<------.
        |     1mA                         |
        +-----RRRRR------------PicI/OPin--o---
              200 Ohms
              0.2Vdrop

The above consider that the PIC consume still 5mA for 4V or 4.2Vdc.
Is there any good soul that can check if my calculations are correct?

1999\10\12@070015 by Caisson

flavicon
face
> Van: Russell McMahon <spamBeGoneapptechspamBeGonespamclear.net.nz>
> Aan: pic microcontroller discussion list <TakeThisOuTPICLISTEraseMEspamspam_OUTMITVMA.MIT.EDU>
> CC: Rudy Weisser <RemoveMEcaissonspamTakeThisOuTTELEBYTE.NL>
> Onderwerp: Re: More on (ab)use of PIC protection diodes & bad design -
        please explain ...
> Datum: maandag 11 oktober 1999 14:31
>
> Rudy  said -
>
> >The story below tells me that the protection-diodes should be protected
> >Normally I would discard such a story as an hoax.  But you seem to be
> >serious about it.  Could you try to explain ? (in as simple as terms as
> >possible please ...)
>
> This is my perspective - others should by all means correct me or improve
on
> my descriptions if I seem to be in error.

Hello Russel,

 Thank you for your explanation.  I allways regarded the internal
protection-diodes as stand-alone parts.  Not as (P/N) layers intergrated
with the (input) transistors. That's how far my knowledge of (build-up of)
IC's goes ...

Regards,
 Rudy Wieser

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...