Searching \ for '[EE]: It's official: The Real-World Serial FAQ' 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/io/serials.htm?key=serial
Search entire site for: 'It's official: The Real-World Serial FAQ'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: It's official: The Real-World Serial FAQ'
2002\10\11@115850 by Dale Botkin

flavicon
face
(added topic tag)

On Sat, 12 Oct 2002, Russell McMahon wrote:

> I assure you that I am correct and that great sorrow shall fall upon the
> head of  those who disregard this warning.

8< Much snippage...

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

Umm, so you're saying that it's OK to do this for 230VAC, but not RS-232?
Wow, there's a stretch.  I've used a 100K resistor between a PIC pin and
an RS232 line.  Now, let's assume just for simplicity's sake your 230V
line never exceeds 150V plus or minus.  Last time I checked 145V (150V
minus Vdd) thru a 1MOhm resistor gave you around .145mA.  7V (12V RS-232
minus Vdd) thru a 100K resistor gives about .07mA, or less than half the
current thru the protection diode that you would see with 230VAC.  'Splain
to me, please, how the first is somehow more acceptable than the second.

Methinks either case falls under the same umbrella...

"You might be able to get away with this, IF you understand exactly what
you're doing, AND you understand the possible consequences, AND you're
aware that it may or may not work because you're violating some
specification.  Doing it in a production device would probably be a dumb
decision."

Dale

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


2002\10\11@134444 by Peter L. Peres

picon face
On Fri, 11 Oct 2002, Dale Botkin wrote:

*>Methinks either case falls under the same umbrella...

There is no umbrella. Injecting only a few uA next to a pin or circuit
used by the onboard A/D will guarantee strange conversion results. This
has been tried and there are several messages in the archives about this I
think.

The protection diodes are actually the inherent reverse diodes of the
output's fets. They should be rated at the current of the output, i.e.
20mA. But Microchip does not rate them such, so they are NOT rated to
20mA, instead, the data sheet clearly states that the pins should never
go above VDD and below VSS by more than half a diode drop. This means
that none of the protection diodes will conduct when the chip is used
correctly. You can be very sure there is a reason for this.

Peter

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


2002\10\11@183137 by Russell McMahon

face
flavicon
face
> > 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.
>
> Umm, so you're saying that it's OK to do this for 230VAC, but not RS-232?
> Wow, there's a stretch.  ...........

No.

>  ......................'Splain to me, please, how the first is somehow
more
> acceptable than the second.
>
> Methinks either case falls under the same umbrella...

Both are OK provided you accept the potential consequences.
Both fall under the same umbrella.

The qualifier I used was ALL important. See above and I'll repeat it here -

   >> as long as abnormal circuit operation of any possible nature
   >> is acceptable during these conditions.

Sorry, I thought I'd made my point clear enough but obviously I  failed.
I'll try again.

Protection diodes are "PROTECTION AGAINST DESTRUCTION" diodes. NOT
"protection against improper operation" diodes. They are accordingly in the
relevant section of the spec sheet.

My example was meant to illustrate that even AC mains (let alone RS232) CAN
be protected against by the protection diodes *as long as abnormal circuit
operation of any possible nature is acceptable during [OR AFTER] these
conditions*.

Warning, AC mains detected on input: Going to third stage boost / Danger
Will Robinson ...... / You are in violation of Federal Statute 303.29b and
have 15 seconds to drop your fire arm ... /  Fire at will ... / Weapons
systems free ... / Dave, Dave, what are yyou ddddoing Dave ? / Houston , we
have a proble......

YM*W*V

Bzzzzzt.




           Russell McMahon

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


2002\10\11@200341 by Dale Botkin

flavicon
face
On Sat, 12 Oct 2002, Russell McMahon wrote:

> Sorry, I thought I'd made my point clear enough but obviously I  failed.
> I'll try again.

I'm jes' a little slow some days, I obviously misinterpreted.  I just
object when it's stated as an absolute (like several times today) that
using a resistor-fed PIC pin for RS-232 receive is completely nuts and
destined to fail; neither are true.  I'd never do it in a production
device (though I'm sure others have), but I've seen it work repeatedly.
In fact, it's never failed once for me, nor caused any problems at all.
I often use it for those projects that will need to talk to a PC or laptop
once in a while.  I haven't tried it in conjunction with ADC use, so I
can't speak for that.

To me it falls under the classification of something that should probably
not be encouraged, but neither does it need to be completely denied.

Dale

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


2002\10\11@224555 by Russell McMahon

face
flavicon
face
> > Sorry, I thought I'd made my point clear enough but obviously I  failed.
> > I'll try again.
>
> I'm jes' a little slow some days, I obviously misinterpreted.  I just
> object when it's stated as an absolute (like several times today)

I'll go for the hat trick.
Never, never, never do it EXCEPT under the conditions listed at the end of
my previous long post. ie you are aware of and willing to accept the
consequences.

> that
> using a resistor-fed PIC pin for RS-232 receive is completely nuts and
> destined to fail; neither are true.

I accept the challenge:

   It's nuts.
   It's destined to fail.
   This is true.

My first ever microprocessors were F8, SC/MP, 6800.
Long long long after that I met PIC. My first ever PIC experience with RS232
involved using a resistor in the PIC RS232 Receive lead. The circuit used (1
resistor & a PIC) was slavishly copied from the application note provided by
the fine folks at ME Labs. I had endless trouble and took a long long time
to find out what was happening. Despite my long prior experience with this
as an improper practice I fell into the trap. Changing the input circuit so
that the PIC operated within spec cured the problem instantly. Prior to that
the PIC's operation was inconsistent and non repeatable. AFAIK it behaved in
a similarly non similar manner with several PICs. IC used was, of course
:-),  a 16F84 (or maybe just possible a 16C84)

I can therefore say with certainty that the problem is a real one, can occur
with typical value of resistor as recommended by experienced companies who
want their customers to be able to use their software, and that the
maloperation, when it does occur, is no surprise.

> I'd never do it in a production
> device (though I'm sure others have), but I've seen it work repeatedly.
> In fact, it's never failed once for me, nor caused any problems at all.

The best you can say I suspect is ".... as far as I am aware." If your
systems are always trouble free you may well be correct.

> I often use it for those projects that will need to talk to a PC or laptop
> once in a while.  I haven't tried it in conjunction with ADC use, so I
> can't speak for that.
>
> To me it falls under the classification of something that should probably
> not be encouraged, but neither does it need to be completely denied.

See above.
Giving it one's benison in the presence of learners or people with limited
time available (ie anyone with no more than 168 hours a week) is ill
advised.


           Russell.

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


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