piclist 2002\10\11\085056a >
Thread: It's official: The Real-World Serial FAQ
www.piclist.com/techref/io/serials.htm?key=serial
face
flavicon
face BY : Russell McMahon email (remove spam text)



I affirm again -

{Quote hidden}

Here we go again :-)
This is a regular topic and one debated with religious fervour.
Look in archive for why it is as I say above.
I assure you that I am correct and that great sorrow shall fall upon the
head of  those who disregard this warning.
Maybe something along these lines should also be in a FAQ ?

I have attached a long explanation that I recently sent to another list.
I will also give a short explanation here.
Ignore or disbelieve this at your peril:

- Microcontrollers have TWO sections in the spec sheets. "Absolute Maximum"
ratings and "typical operating conditions".
This also applies to essentially ALL other ICs you will ever see.

- The absolute maximum specs are those beyond which the device may be
destroyed or permanently damaged. Correct operation at these specs (or near
them) is NOT GUARANTEED - all that is guaranteed is non-destruction if you
don't exceed them.

- The typical specs are always contained within the range of the absolute
maximum specs.

- The specifications which cover operation of the clamping diodes and how
much current they can pass and the permissible voltage by which pins can
exceed Vcc with the clamping diodes conducting are **ALWAYS** in the
"absolute maximum" section of the spec sheet. Proper operation of the
processor is NOT guaranteed when the clamping diodes are conducting.
[[[It would in fact be possible for a manufacturer to provide input
protection diodes that could conduct safely during normal operation but
overwhelmingly this is not done. There may indeed be devices where this is
done but I am not personally aware of any]]].

- Typical; operation  conditions are set such that the clamping diodes NEVER
conduct (except, to quibble,  at essentially leakage current levels).

- The reason that clamping diodes must NEVER be allowed to conduct during
normal operation is that current which flows through them enters the IC at
points where such currents are not usually expected and can (and does) bias
on or off various parts of the IC in totally undefined ways. This can and
does happen but in any given situation you MAY get away with it. Something
which works on one occasion may misbehave on another. YMWV. Expect your
processor to possibly do anything it is capable of doing under these
conditions (and a few things it is incapable of as well).

*** Competent designers always ensure that during normal operation their
designs ALWAYS meet specifications in the typical operating conditions
section of the spec sheet. A design in which the body / protection diodes
conduct during normal operation is an incompetent design and bad engineering
and will bring sorrow upon the heads of its perpetrator.

Using protection diodes to clamp pin excursions under certain conditions can
be acceptable as long as abnormal circuit operation of any possible nature
is acceptable during these conditions. (eg a 1 megohm resistor of suitable
ratings between an input and a pin may allow full 230 VAC mains to be
temporarily applied to the input. Correct processor operation during such an
incident would not be guaranteed.

Now to spoil the warning:        Experience and a good understanding of
electronic principles MAY allow you to violate the above requirements in
marginally minor ways with a reasonable expectation of success. Proper
operation under such conditions is not guaranteed. (Example: split the input
resistor into 2 series resistors and clamp the middle to Vcc with a small si
gnal silicon diode such as 1N4148). This nominally violates many pin input
typical operation specs but  USUALLY works OK in practice. If you understand
why it usually does work and why it mightn't then you can decide whether
it's OK to do it in your application.

That wasn't that short, was it :-) ?


   regards

           Russell McMahon "M., for what it's worth, E. (elec)"
           (The N years experience is worth rather more :-) )

PS: Starting a reply with "Nonsense." is probably inadvisable (unless you
are Olin who is so competent that he can almost always get away with it
:-) )

___________

> I want to measure a 12 V pulse with the MSP430 direct. A simple way by
> other  Controllers  like  PIC's is to take only a resistor which limit
> the  current  to  the  protection  diodes inside the chip. But are the
> MSP320  Inputports protected against over voltage ? What is the maximum
> allowed current ? How I can find it in the datasheets ?

A better solution is to supply the input voltage via a resistor and clamp
the pin to ground with an a zener diode slightly less than Vdd (eg 4v7 when
using a 5v Vdd supply).
(cathode to pin, anode to ground)

OR

Again use a series resistor and clamp the pin to supply with a SCHOTTKY
diode eg BAT85.
(Anode to pin, Cathode to Vdd). This clamps the pin at a level below which
the protection diode starts to conduct (because the Schottky diode conducts
at a lower forward voltage than the internal silicon diode).

*** You should NOT use the internal diodes for pin clamping
*** during normal operation BECAUSE -

Using the input protection diodes to limit pin voltage during normal
operation is asking for major and ill defined problems.
This is certainly true for PICs and will also be true for almost all other
processors as well.

A *careful* reading of the PIC datasheets will reveal that the spec for pin
voltages outside supply rails is in the "absolute maximum ratings" section
and NOT in the "normal operation" section. ie the processor will survive but
is NOT guaranteed to operate properly. As noted in another reply, the
relevant data for the MSP430 is also in the "absolute maximum ratings"
section.

MANY people use the protection diodes in this manner and have (or appear to
have) no problems. But unpredictable operation can occur at any time and
sometimes does. I have personally seen semi-random processor glitching when
this is done with a PIC.

The problems occur because, unless specifically designed for this not to
happen, the current in the protection diodes flows in relatively arbitrary
parts of the IC and may bias junctions on or off in abnormal ways. When this
occurs, anything that can happen may happen and sometimes does.

Whenever this topic comes up on other lists people almost invariably
enthusiastically (attempt
to) rebut the above FACTS and claim that it is OK to use protection diodes
to limit pin voltages during normal operation. Before agreeing with them
respondents should carefully check the data sheets for their favourite
processor and see which section the "pin voltage outside supply voltage
range" spec occurs. It is possible for manufacturers to provide a system
whereby the clamp diodes did not reverse bias the intrinsic substrate diodes
in the IC or cause similar problems but few if any do this as it could incur
substantial extra cost and the requirement is better addressed by proper
circuit design.



           Russell McMahon

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


<00ef01c2712d$287ddf40$2301a8c0@Paradise> 7bit

See also: www.piclist.com/techref/io/serials.htm?key=serial
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) It's official: The Real-World Serial FAQ

month overview.

new search...