2. Voltage levels.

The voltages found and expected on serial port lines are both positive and negative. For historical reasons, the negative voltage level is called Mark, and the positive level is called Space. In practice, most projects will interface through 1488/1489, MAX232, or equivalent circuits, which translate Mark to High and Space to Low. I will continue to use the names Mark and Space for the voltage levels on a serial port, and the names Low and High (sometimes abbreviated to L and H) for the two TTL levels. The IO port bits or ioctl() flags themselves have 1s or 0s written to them or read from them, seen on the software side. Any combinations of these do occur, so there is no automatical rule of the sort "1 is High". It all depends on what you are doing and where you do it.

So to clarify:

  • Mark is a negative voltage <-3V on a serial interface wire
  • Space is a positive voltage >3V on a serial interface wire
  • High is from 3.5 to 5V on a TTL-level line.
  • Low is at or near 0V on a TTL-level line.
  • 1 and 0 are the data values written or read in IO-ports or ioctl() parameters.
  • I have seen some circuits using 5V 74HC CMOS chips to transmit data. This seems to work, probably because most receiver circuits tend to have a threshold voltage near 1.5V, but I am not comfortable about this. What would happen if a long cable, or a less forgiving receiver, were to be used?

    The standard guarantees that any voltage less than -3V on an input reads as a Mark, and any voltage higher than +3V reads as a Space. The most extreme voltages allowed on inputs may be as high as + or - 30V. (Maxim MAX232 series)

    Some receivers may have a narrower threshold, similar to the TTL levels, where everything above 1.7V-2.4V is Space and everything below 1.2V-0.8V (including 0V and negative voltages) is Mark. This makes it possible to drive these with TTL or CMOS outputs, where a High reads as a Space and a Low reads as a Mark, but, as I noted above, I am not very comfortable with this.

    Outputs usually are on the order of 7-13 volts, positive or negative, in series with 3000 Ohms or so, and are short-circuit proof to anything between +15V and -15V, at least. These large and bipolar voltages allow long cables to be used, even up to the maximum of 115200 Baud (bit rate 115200 Hz, character rate about 1/10 of this, approx. 11k characters per second.)

    Howewer transmitting these large bipolar signals into any standard TTL or CMOS input will definitely not work. You will have to use some kind of interface circuit, whether it is a 1489 or part of a MAX232 or whatever, or you may roll your own.

    A scheme I have seen is to use the two extra outputs, RTS (pin 4/25 or 7/9) and DTR (pin 20/25 or 4/9), as power supplies, by setting one of them to Mark and the other to Space. Thus a bipolar supply is available, where the Space'd one is positive and the Mark'ed one is negative. It can deliver enough current to actually power a few operational amplifiers.

    Some serial mice also seem to use DTR and RTS for power.

    To 0. Introduction

    To 1. Pinout variations.

    To 3. Serial data format.

    Table of ASCII codes

    To index page