Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

two controllers handshaking over rs485.?

Status
Not open for further replies.

jit_singh_tara

Full Member level 6
Full Member level 6
Joined
Dec 22, 2006
Messages
325
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Location
Delhi , India
Activity points
4,295
since max485 is for half duplex communication , could anyone suggest how to implement handshaking in such communication.

application:

2 controllers :

1 transmitter , 2nd receiver , medium twisted pair cable with max485 on both ends....2 wire interface.

currently 1 is in transmitting mode 2nd is in receiving mode continuously,
but in real time this is not feasible , there has to be something like request to send and acknowledge signals , how do i implement these ....do i need to add more wires...
 

Hi,
Leave a one byte delay between message direction switching. The Master switches to receive mode soon after the last byte is sent out ( After TI flag in the UART is set ). The slave can wait for a minimum of half byte period after receipt of the last byte and then swich on its transmitter. Waiting for half byte period will ensure that the slave does not turn its transmitter bebore the master driver is off. The slave can start sending the bytes after a total delay of one byte period.

Just for your information, if one adds just one more pair of wires and use a 4-wire communication, all these timing problems will vanish.

Regards,
Laktronics
 
A 4-wire connection will require split Rx/Tx pairs, or a RS422 driver/receiver.

As long as you use a master/slave configuration the timing should be rather simple. Just leave a delay for the transmitter to turn off before enabling the other transmitter. This goes for both the master and the slave.

TOK ;)
 
Hi,
You can use devices like MAX491 for four wire connection.
Regards,
Laktronics
 
Just one important thing: 2 wires RS485 means 3 wires because the return path is must for long wires (1000m outdoor connection).
Ground wire is also recommended to avoid any ESD major problems.
Then 4 wires RS485 will require either a large crossection return or (best choice) two return wires, one for every two pair.
 
Hi,

Yes Melc, you are right, for the four wire (separate pair of wires for TX and RX )RS485, you will need a twisted pair cable with minimum four pairs of wires as follows:
- One pair for TX
- One pair for RX
- One pair for ground
- One spare pair.
If you use a two wire RS485, you will still require a Three pair wire at the expense of some timing problems and need to enable Master TX.

Regards,
Laktronics
 
hi lactronics ,
thanks for help !

please suggest how 4wire would help , 2 for twisted pair , what other two you are talking about
 

Hi,
Simply stated 4wire connection means send and receive use separate paths and nothing more. How many wires are physically used, depends on the application.

As I have given above a 4-wire RS485 may reqire a cable having 4pairs of twisted wires, one pair for the differential TX signal from master to all receivers of slaves , second pair connecting differental TX from all slaves to RX input of Master, third pair (both wires of the pair) used to connect ground signal of the master to ground signals of all slaves. The fourth pair is simply kept as a spare. In addition, cables used for industrial applications may have an overall shield connected to ground at one point and an armouring ( braided metal conduit) used to provide mechanical strength to the cable as well as to serve as a second grounded shield to protect against radiated noise pickups.

Regards,
Laktronics
 
thanks a lot , that was really helpfull , you owe me a lot , thanks .i want to know whats your profession or field of work...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top