Re: linux and rs-485

From: Paul Keinanen (keinanen_at_sci.fi)
Date: 08/05/03


Date: Tue, 05 Aug 2003 19:15:58 +0300

On Tue, 05 Aug 2003 14:43:18 +0200, Bernhard Roessmann
<roessmann@gmx.net> wrote:

>Is there really no chance to control RTS in a right and efficient way?

You either need a special UART in which the Tx shift register empty
status bit directly controls the RTS signal, which then controls the
transmit enable/Rx disable pin, use an external intelligent RS-232/485
controller or use the tri-state trick, which is not standard
compliant.

Using a proper RS-485 card with proper hardware handshake is the
simplest solution.

The intelligent external converter counts the number of bits after the
start bit to find out when the (last) stop bit ended and then disable
the transmitter, if no new start bit appear immediately after the last
stop bit of the previous character. The converter needs to know the
line speed and character length (number of data bits, parity bit and
stop bits) in order to know when the character has been completed.
Usually these are set by a DIL switches.

The quick and dirty (non conforming) alternative is to control the RTS
(Transmit enable) pin directly by the RS-232 TX data stream. The
transmitter is activated only when the Space ("0") bit is to be
transmitted. When the RS-232 Tx pin is in the Mark ("1") bit state,
the RS-485 transmitter is disabled and it goes to tri-state. The
pull-up/pull-down resistors will set the line to the Mark state and
the receiver(s) will sense the "1" bit. This trick does of course not
conform to the RS-485 standard, but it works in many situations. You
may have to do your own echo cancellation in software if the RTS pin
does not disable the receiver.

Paul
  



Relevant Pages

  • Re: linux and rs-485
    ... status bit directly controls the RTS signal, ... transmit enable/Rx disable pin, ... the transmitter, if no new start bit appear immediately after the last ... The quick and dirty alternative is to control the RTS ...
    (comp.os.linux.hardware)
  • Re: linux and rs-485
    ... status bit directly controls the RTS signal, ... transmit enable/Rx disable pin, ... the transmitter, if no new start bit appear immediately after the last ... The quick and dirty alternative is to control the RTS ...
    (comp.os.linux.embedded)
  • Re: Berg Microstamp 4L or Hitec HFS-05 ?
    ... Red Scholefield wrote: ... | We tried the Berg at the field and flew with another transmitter on ... changing the controls, because it doesn't glitch. ...
    (rec.models.rc.air)
  • Re: Wireless Speaker Transmitter Shut Off Threshold
    ... The transmitter has no controls on it, just a LED to indicate that it ... I don't know if the block the speakers is a viable ... Prev by Date: ...
    (rec.audio.tech)
  • Re: Shorting out a transmission line
    ... >where some guy stuck a pin through a ham's coax feeder and thereby ... "Pinning" a coax has a long history in the mythos of RF... ... distance from the transmitter to the short. ... power to avoid overcurrent or overvoltage damage, ...
    (rec.radio.amateur.antenna)