Searching \ for 'Connecting RS-232 to 12C50x GP3 Pin' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/serials.htm?key=rs%2D232
Search entire site for: 'Connecting RS-232 to 12C50x GP3 Pin'.

Truncated match.
PICList Thread
'Connecting RS-232 to 12C50x GP3 Pin'
1998\01\15@134504 by myke predko

flavicon
face
Hi Gang,

Sometime ago, I put in a note saying that you couldn't read RS-232 Input on
GP3 (with an in line terminating resisotr) of a 12C50x because it will reset
the PIC.

I did a little bit of playing around and found that the PIC clamps the
incoming signal to about -0.6 Volts.  By connecting a diode between the pin
and ground as a clamp, it works great:

                                        |        12C50x
                                        |
  RS-232 In --------10K------+----------| GP3
                             |          |
                            ---         |
                             ^ Diode
                             -
                             |
                             |
                          -------
                           -----
                            ---

Some bloke, name of Predko

"I was well aware that the processes of puberty are often fatal to psychic
power."
- Sir Arthur Conan Doyle

1998\01\16@012143 by Mike Keitz

picon face
On Thu, 15 Jan 1998 13:23:36 -0500 myke predko <spam_OUTmykeTakeThisOuTspamPASSPORT.CA> writes:
>Hi Gang,
>
>Sometime ago, I put in a note saying that you couldn't read RS-232
>Input on
>GP3 (with an in line terminating resisotr) of a 12C50x because it will
>reset
>the PIC.
[Circuit with 10K resistor deleted]

A 10K resistor is way too small.  Use a 1M resistor to keep the current
flow through the internal protection diodes low.  Then you probably won't
need the external diode.   Of course, the 12C50X pin that doubles as MCLR
(GP4?) can't be used this way since raising it above 5V will put the chip
in programming mode.

Install the resistor near the PIC so the high-impedance node between the
resistor and PIC isn't affected by stray capacitance or noise.

1998\01\16@103606 by myke predko

flavicon
face
Mike Kietz wrote to my original posting.

>A 10K resistor is way too small.  Use a 1M resistor to keep the current
>flow through the internal protection diodes low.  Then you probably won't
>need the external diode.   Of course, the 12C50X pin that doubles as MCLR
>(GP4?) can't be used this way since raising it above 5V will put the chip
>in programming mode.

GP3 is the pin that doubles as MCLR.  You can run RS-232 voltages thru a 10K
resistor on any of the other five pins without problems.  I personally don't
like using very high resistances on clamped CMOS inputs because of the
danger of induced noise changing the input state (I got bitten by this once).

It doesn't seem to matter what resistance you use, I tried up to 2M, when
you input RS-232 on this pin, it is always held in reset.  The external
clamping diode seems to be the only thing that works.

As for inadvertently putting the PIC into programming mode, I haven't seen
any problems with that (I suspect the current drive capability from the
RS-232 Drivers is insufficient to put the chip into programming mode).

>Install the resistor near the PIC so the high-impedance node between the
>resistor and PIC isn't affected by stray capacitance or noise.

Always good practice.

Thanx for the comments,

myke

"I was well aware that the processes of puberty are often fatal to psychic
power."
- Sir Arthur Conan Doyle

1998\01\16@165140 by Andy Kunz

flavicon
face
>RS-232 Drivers is insufficient to put the chip into programming mode).

No, there's plenty of power there for a desktop box to do it.

Andy


==================================================================
Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
==================================================================

1998\01\20@054942 by paulb

flavicon
face
Mike Keitz wrote:

> A 10K resistor is way too small.  Use a 1M resistor to keep the
> current flow through the internal protection diodes low.  Then you
> probably won't need the external diode.   Of course, the 12C50X pin
> that doubles as MCLR (GP4?) can't be used this way since raising it
> above 5V will put the chip in programming mode.

> Install the resistor near the PIC so the high-impedance node between
> the resistor and PIC isn't affected by stray capacitance or noise.

 And put in a 10K resistor to ground as well to nominally terminate the
RS-232 line and snub noise.  On the source side, not the PIC!

 Cheers,
       Paul B.

1998\01\20@102326 by myke predko

flavicon
face
Just to keep flogging a dead horse...

>>RS-232 Drivers is insufficient to put the chip into programming mode).
>
>No, there's plenty of power there for a desktop box to do it.

Uhmmm...  Are you sure?  I just looked at the RS-232 voltage levels at the
12C509 GP3 pin on a scope, the Negative Voltage through the 10K Resistor and
Clamping diode is 0.2 Volts and the Positive is 10 Volts.

Looking at the data sheet, to put the part into Programming Mode voltage
input is 12.75 - 13.24 Volts.  Now, there is a verify specification of Vdd +
4.0 Volts (which this set up would seem to put the PIC Into).

The Programming Supply current is only specified as a maximum (which is 50
mA for both the 12C5xx parts and the 16Cxx EPROM parts).  I seem to remember
that it is normally 3+ mA (which, the Serial Port will NOT be able to supply
with the 10K Resistor and still maintain the programming voltages).

Maybe somebody from Microchip (or anybody that knows better) can confirm
what I'm saying here and state whether or not there's any danger of me
putting the device into programming mode.

myke

"I was well aware that the processes of puberty are often fatal to psychic
power."
- Sir Arthur Conan Doyle

1998\01\20@152443 by Mauro, Chuck

flavicon
face
OK, Here goes...

Being a recently departed MS Mouse design engineer, I've had loads of
experience with RS232C interfaces and the Microchip family of parts...

And, as fate would have it, I also experimented with the 12C5xx and
parasitically powering it off of a PC's serial port.  I've never used
pin 3 for direct or indirect RS232C interfacing (but I have with other
pins), but I understand the issue.

The common RS232 driver chips used in a PC have a typical source
impediance of 1K (as per the EIA spec's).  (Also, just for completeness,
RS232C recievers have a typical input impedance of about 4K, although it
could be as high as 7K or low as 3K and still be in spec.)

As far as accidentally setting the chip into programming mode - in your
setup - no.  The typical RS232 driver is NOT a stiff source, and with
the typical source impedance of 1K, all you should be able to get out of
one is around 6 mA before you drag it down to 5V or so...  Believe me -
I've tried this, and had various loads tested on MANY brands of serial
ports (read hundreds of different PC's with various PIC I/O pin circuit
configurations).  Your right, the programming spec from Microchip for
the 12C5xx family (doc. DS30557B) states that the max programming
current is 40 mA for a successful program.  Unfortunately, they never
give a min for this spec - but it doesn't matter in this case.  In
general more than just 3 mA is required to program a bit, but the
current is dynamic.  We're not that real concerned here anyway, because
the programming specs require a very tightly regulated Vpp, up at 13V
+/- .25V, and your pin will never see that...  I would be careful not to
allow the pin to see even more than say, 6.5V, though, just to be on the
safe side to prevent verification mode (which wouldn't hurt the part,
but I'm sure you don't want that).

So, a typical PC serial driver can't harm a thing.  Make sure you
adequately gaurd against excessive input current when the clamping
diodes are forward biased.  Microchip has an ap note that gives some
safety guidelines in current limiting an input pin when driven above or
below the rails...  Worst case - you damage an input structure
(protection diode) or even potentially cause excessive currents to
avalanche and break down the die (it takes quite a bit of current to
actually do this).

You are not hurting anything with your current setup, but don't start
hooking up regulated power supplies to the poor chip this way - unless
you are planning to program it!


Sorry for the verboseness.

Chuck


> {Original Message removed}

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