RS485 TX Enable

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times
Contact:

RS485 TX Enable

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS485 TX Enable

Post 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.

Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times
Contact:

Re: RS485 TX Enable

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS485 TX Enable

Post by Benj »

Hello Ron,

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

Post Reply