View Single Post
  #11   Report Post  
Posted to uk.d-i-y
Andy Dingley Andy Dingley is offline
external usenet poster
 
Posts: 5,175
Default Long serial cable

On 11 July, 11:30, The Natural Philosopher
wrote:

Bear in mind you will have to use either no flow control or Xon/Xoff if
you only use three wires.

5, to get DTR/DSR, is better.


No, you use 5 wires with CTS/RTS as well. These control handshaking
at the character-by-character level, to avoid over-running buffers.

DSR/DTR are only needed if you can afford 7 wire, or if you really
need to deal with the "device ready" issue for batch operations.

Although you could potentially use XON/XOFF to replace either or both
of these, they're an unreliably way to replace CTS/RTS. If a character
buffer is full, the risk is that the XOFF is lost too. Besides which,
many modern devices don't do XON/XOFF.

Running in 3 wire splurge mode (no handshaking) works for slow send
speeds and fast receivers. Typically these days it works so long as
your tiny processor is sending data to your PC and the commands your
PC sends to the tiny processor are short. If you're doing large
downloads from the PC (big G code programs, display bitmaps, anything
over 1k long), then you can still get handshaking problems.

Electrically, RS232 is fussiest and 422 et al have wider margins. Even
so it's an electrically robust protocol and rarely a problem. If you
don't have multi-core, then do it with twisted pair phone cable but
put one signal and a ground down each pair. The data rates are low
enough that there's little coupling between the legs of the pair
anyway.