RS232/RS422/RS485

Page Contents

TTL and CMOS

When connecting serial lines to equipment different voltage lebels may need to be accounted for. TTL and CMOS are the two types of circuit with associated logic levels that you may need to convert to and from.

TTL

TTL logic is transistor-to-transitor logic where the ciruits make use of transistors for both the logic and amplification functions. It has a reasonable resistance to noise and a high switching rate. It draws more current than CMOS circuits though [Ref].

TTL circuits use 5V. The signal is low between 0V and 0.8V and high above 2V. Between 0.8V and 2V the signal is undefined. When receiving a signal a margin is added to these values to account for possible noise. Normally 0.4Vs of noise accounted for so low is defined as 0V to 0.4V and high as 2.4V or more (up to 5V).

CMOS

Draws less current than TTL. Has wider noise margins normally. Can go from 0V to 5V but can also go from 0V to 3V3 for example, and what constitutes a low or high signal is based on percentages of the high voltage [Ref].

RS232

Introduction

RS232 links 2 devices together in a point-to-point fashion. Historically the terminal end of the link is the Data Terminal Equipment (DTE). This would have been your PC, for example. It is the source and destination of the data. The other end is the Data Circuit-terminating Equipment (DCE). This would have been an old-school modem, for example. The DCE is responsible for sending the data somewhere... i.e., it was what did the communications.

Thats the history. You can connect any two devices together - it doesn't matter which is the DTE and which is the DCE so long as there is one of each.

Signal Meanings/Functions

All signal names are from the perspective of the DTE.

RS232 can be setup with a minimum of 3 signals:

+-------+                           +-------+
|       +---------TD/TX/TXD-------->+       |
|       |                           |       |
| DTE   +<--------RD/RX/RXD---------+ DCE   |
|       |                           |       |
|       +<--------SG/GND/SGND------>+       |
+-------+                           +-------+
  • TD, or terminal data, a.k.a TX or TXD, transmits data from DTE to DCE.
  • RD, or receive data, a.k.k RX or RXD, receives data sent from DCE to DTE.
  • SG, or signal ground, is a common groudn shared between the DTE and DCE so that they have common point of reference for measuring the voltages on TD and RD.

The other signals, such as DTR/DRS and RTS/CTS are used for handshaking.

Signal Volatages

The signals use negative logic. A true/high/logic-1 signal is transmitted as -5V. A false/low/logic-0 signals is +5V. Thse are the voltages used to drive the signal. However, because, over distances, signa may attenuate (weaken) at the receive +3V and -3V are accepted as low and high values respectively. Thus the RD line from the DTE's point of view uses 3V and -3V.

RS422

RS485