Page 1 of 1

RS485 TX Enable

Posted: Fri May 20, 2011 12:27 am
by Ron
Hi,

I would like to know if the Master should enable the TX output on power up/reset and only drop it low when it expects a packet from a slave (after the Master sends slave a request/command)?

OR

Should the Master only enable the TX when it needs to send out a packet, drop it low to receive the response packet.


Thank you,

Ron

Re: RS485 TX Enable

Posted: Fri May 20, 2011 9:57 am
by Benj
Hi Ron,

I would probably go with option 1 and then make sure that all the slave devices are in receive mode unless told to switch to transmit.

eg.

master sends address
master sends sample adc command
master switches to receive mode
slave switches to transmit mode
slave sends back adc reading
master and slave both switch back to start condition.

You might need to add little delays in your program to ensure that the master switches to receive before the slave switches to transmit and visa versa.

Re: RS485 TX Enable

Posted: Fri May 20, 2011 2:19 pm
by Ron
Hi Ben,

I agree, number one makes the most sense to me.

I will tie DE and NOT RE together to a PIC output pin.

I am thinking the best way to do number 1 is to use a pull up resistor tied to (DE-NOT RE) on the Master and a pull down resistor on same line of all the slaves.

On power up this would force the Master in TX and force the slaves into RX.

Does this sound good to you?

Thank you,

Ron

Re: RS485 TX Enable

Posted: Fri May 20, 2011 3:43 pm
by Benj
Hello Ron,

Yes that sounds sensible to me and I cant foresee any problems with doing that. :D