Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | Re: RS-485 Networks - Solution

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

RS-485 Networks - Solution - Igor Janjatovic - Apr 27 4:59:00 2004

Hello,

First, I would like to thank everyone who contributed to this topic.

Second - the solution:

It's known as "Bit Dominance". It is used on CAN bus. Although I knew about
this method I wasn't sure if it can be used with RS485 because it seemed
possible to damage transceiver in the process. But... with fail-safe RS485
transceivers it can be used on RS485, too. Thing is that only "0" is
transmitted while "1" means to disable driver (HiZ). This information about
successful implementation of Bit Dominance method on RS485 is taken from one
of projects done by Telemonitor Inc. This method requires existence of
unique ID on each of network nodes. This can be accomplished with low cost
silicon ID chips from Dallas/Maxim.

Thanks again.

Regards,
Igor





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


Re: RS-485 Networks - Solution - Gilmar - Apr 27 5:37:00 2004

The Bit Dominance is to check if line is free, in CAN It's do by the CAN
controller , but you can implement it by software in the PIC, putting "0" on
the Tx line end check if Rx line is "0" if Rx line is "0" means that line is
free.
I think that you can't use UART from PIC because it work with 8 bit and you
have to select in the 75176(RS485) Requent to Send when you want to
transmit.
I never try to do this, but It's a good thing to try.

Regards,
Gilmar

----- Original Message -----
From: "Igor Janjatovic" <>
To: <>
Sent: Tuesday, April 27, 2004 6:59 AM
Subject: [piclist] RS-485 Networks - Solution > Hello,
>
> First, I would like to thank everyone who contributed to this topic.
>
> Second - the solution:
>
> It's known as "Bit Dominance". It is used on CAN bus. Although I knew
about
> this method I wasn't sure if it can be used with RS485 because it seemed
> possible to damage transceiver in the process. But... with fail-safe RS485
> transceivers it can be used on RS485, too. Thing is that only "0" is
> transmitted while "1" means to disable driver (HiZ). This information
about
> successful implementation of Bit Dominance method on RS485 is taken from
one
> of projects done by Telemonitor Inc. This method requires existence of
> unique ID on each of network nodes. This can be accomplished with low cost
> silicon ID chips from Dallas/Maxim.
>
> Thanks again.
>
> Regards,
> Igor >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Vasile Surducan - Apr 27 5:55:00 2004


On Tue, 27 Apr 2004, Gilmar wrote:

> The Bit Dominance is to check if line is free, in CAN It's do by the CAN
> controller , but you can implement it by software in the PIC, putting "0" on
> the Tx line end check if Rx line is "0" if Rx line is "0" means that line is
> free.
> I think that you can't use UART from PIC because it work with 8 bit and you
> have to select in the 75176(RS485) Requent to Send when you want to
> transmit.

Gilmar,
For driving a 485 transmitter/receiver you need just the rx and tx lines
of the PIC USART and to know exactly the baud rate. The feature may be
called autoselection.

best regards,
Vasile > I never try to do this, but It's a good thing to try.
>
> Regards,
> Gilmar
>
> ----- Original Message -----
> From: "Igor Janjatovic" <>
> To: <>
> Sent: Tuesday, April 27, 2004 6:59 AM
> Subject: [piclist] RS-485 Networks - Solution > > Hello,
> >
> > First, I would like to thank everyone who contributed to this topic.
> >
> > Second - the solution:
> >
> > It's known as "Bit Dominance". It is used on CAN bus. Although I knew
> about
> > this method I wasn't sure if it can be used with RS485 because it seemed
> > possible to damage transceiver in the process. But... with fail-safe RS485
> > transceivers it can be used on RS485, too. Thing is that only "0" is
> > transmitted while "1" means to disable driver (HiZ). This information
> about
> > successful implementation of Bit Dominance method on RS485 is taken from
> one
> > of projects done by Telemonitor Inc. This method requires existence of
> > unique ID on each of network nodes. This can be accomplished with low cost
> > silicon ID chips from Dallas/Maxim.
> >
> > Thanks again.
> >
> > Regards,
> > Igor
> >
> >
> >
> >
> > to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Gilmar - Apr 27 6:17:00 2004

Vasile,

> For driving a 485 transmitter/receiver you need just the rx and tx lines
> of the PIC USART and to know exactly the baud rate. The feature may be
> called autoselection.

The PIC USART need just Rx and Tx lines, but the the driving 75176(RS485)
has 2 control pins, RE and DE for you control when you send or receive data,
It has to do by pins from PIC.

Regards,
Gilmar

----- Original Message -----
From: "Vasile Surducan" <>
To: <>
Sent: Tuesday, April 27, 2004 7:55 AM
Subject: Re: [piclist] RS-485 Networks - Solution >
> On Tue, 27 Apr 2004, Gilmar wrote:
>
> > The Bit Dominance is to check if line is free, in CAN It's do by the CAN
> > controller , but you can implement it by software in the PIC, putting
"0" on
> > the Tx line end check if Rx line is "0" if Rx line is "0" means that
line is
> > free.
> > I think that you can't use UART from PIC because it work with 8 bit and
you
> > have to select in the 75176(RS485) Requent to Send when you want to
> > transmit.
>
> Gilmar,
> For driving a 485 transmitter/receiver you need just the rx and tx lines
> of the PIC USART and to know exactly the baud rate. The feature may be
> called autoselection.
>
> best regards,
> Vasile > > I never try to do this, but It's a good thing to try.
> >
> > Regards,
> > Gilmar
> >
> > ----- Original Message -----
> > From: "Igor Janjatovic" <>
> > To: <>
> > Sent: Tuesday, April 27, 2004 6:59 AM
> > Subject: [piclist] RS-485 Networks - Solution
> >
> >
> > > Hello,
> > >
> > > First, I would like to thank everyone who contributed to this topic.
> > >
> > > Second - the solution:
> > >
> > > It's known as "Bit Dominance". It is used on CAN bus. Although I knew
> > about
> > > this method I wasn't sure if it can be used with RS485 because it
seemed
> > > possible to damage transceiver in the process. But... with fail-safe
RS485
> > > transceivers it can be used on RS485, too. Thing is that only "0" is
> > > transmitted while "1" means to disable driver (HiZ). This information
> > about
> > > successful implementation of Bit Dominance method on RS485 is taken
from
> > one
> > > of projects done by Telemonitor Inc. This method requires existence of
> > > unique ID on each of network nodes. This can be accomplished with low
cost
> > > silicon ID chips from Dallas/Maxim.
> > >
> > > Thanks again.
> > >
> > > Regards,
> > > Igor
> > >
> > >
> > >
> > >
> > > to unsubscribe, go to http://www.yahoogroups.com and follow the
> > instructions
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> > to unsubscribe, go to http://www.yahoogroups.com and follow the
instructions
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Vasile Surducan - Apr 27 6:28:00 2004

On Tue, 27 Apr 2004, Gilmar wrote:

> Vasile,
>
> > For driving a 485 transmitter/receiver you need just the rx and tx lines
> > of the PIC USART and to know exactly the baud rate. The feature may be
> > called autoselection.
>
> The PIC USART need just Rx and Tx lines, but the the driving 75176(RS485)
> has 2 control pins, RE and DE for you control when you send or receive data,
> It has to do by pins from PIC. :) No, it doesn't ! The challange is how ?
The answer gaven by any reader of the book "Micocontrollers for all"
authors Wouter van Ooijen and me, will not be considered. One answer is
there. best regards,
Vasile
> Regards,
> Gilmar
>
> ----- Original Message -----
> From: "Vasile Surducan" <>
> To: <>
> Sent: Tuesday, April 27, 2004 7:55 AM
> Subject: Re: [piclist] RS-485 Networks - Solution > >
> >
> >
> >
> > On Tue, 27 Apr 2004, Gilmar wrote:
> >
> > > The Bit Dominance is to check if line is free, in CAN It's do by the CAN
> > > controller , but you can implement it by software in the PIC, putting
> "0" on
> > > the Tx line end check if Rx line is "0" if Rx line is "0" means that
> line is
> > > free.
> > > I think that you can't use UART from PIC because it work with 8 bit and
> you
> > > have to select in the 75176(RS485) Requent to Send when you want to
> > > transmit.
> >
> > Gilmar,
> > For driving a 485 transmitter/receiver you need just the rx and tx lines
> > of the PIC USART and to know exactly the baud rate. The feature may be
> > called autoselection.
> >
> > best regards,
> > Vasile
> >
> >
> > > I never try to do this, but It's a good thing to try.
> > >
> > > Regards,
> > > Gilmar
> > >
> > > ----- Original Message -----
> > > From: "Igor Janjatovic" <>
> > > To: <>
> > > Sent: Tuesday, April 27, 2004 6:59 AM
> > > Subject: [piclist] RS-485 Networks - Solution
> > >
> > >
> > > > Hello,
> > > >
> > > > First, I would like to thank everyone who contributed to this topic.
> > > >
> > > > Second - the solution:
> > > >
> > > > It's known as "Bit Dominance". It is used on CAN bus. Although I knew
> > > about
> > > > this method I wasn't sure if it can be used with RS485 because it
> seemed
> > > > possible to damage transceiver in the process. But... with fail-safe
> RS485
> > > > transceivers it can be used on RS485, too. Thing is that only "0" is
> > > > transmitted while "1" means to disable driver (HiZ). This information
> > > about
> > > > successful implementation of Bit Dominance method on RS485 is taken
> from
> > > one
> > > > of projects done by Telemonitor Inc. This method requires existence of
> > > > unique ID on each of network nodes. This can be accomplished with low
> cost
> > > > silicon ID chips from Dallas/Maxim.
> > > >
> > > > Thanks again.
> > > >
> > > > Regards,
> > > > Igor
> > > >
> > > >
> > > >
> > > >
> > > > to unsubscribe, go to http://www.yahoogroups.com and follow the
> > > instructions
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> > to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
> Yahoo! Groups Links





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Igor Janjatovic - Apr 27 6:34:00 2004

> The Bit Dominance is to check if line is free, in CAN It's do by the CAN
> controller , but you can implement it by software in the PIC, putting "0"
on
> the Tx line end check if Rx line is "0" if Rx line is "0" means that line
is
> free.

Actually this is not about free line. This is about slaves competing for
unique network address. Slave with lowest ID number wins and it gets unique
network address from master. Other slaves continue to compete until the last
one has network address assigned. Please note that I'm not talking about
CAN. I'm talking about RS485 implementation of Bit Dominance method.

When it comes to CAN, devices compete for access to network. I think that it
has nothing to do with free line. I'm not sure about this, though.

> I think that you can't use UART from PIC because it work with 8 bit and
you
> have to select in the 75176(RS485) Requent to Send when you want to
> transmit.
> I never try to do this, but It's a good thing to try.

PIC UART has maximum 9 bit data length. Besides, I'm not using 75176 since
it takes small nuclear power plant to provide power for it :)
I'm using one of low power transceivers because all of the devices are
powered by battery.

Regards,
Igor





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Igor Janjatovic - Apr 27 6:50:00 2004

> :) No, it doesn't ! The challange is how ?
> The answer gaven by any reader of the book "Micocontrollers for all"
> authors Wouter van Ooijen and me, will not be considered. One answer is
> there.

I don't know about this "autoselection" solution but I'm sure that you can't
have local echo if this "autoselection" is used. Local echo is very useful
for detecting bus contention so using two separate pins for RE and DE on
half-duplex RS485 networks is must.

I don't have much experience with RS485 networks so it might be great if
there is someone with more experience to confirm what I just wrote!?

Regards,
Igor




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Vasile Surducan - Apr 27 7:01:00 2004

On Tue, 27 Apr 2004, Igor Janjatovic wrote:

> > The Bit Dominance is to check if line is free, in CAN It's do by the CAN
> > controller , but you can implement it by software in the PIC, putting "0"
> on
> > the Tx line end check if Rx line is "0" if Rx line is "0" means that line
> is
> > free.
>
> Actually this is not about free line. This is about slaves competing for
> unique network address. Slave with lowest ID number wins and it gets unique
> network address from master. Other slaves continue to compete until the last
> one has network address assigned. Please note that I'm not talking about
> CAN. I'm talking about RS485 implementation of Bit Dominance method.
>
> When it comes to CAN, devices compete for access to network. I think that it
> has nothing to do with free line. I'm not sure about this, though.
>
> > I think that you can't use UART from PIC because it work with 8 bit and
> you
> > have to select in the 75176(RS485) Requent to Send when you want to
> > transmit.
> > I never try to do this, but It's a good thing to try.
>
> PIC UART has maximum 9 bit data length. Besides, I'm not using 75176 since
> it takes small nuclear power plant to provide power for it :)
> I'm using one of low power transceivers because all of the devices are
> powered by battery.

And the line lenght or the current drive will decrease as well...
You can't generate the RS485 standard current if there is no power
compsumption.
If you'll keep your horse without feed him, someday will die...:)
Or you can feed him with food/32, food/64 or food/128... but more
often... than food/1.

best regards,
Vasile




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Igor Janjatovic - Apr 27 7:32:00 2004

> And the line lenght or the current drive will decrease as well...
> You can't generate the RS485 standard current if there is no power
> compsumption.
> If you'll keep your horse without feed him, someday will die...:)
> Or you can feed him with food/32, food/64 or food/128... but more
> often... than food/1.

Problem was "automatic network configuration" and this problem is solved
successfully, thanks to people on this group. I have no problems with line
length, current drive, power consumption or anything else in my application.
You are right about everything but I already know all of that :)

Line length is reduced but still acceptable for my application. Maximum
number of slave devices is 32, which I can achieve without any problems just
as long as 1/8 unit load transceivers are used. Maximum data rate is 64kbps.
Quiescent current is 1.6uA with receiver enabled. Current consumption is
2.5mA in TX @ 64kbps. I'm not using terminators, which is one of the reasons
for reduced cable length, reduced data rate, but for reduced power
consumption, too. I have many different documents (downloaded from web) with
thousands of pages about RS485 networking and I studied them very carefully
so you might say that I know what I'm doing. Unfortunately none of these
documents talks about software techniques, just hardware, so I had to post
this "automatic network configuration" question in order to have
plug-and-play type of network (no user intervention required). OK?

Regards,
Igor





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Vasile Surducan - Apr 27 7:55:00 2004


On Tue, 27 Apr 2004, Igor Janjatovic wrote:

> > And the line lenght or the current drive will decrease as well...
> > You can't generate the RS485 standard current if there is no power
> > compsumption.
> > If you'll keep your horse without feed him, someday will die...:)
> > Or you can feed him with food/32, food/64 or food/128... but more
> > often... than food/1.
>
> Problem was "automatic network configuration" and this problem is solved
> successfully, thanks to people on this group. I have no problems with line
> length, current drive, power consumption or anything else in my application.
> You are right about everything but I already know all of that :)
>
> Line length is reduced but still acceptable for my application. Maximum
> number of slave devices is 32, which I can achieve without any problems just
> as long as 1/8 unit load transceivers are used. Maximum data rate is 64kbps.
> Quiescent current is 1.6uA with receiver enabled. Current consumption is
> 2.5mA in TX @ 64kbps. I'm not using terminators, which is one of the reasons
> for reduced cable length, reduced data rate, but for reduced power
> consumption, too. I have many different documents (downloaded from web) with
> thousands of pages about RS485 networking and I studied them very carefully
> so you might say that I know what I'm doing. Unfortunately none of these
> documents talks about software techniques, just hardware, so I had to post
> this "automatic network configuration" question in order to have
> plug-and-play type of network (no user intervention required). OK?
>
OK, so it works then. Excuse me for pointing about some problems which
are entirely known.

best regards,
Vasile




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: RS-485 Networks - Solution - Gilmar - Apr 27 8:19:00 2004


I have developed PROFIBUS products that use RS485 how physical layer, and It
work since 19200 bps to 12Mbps.
The line lenght depend on the baud rate and you need to put the terminator
of the 120 Homs resistor.
The number of the slaves is 0 - 127.

Regards,
Gilmar

----- Original Message -----
From: "Igor Janjatovic" <>
To: <>
Sent: Tuesday, April 27, 2004 9:32 AM
Subject: Re: [piclist] RS-485 Networks - Solution > > And the line lenght or the current drive will decrease as well...
> > You can't generate the RS485 standard current if there is no power
> > compsumption.
> > If you'll keep your horse without feed him, someday will die...:)
> > Or you can feed him with food/32, food/64 or food/128... but more
> > often... than food/1.
>
> Problem was "automatic network configuration" and this problem is solved
> successfully, thanks to people on this group. I have no problems with line
> length, current drive, power consumption or anything else in my
application.
> You are right about everything but I already know all of that :)
>
> Line length is reduced but still acceptable for my application. Maximum
> number of slave devices is 32, which I can achieve without any problems
just
> as long as 1/8 unit load transceivers are used. Maximum data rate is
64kbps.
> Quiescent current is 1.6uA with receiver enabled. Current consumption is
> 2.5mA in TX @ 64kbps. I'm not using terminators, which is one of the
reasons
> for reduced cable length, reduced data rate, but for reduced power
> consumption, too. I have many different documents (downloaded from web)
with
> thousands of pages about RS485 networking and I studied them very
carefully
> so you might say that I know what I'm doing. Unfortunately none of these
> documents talks about software techniques, just hardware, so I had to post
> this "automatic network configuration" question in order to have
> plug-and-play type of network (no user intervention required). OK?
>
> Regards,
> Igor >
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
instructions
> Yahoo! Groups Links




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )