More on (ab)use of PIC protection diodes & bad design
Jim Hartmann email (remove spam text)
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
Russell McMahon <CLEAR.NET.NZ>MITVMA.MIT.EDU> on 10/09/1999 apptech
Please respond to pic microcontroller discussion list
Sent by: pic microcontroller discussion list <MITVMA.MIT.EDU> PICLIST
Subject: More on (ab)use of PIC protection diodes & bad design
Re allowing current to flow in PIC protection diodes, various people have
> 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.
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
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
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
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
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
>From another world - http://www.easttimor.com
What can one man* do?
Help the hungry at no cost to yourself!
(* - or woman, child or internet enabled intelligent entity :-))
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the