Hardware manual

20.2 Voltage Sequence for a Byte
The transmit pin (TxD) is held at -12 V (mark) at idle when nothing is being sent. To start a byte it jumps to
+12 V (space) for the start bit and remains at +12 V for the duration (period) of the start bit. Next comes the
low-order bit of the data byte. If it's a 0-bit nothing changes and the line remains at +12 V for another
bit-period. If it's a 1-bit the voltage jumps from +12 to -12 V. After that comes the next bit (-12 V if a 1 or
+12 V if a 0), etc., etc. After the last data bit, a parity bit may be sent and then a -12 V (mark) stop bit. Then
the line remains at -12 V (idle) until the next start bit. Note that there is no return to 0 volts and thus there is
no simple way (except by a synchronizing signal) to tell where one bit ends and the next one begins for the
case where 2 consecutive bits are the same polarity (both zero or both one).
A 2nd stop bit would also be -12 V, just the same as the first stop bit. Since there is no signal to mark the
boundaries between these bits, the only effect of the 2nd stop bit is that the line must remain at -12 V idle
twice as long. The receiver has no way of detecting the difference between a 2nd stop bit and a longer idle
time between bytes. Thus communications works OK if one end uses one stop bit and the other end uses 2
stop bits, but using only one stop bit is obviously faster. In rare cases 1 1/2 stop bits are used. This means that
the line is kept at -12 V for 1 1/2 time periods (like a stop bit 50% wider than normal).
20.3 Parity Explained
Characters are normally transmitted with either 7 or 8 bits of data. An additional parity bit may (or may not)
be appended to this resulting in a byte length of 7, 8 or 9 bits. Some terminal emulators and older terminals do
not allow 9 bits. Some prohibit 9 bits if 2 stop bits are used (since this would make the total number of bits too
large: 12 bits total after adding the start bit).
The parity may be set to odd, even or none (mark and space parity may be options on some terminals or other
serial devices). With odd parity, the parity bit is selected so that the number of 1-bits in a byte, including the
parity bit, is odd. If a such a byte gets corrupted by a bit being flipped, the result is an illegal byte of even
parity. This error will be detected and if it's an incoming byte to the terminal an error-character symbol will
appear on the screen. Even parity works in a similar manner with all legal bytes (including the parity bit)
having an even number of 1-bits. During set-up, the number of bits per character usually means only the
number of data bits per byte (7 for true ASCII and 8 for various ISO character sets).
A "mark" is a 1-bit (or logic 1) and a "space" is a 0-bit (or logic 0). For mark parity, the parity bit is always a
one-bit. For space parity it's always a zero-bit. Mark or space parity (also known as "sticky parity") only
wastes bandwidth and should be avoided if feasible. The stty command can't set sticky parity but it's
supported by serial hardware and can be dealt with by programming in C. "No parity" means that no parity bit
is added. For terminals that don't permit 9 bit bytes, "no parity" must be selected when using 8 bit character
sets since there is no room for a parity bit.
20.4 Forming a Byte (Framing)
In serial transmission of bytes via RS-232 ports, the low-order bit is always sent first (the bit-order). Serial
ports on PC's use asynchronous communication where there is a start bit and a stop bit to mark the beginning
and end of a byte. This is called framing and the framed byte is sometimes called a frame. As a result a total
of 9, 10, or 11 bits are sent per byte with 10 being the most common. 8-N-1 means 8 data bits, No parity, 1
stop bit. This adds up to 10 bits total when one counts the start bit. One stop bit is almost universally used. At
110 bits/sec (and sometimes at 300 bits/sec) 2 stop bits were once used but today the 2nd stop bit is used only
in very unusual situations (or by mistake since it still works OK that way but wastes bandwidth).
Serial HOWTO
20.2 Voltage Sequence for a Byte 74