Searching \ for 'PICs: Good Design versus what (usually) works - Tu' 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: 'Good Design versus what (usually) works - Tu'.

Truncated match.
PICList Thread
'PICs: Good Design versus what (usually) works - Tu'
1999\10\09@164632 by William Chops Westfield

face picon face
Hmm.  Is the failure of circuits due to use of the internal clamping diodes
due to some internal issue, or is it due to "large" currents raising or
Lowering Vcc/Gnd out of spec?  Given a relatively high impedence power
source (say, lithium coin cells), it's easy to imagine "clamping currents"
on the order of what the PIC itself draws causing all sorts of Vcc related
problems.  (I have joined the conversation late, but I can't see an
electrical reason why the internal clamping diodes would behave much
differently than external diodes in a similar configuration.)

This is an important question - if there are Vcc problems as opposed to
internal issues, that means that your external clamping circuit has
limitations as well - in particular, the external schottky diode scheme
Russell suggested isn't a good idea.

(In particular, someone mentioned an "rs232" device.  If that circuit were
powered by the rs232 port as well as using the internal diodes to clamp the
signals, that would mean that the power suppy AND the signal had (about)
the SAME impedence, which does sound like a recipe for disaster!)


   I wouldn't attempt to interface the Inputs and Outputs of ANY
   micro-controller or microprocessor directly to the outside world.  ...
   The very very minute cost of either diodes, transistors, or buffers
   ICs is just not worth destroying your project.

You're making the old-fashioned assumption that the cost of the protection
circuitry IS "minute" compared to the rest of the circuit.  In these days
of $0.50 microcontrollers, that's an unjustified assumption!
Semiconductors is semiconductors - treating the microcontroller as though
its some sort of sacred cow is ... outdated.

(Just trying to have the ON-TOPIC flames keep up with the off-topic
flames.)

BillW

1999\10\09@165710 by Dave VanHorn

flavicon
face
> Hmm.  Is the failure of circuits due to use of the internal clamping
diodes
> due to some internal issue,

SCR latchup. The device can get hung into a high current mode and dissipate
a lot of current. It usually cures itself after power is off and it cools
down.

Series resistance to limit the current to a few mA has been safe in my
experience, but there are no hard specs available AFAIK.

1999\10\10@001620 by Russell McMahon

picon face
>This is an important question - if there are Vcc problems as opposed to
>internal issues, that means that your external clamping circuit has
>limitations as well - in particular, the external schottky diode scheme
>Russell suggested isn't a good idea.


Yes - axtra protection may be needed. I specifically mentioned (was it in
that post or the one before?) the risk of this happening and noted that a
power supply zener at eg 5v6 for a 5 volt system would largely overcome
this. The engineer's assistant that MChip was promoting had just such a Vcc
pump up risk and my rough calculations indicated that it was a real danger
under some input conditions. Addition of a zener there would have been very
wise. If you can't afford ANY supply pump up at all then you need to limit
the excess potentials before they exceed supply +/- one diode drop (less a
little bit).

When I experienced this problem with a PIC I don't believe it was due to Vcc
pump-up.
I think it was a genuine internal chip malfunction.
I don't blame MChip for this - although it would be nice if it didn't
happen.
I suspect this problem is common to almost all commonly available
microprocessors.

>    I wouldn't attempt to interface the Inputs and Outputs of ANY
>    micro-controller or microprocessor directly to the outside world.  ...


Agree fully. But this problem may occur if resistors alone are used.

>    The very very minute cost of either diodes, transistors, or buffers
>    ICs is just not worth destroying your project.


Yes. As someone noted, such costs may be not insignificant in volume
production but must still be considered.



     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@100829 by Jim Hartmann

flavicon
face
My understaning is that Vin(low) and Vin(high) specs are not *external*
limits, but guarentees that the chip *internally* will see a low at no
higher than vin(low) and a high at no lower than vin(high).  The input low
and input high specs are contradictory when considered as external voltage
limits.

Jim Hartmann





Russell McMahon <spam_OUTapptechTakeThisOuTspamCLEAR.NET.NZ>TakeThisOuTspamMITVMA.MIT.EDU> on 10/09/1999
05:57:41 PM

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

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


To:   .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
cc:
Subject:  PICs: Good Design versus what (usually) works - Tutorial / was
     More on (ab)use of PIC protection diodes & bad design


I'll grandiosely consider this a tutorial.
Shoot me if I tutor wrong.
I may not make friends here but I consider this matter is vital to good
design.
I here reject the holy writ of "PICs are robust, you can safely use the
protection diodes to clamp beyond-rail signals" which is a fallacy.
Even MChip have actively defended a circuit which violated this principal,
rather than listen to reasoned discussion (Engineer's test tool -
correspondence posted here in the last year). .

This is a discussion related to producing designs which meet data sheet
specifications versus one's which "usually" work. By all means criticise
what I'm saying if I'm wrong - do it on list - this is on topic (how rare
:-)) and PIC related and is important to new designers trying to ensure
that
their designs will be "guaranteed" to work. Of course, no such guarantee
exists but this is the minimum standard for real world designs. I have used
only one "preliminary" 16F84 data sheet here but every 16F84 data sheet I
have seen for years has had this stamped across it. By all means point out
data sheets with different specs.

Russell McMahon said:
>    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.


William Chops Westfield <EraseMEbillwspam_OUTspamTakeThisOuTCISCO.COM> said
>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/out of  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 Russell sez -
Dunno.
What I can say is that, taking one data sheet as an example, this design
definitely violates the chips GUARANTEED operating conditions.
This doesn't mean that it WON'T work - just that, if it doesn't, then MChip
will just laugh at you.

I personally would not consider that the presence of a figure on an
"absolute maximum" table as backing up a design that reaches that condition
during normal operation. YMMV.

This MAY be (ie appears to me to be) an example of an "Application
Engineer"
doing what everyone
KNOWS works as opposed to sticking to what a MChip designer has (almost)
guaranteed will work in the spec sheet.


Taking a randomly selected "preliminary" but apparently complete 1998 16F8X
data
sheet (DS30430C page 73) I see under ABSOLUTE MAX ratings that voltage on
any pin may be Vss-0.6V and Vdd+0.6V. Such a voltage will nominally ONLY
JUST inject current into the protection diodes.
They don't say under abs max specs whether it will still work - in fact
they
explicitly say that it may not and that values in operations listing
section
must not be exceeded for guaranteed operation.

In the same data sheet page 77 under DC characteristics Vinlow is clearly
stated as Vss < Vin < xxx where xxx varies depending on various conditions.
The lower limit is ALWAYS FORMALLY stated as Vss. This is Microchip's
guarantee. Similarly Vinhi has a max value of Vdd in EVERY case.
We all KNOW that we can extend this range.
If (when) it malfunctions MChip are not to blame.


If we want to flash a LED then, no problem.
If we want to control aerobraking into Mars orbit then we best stay within
spec (and use metric units for our thruster force calculations :-)).

>(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.)

On page 73 of the same data sheet (the abs max page mentioned above)
it specs "input clamp current" as +/- 20ma max for Vi < 0 or Vi > Vdd.
I don't know if this spec is in older data sheets but it may be as it is
the
same current as mentioned by others.

Abs max i/o current sunk is 25ma and sourced is 20mA. This doesn't
necessarily relate to the clamping current spec.


All this is only one aspect of PIC design but it approaches an Analog one.
I
have personally experienced improper and intermittent PIC operation when
violating the above conditions using a circuit provided by a software
supplier to allow direct RS232 interface to a PIC. I knew that this was a
"naughty" approach but it still took significant time before I realised
that
it was the cause of my apparently intermittently operating software. YMMV
but ultimately you too will get bitten.

Lay on Macduff :-)



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@213813 by David Bengtson

picon face
On Sun, 10 Oct 1999 17:15:10 +1300, in  you wrote:


>Agree fully. But this problem may occur if resistors alone are used.
>
>>    The very very minute cost of either diodes, transistors, or buffers
>>    ICs is just not worth destroying your project.
>
>
>Yes. As someone noted, such costs may be not insignificant in volume
>production but must still be considered.
>

Just a quick comment here. Even though it may seem silly to have $1.00
in protection components protecting a $0.50 microprocessor, you should
also keep in mind the cost of failure. If that $1.00 in protection
stops a field service call at $500, then perhaps it is worth it. Even
more important, if your products develop a reputation for being
unreliable, your in really deep doo-doo.

Dave Bengtson

1999\10\12@112736 by eplus1

flavicon
face
<BLOCKQUOTE AUTHOR=Dave Bengtson">Just a quick comment here.
Even though it may seem silly to have $1.00
in protection components protecting a $0.50 microprocessor, you should
also keep in mind the cost of failure. If that $1.00 in protection
stops a field service call at $500, then perhaps it is worth it. Even
more important, if your products develop a reputation for being
unreliable, your in really deep doo-doo.
</BLOCKQUOTE>

Been there, had that done to me, lost the argument with management, the
company is tits-up, 'nough said.

James Newton jamesnewtonspamspam_OUTgeocities.com phone:1-619-652-0593)
webmaster http://techref.homepage.com NOW OPEN TO NON-MEMBERS!
Members: Add your own private/public comments/pages (TANSTAAFL web hosting)

1999\10\13@050334 by Jim Hartmann

flavicon
face
I think its all a matter of what you expect your circuit to see.  Adding
external SOT23 Schottky diodes may be no better than relying on the
internal "diodes", the current still must be limited by some means.  The
SOT23 blowing up is no better than the PIC blowing up.  The SOT23 has
current limit X, the internal diodes have limit Y.   The internal "diodes"
are sufficient if I can guarentee a current limit significantly less than Y
(keeping in mind that the Abs Max Voltage spec. must also be met).

Jim Hartmann





David Bengtson <@spam@dbengtsonKILLspamspamPOBOX.COM>KILLspamspamMITVMA.MIT.EDU> on 10/11/1999 08:37:30
PM

Please respond to pic microcontroller discussion list
     <KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU>

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


To:   spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU
cc:
Subject:  Re: PICs: Good Design versus what (usually) works - Tutorial /
     was ...


On Sun, 10 Oct 1999 17:15:10 +1300, in  you wrote:


>Agree fully. But this problem may occur if resistors alone are used.
>
>>    The very very minute cost of either diodes, transistors, or buffers
>>    ICs is just not worth destroying your project.
>
>
>Yes. As someone noted, such costs may be not insignificant in volume
>production but must still be considered.
>

Just a quick comment here. Even though it may seem silly to have $1.00
in protection components protecting a $0.50 microprocessor, you should
also keep in mind the cost of failure. If that $1.00 in protection
stops a field service call at $500, then perhaps it is worth it. Even
more important, if your products develop a reputation for being
unreliable, your in really deep doo-doo.

Dave Bengtson

1999\10\13@060518 by Russell McMahon

picon face
>I think its all a matter of what you expect your circuit to see.  Adding
>external SOT23 Schottky diodes may be no better than relying on the
>internal "diodes", the current still must be limited by some means.  The
>SOT23 blowing up is no better than the PIC blowing up.  The SOT23 has
>current limit X, the internal diodes have limit Y.   The internal "diodes"
>are sufficient if I can guarentee a current limit significantly less than Y
>(keeping in mind that the Abs Max Voltage spec. must also be met).

Yes, a series input current limiting resistor is needed,
BUT
No, the situations are quite different.
When you use internal protection diodes they cannot start "protecting"
anything until they are injecting current into the IC itself and causing
changes in the voltages at points internal to the IC. Disaster is
threatening if you want it to also to chew gum while it is doing this. The
series resistor will limit the current for a given applied voltage but any
fault current drawn will go where it may do harm.

If you want the circuit to run properly when the Vin >> Vcc is applied then
you must limit Vinmax at the PIC pin to ~= Vcc
(and Vinlow to ~= 0v

If you use external diodes you can design the circuit to start clamping the
input voltages before the IC's internal diodes START to pass current into
the IC.
The reason to use Schottky diodes is that they have a lower "on" (forward
conduction) voltage than the internal silicm diodes so they will conduct
vefore the internal diodes do and shunt the "fault" currents to Vcc or
ground or where-ever the design allows them to.

In the first case the IC (PIC) is definitely violating the manufacturers
"normal operating conditions" specification.
In the latter case it may not be (it's up to the designer).

In practice if Schottky diodes are taken from input to Vcc and Ground
(appropriate polarity to prevent conduction during normal operation then
technically the input spec will be violated by the time the Schottky's are
conducting (about +/- 0.3 volts ouitside rails) but in practice this will
work with utterly minimal current injected into the protection diodes.


The following simple cct nominally allows the formal input Vinhi spec to be
met.
ZZZ is a zener at say 4.4 volt (hard to buy :-))(4v3 and 4v7 are standard
values)
Diode D conducts when Vin is > Vzzz + 0.6
A single zener can be used for many inputs but one diode is needed per
input.
the soft knee of a zener diode makes this cct less sharp than ideal.
It has the advantage of NOT pumping up the Vcc for large Vins.
A mirror image circuit referenced to Vcc would protect against low
Vin-low's.

.

                   D             |    PIC
         |-------|<|---- .---- | In
        Z                  |      |
        Z                  |
        Z                  |---------------RRR----- Vin
        |
Gnd-.-------------------------



     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 :-))


{Original Message removed}

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