7
\$\begingroup\$

According to here, UART is a hardware device that implement the asynchronous serial communication protocol.

And according to here, RS-232 defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors.

I think the UART alone is enough to determine the timing of the communication with start/stop bits.

And I saw below graph from here. It also shows only pin 2 and 3 of RS-232 are used by UART, which are merely for data RX and TX.

enter image description here

enter image description here

So,

  • How does the RS-232 circuit participate in the timing of async serial communication if it really does?

  • It seems to me UART only cares about 2 pins of RS-232. RS-232 was born long before UART. So it seems UART is essentially enabling the async serial communication on the good old RS-232 hardware by re-using the 2 pins of RS232 which happen to have the same semantic of Rx/Tx.

  • Is it appropriate to consider the UART IP as the logical part of the whole communication process and the RS-232 only as merely a conductor/carrier?


(inspired by @jonk's comment)

So when enabling UART on RS-232, we must consider the restrictions of RS-232. But if enable UART on other interfaces, a much faster bps may be achieved. So in this sense, RS-232 is somehow affecting the timing as well.

My point is, UART and RS-232 should be decoupled conceptually though I saw in many occasions they are used interchangeably.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ The UART is a peripheral and can use various logic levels. RS-232 is an interface standard and includes many more details (such as a \$3\:\text{k}\Omega \le R_{_\text{IN}}\le 7\:\text{k}\Omega\$.) The UART sets up the timing and sampling. RS-232 sets up the signaling and other details. Yes, the UART handles the timing from a simplistic point of view. However, RS-232 deals with the analog details. Those analog details impact timing. In general, RS-232 supports about \$19.2\:\text{kBPS}\$. Anything beyond that (despite the UART) will require careful analog analysis. \$\endgroup\$
    – jonk
    Commented Feb 13, 2022 at 8:41
  • \$\begingroup\$ @jonk Thanks. So when enabling UART on RS-232, we must consider the restrictions of RS-232. But if enable UART on other interfaces, a much faster bps may be achieved. My point is, UART and RS-232 should be decoupled conceptually though I saw in many occasions they are used interchangeably. \$\endgroup\$ Commented Feb 13, 2022 at 8:47
  • 1
    \$\begingroup\$ Yes, I suppose that's an OK viewpoint. RS-232 sets some limitations. But it also provides some noise immunity. But yes, you can decouple the concepts to a degree. Your UART can drive some kind of logic output (a separate analog consideration) at some rate you determine. The signaling you use, though, will impact the maximum rate. If you use RS-422 or RS-485 then you have different considerations than if you use RS-232. Or, if you just keep the logic levels as they are, you have yet another set of considerations. Everything in its place, so to speak. \$\endgroup\$
    – jonk
    Commented Feb 13, 2022 at 9:00
  • \$\begingroup\$ If you want higher speed serial than a UART achieves, there are much better and more modern interfaces. \$\endgroup\$ Commented Feb 13, 2022 at 21:05

3 Answers 3

7
\$\begingroup\$

The RS-232 specification requires that the RS-232 electrical voltages have a limited rate of change, it defines a slew rate of 30 volts per microsecond maximum. That is the timing for the physical interface and it will be applied to any data stream that needs to be transmitted.

UARTs only care about RX and TX is a false statement. Most UARTs these days and also do handle the handshake signals, some even react to the handshake signals automatically to implement flow control in hardware than software. And asynchronous serial communications was certainly possible before UART and even before RS-232. As you may know, RS-232 is just a standard for a physical interface first published in the 1960, it does not define what data and how you send it. UART as a single chip was not publicly available before 1971, but the same functionality was available as a large PCB filled with logic chips in 1950s. And asynchronous serial communications certainly have existed earlier and implemented as rotating mechanical switches.

Your final statement that UART is the logical part and RS-232 the physical interface is true. Yes, you can UART without a physical interface for logic level communications between chips, or you can use UART with RS-485 or RS-422 or LVDS or CAN or any other physical interface. The UART just implements the protocol how to transmit and receive bits, and the protocol the UART uses is called asynchronous start-stop framing and bits are sent using NRZ line encoding.

\$\endgroup\$
6
\$\begingroup\$

My point is, UART and RS-232 should be decoupled conceptually

They are, at least when used correctly (some would say: pedantically).

UART (I think the technical name, which no-one uses, is non-return-zero encoding) defines the sequence of physical 1's and 0' used to transmit a data word. With UART, this is 1:1, plus a start bit, an optional parity bit, and a varying number of stop bits.

RS232 (and a few other RS-family specs) define how a phyiscal 1 or 0 is represented electrically (voltage leveles), including the timing (shape) of the transitions, the alowed overshoot, etc. RS232 also specifies driver an receiver impedances, IIRC cable characteristics, and baudrate versus cable-length limits. And it throws in some connectors, and 'seconday' pins, with a not-to-clearly defined functions.

So yes, UART and RS232 ARE decoupled, in the sense that you can for instance use UART over RS485, or NRZI encoding over RS232.

\$\endgroup\$
2
\$\begingroup\$

Additional information to help readers that come to this question:

Douglas V. Hall in his book “Microprocessors and Interfacing. Chapter 13 titled: RS-232C Serial Data Standard:” points it out very well:

In 1960, with the wide spread of computer terminals and the development of modems to use phone lines for communication the Electronic Industries Association (EIA) developed EIA standard RS-232C. The standard describes the function of 25 signal and handshake pins for data transfer.

The standard also describes voltage levels, impedance levels, rise and fall times, maximum bit rate, and maximum capacitance for these signal lines.

In summary, RS-232C describes the hardware characteristics for use in serial communication through a pair of lines (phone lines in this case) between a DTE (Data Terminal Equipment, i.e. computers and terminals) and a DCE (Data Communication Equipment, i.e. modems and other types of communication equipment).

Hall goes on to describe further the standard indicating that the 25 pin DB-25P DTE connector (although other pin size connectors have been used in the market) should be a male and the DCE connector a female.

It also describes the issues of compatibility when connecting equipment using the RS-232C standard.

It is a good reading to understand how RS-232C came about and how it interacts with a UART like the Intel 8251A.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.