1. We will be in Read Only mode (no new threads, replies, registration) starting at 9:00 EDT for a number of hours as we migrate the forums to upgraded software.

RS-485 termination resistors

Discussion in 'Embedded Systems and Microcontrollers' started by zazas321, Jun 11, 2019.

  1. zazas321

    Thread Starter Member

    Nov 29, 2015
    432
    6
    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?
     
  2. ericgibbs

    Moderator

    Jan 29, 2010
    8,556
    1,726
  3. zazas321

    Thread Starter Member

    Nov 29, 2015
    432
    6
    Thank you ericgibbs. Also, considering that I need communication both ways, looking at this picture: [​IMG]

    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?
     
  4. ericgibbs

    Moderator

    Jan 29, 2010
    8,556
    1,726
  5. zazas321

    Thread Starter Member

    Nov 29, 2015
    432
    6
    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?
     
  6. ericgibbs

    Moderator

    Jan 29, 2010
    8,556
    1,726
    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: Jun 11, 2019
  7. zazas321

    Thread Starter Member

    Nov 29, 2015
    432
    6
    Thank you.sir. Will do some more research now.
     
Loading...