+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Advanced Member level 3
    Points: 7,815, Level: 21
    buenos's Avatar
    Join Date
    Oct 2005
    Location
    Sunnyvale, California, USA
    Posts
    953
    Helped
    41 / 41
    Points
    7,815
    Level
    21

    uart st16c550 rs485

    hi

    for RS485 half duplex or multidrop systems, we have to disable the TX driver when we are not transmitting. Normally it is done by the DTR or RTS signal from the UART, controlling the buffer within the transceiver.

    Is there a way to generate this automatically by the UART without any software intervention? is it in the standard PC 16550 UART?

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 260,203, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,441
    Helped
    13825 / 13825
    Points
    260,203
    Level
    100

    rs485 automatic driver enable

    Some recent UARTs have an option to generate RS485 TE automatically, e.g. EXAR ST16C650, but standard 16550 doesn't. The common solution is a a timer, that enables the transmitter for defined period after a TX bit. There are basically two options:
    - Using a long TE intervall (> 1 character frame). Involves a risk of collisions, if the peer responds too fast.
    - A short TE intervall, just sufficient to drive the cable capacitance to the opposite level. Operation depends on meaningful dimensioned bias resistors in the termination network and isn't realiable for long cables.

    An exact, frame accurate transmitter control can be achieved from an UART generated TE signal (as with said ST16C550), with a driver software generated TE (at least at low and medium speed) and by an external hardware, that is decoding the protocol (as with some RS485 repeaters).



  3. #3
    Advanced Member level 3
    Points: 7,815, Level: 21
    buenos's Avatar
    Join Date
    Oct 2005
    Location
    Sunnyvale, California, USA
    Posts
    953
    Helped
    41 / 41
    Points
    7,815
    Level
    21

    rs485 without enable

    hi

    thanx.
    actually I found a nice solution on the internet:
    -dont disable RX during transmit operation
    -enable/disable transmit by GPIO (RTS pin on superio)
    -send a termination caracter as a last one in every transaction.
    -enable tx before transmit starts, disable in RX-interrupt routine when termination character was received back. so not in a TX complete irq routine beceuse it is unaccurate.
    -during TX mode, throw away all received data in RX-interrupt routine.



--[[ ]]--