Searching \ for '[PIC] Do I need a transceiver?' 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: 'Do I need a transceiver?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Do I need a transceiver?'
2009\01\24@165731 by Colin Constant

picon face

Hi,

I'm setting an async network with multiple PIC 16F690s and 16F886s.  One master and 6 of 8 slaves spread over a distance of maybe 6 feet.

The slave Tx lines all talk to the master Rx.  I'm worried about the case where one slave tries to pull the line low while another pulls it high.  I was thinking maybe a 10K pullup on the mastter Rx and a diode pointing to each slave Tx.  Does that sound right?

Or should I just attach a 485 transceiver to every PIC?

Thanks a lot,
Colin
_________________________________________________________________
Twice the fun—Share photos while you chat with Windows Live Messenger.
http://www.microsoft.com/windows/windowslive/messenger.aspx

2009\01\24@173032 by olin piclist

face picon face
Colin Constant wrote:
> I'm setting an async network with multiple PIC 16F690s and 16F886s.
> One master and 6 of 8 slaves spread over a distance of maybe 6 feet.
>
> The slave Tx lines all talk to the master Rx.  I'm worried about the
> case where one slave tries to pull the line low while another pulls
> it high.  I was thinking maybe a 10K pullup on the mastter Rx and a
> diode pointing to each slave Tx.

That's going to be slow.  A collision should never happen during normal
operation since that would be a firmware bug.  That means you only need to
protect the hardware to the point its max rating isn't exceeded.  If a
collision happens, something else at a higher level has already screwed up,
so there isn't anything you can do at the low level to fix the problem.  The
only objective is to make sure nothing blows up.

PIC pins are rated for 25mA.  Put 120 ohm resistors in series with each
slave transmit line.  If two PICs drive opposite directions you get 5V / 240
ohms = 21mA.  Not great, but within spec, and 120ohms should still allow for
reasonably fast data rate.  You should also put a resistor in series with
the incoming line followed by reverse Schottky diodes to power and ground.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\01\24@180748 by Colin Constant

picon face

> From: spam_OUTolin_piclistTakeThisOuTspamembedinc.com> To: .....piclistKILLspamspam@spam@mit.edu> Subject: Re: [PIC] Do I need a transceiver?> Date: Sat, 24 Jan 2009 17:30:34 -0500> > Colin Constant wrote:> > I'm setting an async network with multiple PIC 16F690s and 16F886s.> > One master and 6 of 8 slaves spread over a distance of maybe 6 feet.> >> > The slave Tx lines all talk to the master Rx. I'm worried about the> > case where one slave tries to pull the line low while another pulls> > it high. I was thinking maybe a 10K pullup on the mastter Rx and a> > diode pointing to each slave Tx.> > That's going to be slow. A collision should never happen during normal> operation since that would be a firmware bug. That means you only need to> protect the hardware to the point its max rating isn't exceeded. If a> collision happens, something else at a higher level has already screwed up,> so there isn't anything you can do at the low level to fix the problem. The> only objective is to make sure nothing blows up.

Thanks so much. That's well put. The programming should prevent a collision but I worry.> > PIC pins are rated for 25mA. Put 120 ohm resistors in series with each> slave transmit line. If two PICs drive opposite directions you get 5V / 240> ohms = 21mA. Not great, but within spec, and 120ohms should still allow for> reasonably fast data rate. You should also put a resistor in series with> the incoming line followed by reverse Schottky diodes to power and ground.

Sorry, you lost me with the last sentence.  Why do I need a resistor in series withthe incoming line followed by reverse Schottky diodes to power and ground?

Thanks again.

_________________________________________________________________
So many new options, so little time. Windows Live Messenger.
www.microsoft.com/windows/windowslive/messenger.aspx

2009\01\24@183249 by bob.axtell

face picon face
In general, it is better to use an RS485/RS422 transceiver, as these
devices are designed to handle static discharge, multiple slaves, etc
etc, even over a short distance.

If you will never go over 6 feet, and have only 8 slaves, I'd use I2C
instead of RS485 serial. That's
what I2C was designed for (controls inside a TV set, a loop of about 6 feet).

--Bob

On 1/24/09, Colin Constant <colinconstantspamKILLspamhotmail.com> wrote:
{Quote hidden}

> -

2009\01\25@025821 by Vitaliy

flavicon
face
"Colin Constant" wrote:
> Sorry, you lost me with the last sentence.  Why do I need a resistor in
> series withthe incoming line followed by reverse Schottky diodes to power
> and ground?

Basically, Olin is suggesting that you take two Schottky diodes (D1 and D2),
and:

   - Connect anode of D1 to the signal line, and cathode to Vcc
   - Connect cathode of D2 to the signal line, and anode to Gnd

What this will do, is protect the Rx input by keeping the voltage on the
signal line from going above Vcc, and below Gnd.

-----

However, there's another way to do what you're trying to do. In automotive
networks, there is a concept of "recessive" and "dominant" states. What that
means is, if you put both on the signal line, the dominant state wins.

The way to accomplish it, is with an open collector driver. If you use an
NPN transistor, put a weak pullup (say, 1k) on the signal line. In this
case, +5V is the recessive state, and 0V is the dominant state.

If you use a PNP, use a weak pulldown.

You may be able to do the same thing with OC pins. You would have to use
larger values for the pullup/pulldown, which would limit the communication
speed.

Best regards,

Vitaliy

2009\01\25@031249 by apptech

face
flavicon
face
> Basically, Olin is suggesting that you take two Schottky diodes (D1 and
> D2),
> and:
>
>    - Connect anode of D1 to the signal line, and cathode to Vcc
>    - Connect cathode of D2 to the signal line, and anode to Gnd
>
> What this will do, is protect the Rx input by keeping the voltage on the
> signal line from going above Vcc, and below Gnd.

... by more than a Schottky diode drop in each case.

In practice this violates the spec sheet requirements in SOME cases and not
others BUT works OK in *almost* every case.
YMMV but usually won't.

Note that the current able to flow through the series resistor must be less
that the supply current if the supply rail is not to be "pumped up" by ths
system. This is almost never a problem, but has causght some people out in
special situations.



                 Russell



2009\01\25@032334 by Vitaliy

flavicon
face

----- Original Message -----
From: "apptech" <apptechspamspam_OUTparadise.net.nz>
To: "Microcontroller discussion list - Public." <@spam@piclistKILLspamspammit.edu>
Sent: Sunday, January 25, 2009 01:12
Subject: Re: [PIC] Do I need a transceiver?


{Quote hidden}

I knew somebody would bring this up, but decided to leave this bit of
information out for the sake of brevity. >:)


> In practice this violates the spec sheet requirements in SOME cases and
not
> others BUT works OK in *almost* every case.
>
> YMMV but usually won't.

And when it will, you probably won't know for sure it was the Schottkys.


> Note that the current able to flow through the series resistor must be
> less
> that the supply current if the supply rail is not to be "pumped up" by ths
> system. This is almost never a problem, but has causght some people out in
> special situations.

Brrrr... come again?

Vitaliy

2009\01\25@090014 by olin piclist

face picon face
Colin Constant wrote:
> Sorry, you lost me with the last sentence.  Why do I need a resistor
> in series withthe incoming line followed by reverse Schottky diodes
> to power and ground?

To clip spikes and to limit the current thru the PIC protection diodes.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\01\25@093459 by olin piclist

face picon face
Vitaliy wrote:
>> Note that the current able to flow through the series resistor must
>> be less
>> that the supply current if the supply rail is not to be "pumped up"
>> by ths system. This is almost never a problem, but has causght some
>> people out in special situations.
>
> Brrrr... come again?

If the off-board signal goes above Vdd, then the circuit looks like the
signal thru a resistor thru a diode to Vdd.  This dumps current onto Vdd.
Regulated power supplies generally are only designed to dump the necessary
current onto the output to keep the voltage constant.  They are not designed
to sink current to keep the voltage constant.  You therefore have to make
sure that the rest of the circuit is drawing at least as much current from
Vdd that the external signal is dumping onto it.  If not, the Vdd voltage
will rise above the regulation threshold, possible damaging parts and
causing other problems.

In this case this is not a issue since we're only talking about clipping
transients on the line caused by inductive ringing.  These will be short and
of limited energy.  The total average current will be very small to the
point it can be ignored unless you are doing something very unusual.  Any
one single spike that gets clipped has so little energy that the bypass caps
alone will limit the Vdd rise to a miniscule amount.  It would take many
clipped spikes to make a significant rise in Vdd.  That gives the rest of
the circuit time to consume the extra charge as normal operating current.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\01\25@123317 by Vitaliy

flavicon
face
"Olin Lathrop" wrote:
{Quote hidden}

Thank you for the explanation. It certainly makes sense, but I honestly
never thought about it this way. I really did think that the regulator would
sink the excess current, so the amount it could sink would depend on how
much current the regulator can supply.

I just checked one of our schematics, that uses this type of protection on
an RS232 line that goes into a logic gate. There is a pretty big resistor in
series with this line (10K), so I'm sure the rest of the circuit can eat
whatever excess current gets in through this resistor.

Vitaliy

2009\01\28@140014 by Colin Constant

picon face

> From: KILLspamolin_piclistKILLspamspamembedinc.com>> > Sorry, you lost me with the last sentence. Why do I need a resistor> > in series withthe incoming line followed by reverse Schottky diodes> > to power and ground?> > To clip spikes and to limit the current thru the PIC protection diodes.> Thanks again.  So the usual 1K, or maybe 470?
_________________________________________________________________
Twice the fun—Share photos while you chat with Windows Live Messenger.
http://www.microsoft.com/windows/windowslive/messenger.aspx

2009\01\28@141941 by Colin Constant

picon face

> > I'm setting an async network with multiple PIC 16F690s and 16F886s.> > One master and 6 of 8 slaves spread over a distance of maybe 6 feet.> >> > The slave Tx lines all talk to the master Rx. I'm worried about the> > case where one slave tries to pull the line low while another pulls> > it high. I was thinking maybe a 10K pullup on the mastter Rx and a> > diode pointing to each slave Tx.> > That's going to be slow. A collision should never happen during normal> operation since that would be a firmware bug. That means you only need to> protect the hardware to the point its max rating isn't exceeded. If a> collision happens, something else at a higher level has already screwed up,> so there isn't anything you can do at the low level to fix the problem. The> only objective is to make sure nothing blows up.> > PIC pins are rated for 25mA. Put 120 ohm resistors in series with each> slave transmit line. If two PICs drive opposite directions you get 5V / 240> ohms = 21mA. Not great, but within spec, and 120ohms should still allow for> reasonably fast data rate. You should also put a resistor in series with> the incoming line followed by reverse Schottky diodes to power and ground.> I just has a horrible thought about this.  The most likley way to screw it up would be to simply enable the UART transmitter on all the slave pics.  Then you would have say 5 idling high and one pulling low.  
_________________________________________________________________
The new Windows Live Messenger. You don’t want to miss this.
http://www.microsoft.com/windows/windowslive/messenger.aspx

2009\01\28@202627 by Vitaliy

flavicon
face
Is it just me, or is the message below missing line breaks?


" I just has a horrible thought about this.  The most likley way to screw it
up would be to simply enable the UART transmitter on all the slave pics.
Then you would have say 5 idling high and one pulling low.   "

Did you not get my message about using an OC driver?

Vitaliy


{Original Message removed}

2009\01\29@073932 by olin piclist

face picon face
Vitaliy wrote:
> Is it just me, or is the message below missing line breaks?

No it looks like barf on my screen too.  This guy always sends messages like
that, which is why I pretty much always ignore them.  Maybe they should be
automatically rejected as spam until he learns to use his mail client
properly.

>> I'm setting an async network with multiple PIC 16F690s and 16F886s.> >
>> One master and 6 of 8 slaves spread over a distance of maybe 6 feet.>
>>  >> > The slave Tx lines all talk to the master Rx. I'm worried about
>> the> > case where one slave tries to pull the line low while another
<remaining barf snipped>


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\01\29@140551 by Colin Constant

picon face

Sorry guys.  It didn't look like that before I sent it;  only when it came back from the list.  

And waddya mean "always" -- these are the first messages I've sent in years.  Nice to be back though.
> From: RemoveMEolin_piclistTakeThisOuTspamembedinc.com> To: spamBeGonepiclistspamBeGonespammit.edu> Subject: Re: [PIC] Do I need a transceiver?> Date: Thu, 29 Jan 2009 07:41:16 -0500> > Vitaliy wrote:> > Is it just me, or is the message below missing line breaks?> > No it looks like barf on my screen too. This guy always sends messages like> that, which is why I pretty much always ignore them. Maybe they should be> automatically rejected as spam until he learns to use his mail client> properly.> > >> I'm setting an async network with multiple PIC 16F690s and 16F886s.> >> >> One master and 6 of 8 slaves spread over a distance of maybe 6 feet.>> >> >> > The slave Tx lines all talk to the master Rx. I'm worried about> >> the> > case where one slave tries to pull the line low while another> <remaining barf snipped>> > > ********************************************************************> Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products> (978) 742-9014. Gold level PIC consultants since 2000.> -- > http!
://http://www.piclist.com PIC/SX FAQ & list archive> View/change your membership options at> mailman.mit.edu/mailman/listinfo/piclist
_________________________________________________________________
So many new options, so little time. Windows Live Messenger.
www.microsoft.com/windows/windowslive/messenger.aspx

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