PCCOM - Solution Provider for RS232/422/485
Serial Communication Multi Port Serial Card Serial - TCP/IP Communication RS232/422/485 Converter and Repeater Data Acquisition and Instrument Control Real - Time Data Collection form any Serial Device |
Standard output Voltage for RS232 |
At the
EIA-232 serial port, voltages are bipolar (positive or negative with
respect to ground) and should be about 12 volts in magnitude (some are
5 or 10 volts). For transmit and receive pins +12 volts is a 0-bit
(sometimes called "space") and -12 volts is a 1-bit (sometimes called
"mark"). This is known as inverted logic since normally a 0-bit is both
false and negative while a one is normally both true and positive. The
receive and transmit pins are inverted logic, other pins (modem control
lines) are normal logic with a positive voltage being true (or "on" or
"asserted") and a negative voltage being false (or "off" or "negated").
Zero voltage has no meaning (except it usually means that the unit is
powered off). A range of voltages is allowed. The specs say the magnitude of a transmitted signal should be between 5 and 15 volts but must never exceed 25 V. Any voltage received under 3 V is undefined (but some devices will accept a lower voltage as valid). One sometimes sees erroneous claims that the voltage is commonly 5 volts (or even 3 volts) but it's usually 11-12 volts. If you are using a EIA-422 port on a Mac computer as an EIA-232 (requires a special cable) or EIA-423 then the voltage will actually be only 5 V. The discussion here assumes 12 V. Note that normal computer logic normally is just a few volts (5 volts was once the standard) so that if you try to use test equipment designed for testing 3-5 volt computer logic (TTL) on the 12 volts of a serial port, it may damage the test equipment. |
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). |