Master slave communication problem in RS485

Thread Starter

Sathish kumar S

Joined Apr 5, 2018
2
Hi,


In my project RS485 interfacing with UART communication. I'm facing a master slave communication problem on RS485. i.e The RS485 is working good on one master and one slave. But going to one master to multi slave communication not responding and getting an error on after 2 t 10 sec. I'm communicating with different slave address.

Thanks.
 

Picbuster

Joined Dec 2, 2013
1,047
I assume half duplex
Did you;
terminate the line ends (120 ohm)?
polarity signal lines correct?
no ground loops?
use the correct addresses?
create a sufficient turnaround time?
Are all slaves always in listen mode unless addressed by master?

Picbuster
 

Thread Starter

Sathish kumar S

Joined Apr 5, 2018
2
Hi Picbuster,

Thank you for replay.
I have verified everything you have mentioned, all are good.
But still I am facing same issue that I have mentioned above.
If there any other way to find the issue please share.
 

Sensacell

Joined Jun 19, 2012
3,442
You need to divide the problem by domain:

1) Use an oscilloscope to validate that the communications hardware is working or not.

2) If the hardware is working, use a protocol analyzer to determine where the software is failing.
 

Picbuster

Joined Dec 2, 2013
1,047
process:
all including master listen.
When line is free Master send >>> attention address data checksum terminator ( attention eq. soh / stx terminator eot / etx depending on implementation)
data could carry command like a request or set registers
and wait
slave check address not addressed data in bin clear all buffers.
slave addressed yes respond with attention address ack checksum terminator ( wen checksum false nack)
master could resend ( n times when nack received. Still nack remove address from poll list)

Now master to multi slave ( this is an address all listen to but, depending on software, no response given)
(Like a shot in the air)
Or
All slaves listen when no activity on the lines they will give a response.
Master to control slaves answers ( did they all respond?)
Yes continue transmission when needed.

No oops a problem poll the missing one with his unique address.
Fail remove from poll list.
The list with "dead' slaves should be activated after N time laps allowing them to come on line.

All this byte moving, sniffing and waiting takes time.( baud rate and MPU speed depended)

If one master slave works then timing or addressing could be the issue.

Picbuster
 
Top