
91
Logic Levels
It is this aspect which causes the most bewilderment among users, largely because of the counter-
intuitive naming conventions used. The negative voltage is referred to as a logic 1 or 'mark' condition
and a positive voltage is referred to as logic 0 or 'space' condition.
A driver transmitting data on the TxD pin idles in the logic 1 or 'mark' state, i.e. with a negative
voltage output. In the absence of data being actively sent from the remote device, the voltage on the
RxD pin will also be negative, because that is the idling state of the driver at the 'far' end of the link.
In the case of the control signals, a de-asserted signal is one in the 'mark' or negative voltage state. For
example, DTR is asserted if it goes from the negative (logic 1, mark) state to the positive (logic 0,
space) state, as here:
It may be noted that all of the common RS232-to-logic level converters (MAX232, 1488,1489) invert
the polarity of the transmitted and received signals. So a TTL 'high' level, logic 1, +5V, corresponds
to a negative RS232 voltage (somewhere between -3V and -15V).
Data Protocols
Serial data on an RS232 link is transmitted asynchronously, i.e. a separate clock signal is not required
and the start of a data byte can occur at any time. To achieve this, a logic 0 start bit is sent, followed
by the data bits, and ending with a logic 1 stop bit. I will only consider here the commonest 8N1
format - a start bit followed by Eight data bits, No parity bit and One stop bit. The data bits are sent
in least-significant-bit first order. All the bits (start, data and stop) have a duration equal to the
reciprocal of the baud rate. Note that the technical definition of baud rate is more complex, and it only
happens that baud rate and bit rate are equal for the simple binary signaling system used on RS232
links. To send a single byte takes 10 bit times (1.042 ms at 9600 baud). Since a start bit can
immediately follow a stop bit, at 9600 baud the maximum throughput is 960 bytes per second.
Here is the letter 'M' in ASCII coding (hex 4D, binary 01001101) sent according to the 8N1 format
at 9600 baud, as it appears on the TxD pin:
Kommentare zu diesen Handbüchern