Re: RS232 or USB to RS485

From: Hans-Bernhard Broeker (broeker_at_physik.rwth-aachen.de)
Date: 02/13/04


Date: 13 Feb 2004 09:35:43 GMT

Paul Keinanen <keinanen@sci.fi> wrote:
> On 12 Feb 2004 15:35:24 GMT, Grant Edwards <grante@visi.com> wrote:

> >That's what I've been told the Windows serial driver does: It
> >checks the shfit-register empty status bit every millisecond
> >until true, then drops RTS.

> If that is really true, then this is a nice feature if you are
> operating at 1200 bit/s or below, in which case you are probing every
> bit, but at 115k2, one milliseconds is more than 11 character times
> and in the worst case the master (PC) transmitter is on, while the
> slave is already sending the 11th byte of the response :-).

Well, that's what you get for trying to force a piece of hardware
designed for one line discipline (like the 16550 is for RS232), driven
by a system that isn't anywhere near usable as an RTOS, to talk an
inherently incompatible language at its full native speed. That's a
bit like handing a blacksmith a sledgehammer and expecting him to make
you a wedding ring.

If you're building an embedded system you can patch up the defects
with some additional circuitry and sufficiently responsive pieces of
software --- but that would invalidate the whole reason for putting a
16550 instead of a dumber kind of UART on the board: the luxury *not*
to have to do all the nitty-gritty bit-fiddling of control lines in
software, and *not* to have to reliably handle any interrupt request
within on byte-time of the serial link.

So, in a nutshell: yes, some UARTs can drive both RS232 and RS485,
either by design or with a bit of glue logic in hardware and software.
But no, your typical 16550 (or work-alike core) found in a PC running
Windows is *not* in that category.

-- 
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.


Relevant Pages

  • Re: Writing pins to the RS232
    ... > existing driver and hold a pin on high? ... It's been a long time since I've looked at this low-level hardware, ... A serial port is driven by a thing called a UART (Universal Asynchronous ... Could you design a piece of hardware which could function as both a serial ...
    (comp.lang.python)
  • Re: Secure C library
    ... >>Yesterday Samsung announced a flash memory of 16GBit. ... >>Let's do not design for the hardware of yesterday. ... Then again 10 years ago I did an embedded system with a 64 bit MCU ...
    (comp.std.c)
  • Re: Security and EOL issues
    ... OS software resources are designed that reserved ram and disk space among other resources, to reflect what current hardware size is available. ... (There was a security patch a few years ago that could not be applied to NT4 as it required more resources then NT4 could provide. ... Installing air bags requires that the automobile manufacturer design, test, ... Computer Emergency Response Teams, and Digital Investigations. ...
    (Security-Basics)
  • Staff HW Engineer ~ Lead Us to ATCA & Beyond in Your End-to-End Board-Level HW Desig
    ... The senior level hardware engineer looking for the product realization ... and true ownership that comes with full end-to-end board-level hardware ... help us retain dominance in the design of high performance switching ...
    (comp.arch.embedded)
  • Re: 10khz DBSK decoder
    ... In an AVR, you may want to come closer to the 'hardwareish' thing: run the whole thing as a Costas loop or as a signal-square-and-PLL, and do integrate-and-dump. ... In retrospect, the ISR should have just taken ADC samples and shoved them into a queue, then set a flag. ... But I had never seen that design pattern, so it just ran with that big bloated ISR... ... You'll get more consistent timing if you can trigger your ADC from hardware and interrupt on the end of conversion pulse. ...
    (comp.dsp)