RS-485 termination resistors

Thread Starter

zazas321

Joined Nov 29, 2015
936
Hey. i am designing a designing a modbus communications for the STM32F051C8 using RS-485 interface. I am using LTC1480 chip and will be using this cable: https://www.aliexpress.com/item/PC-...MPPT-Solar-Charge-Controller/32815047857.html.

What I am confused about is why would we require to connect both outputs together through a resistor? Also, how do I know whether the USB cable on the receiving end already has a termination resistor installed to USB adapter or not?
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Thank you ericgibbs. Also, considering that I need communication both ways, looking at this picture:


I would need to control and toggle /RE and DE pins. I assume both RE DE set logic HIGH would mean that the device is transmitting and set to logic LOW will mean receiving. Would I require to monitor the status of microcontroller TX to determine how to toggle DE and RE pins?
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
But how do I control /RE and DE pins? do I link them to any GPIO pin and ensure that they are set high when transmitting and set LOW when receiving?
 

ericgibbs

Joined Jan 29, 2010
18,862
hi,
Yes, you would use GPIO Output pins on the MCU's to control those lines,
You should also consider how you will detect which 'end' of the link has priority to transmit

E

Update: is one end of the link defined as the Master and the other end the 'Slave'.?
 
Last edited:
Top