From: Peter Bennett
Subject: Re: designing COM port interface without UART
Date: Fri, 25 Oct 2002 18:58:19 -0700
Organization: Home for the Hopelessly Helpful
X-Newsreader: Forte Agent 1.8/32.548
On Fri, 25 Oct 2002 23:54:06 GMT, "John B" wrote:
>I'm reviewing the EIA-232 specification (formerly known as RS-232C). It
>describes hardware requirements, such as voltages, slew rates, etc. I have
>also read a basic primer on serial communiation, which says that EIA-232
>does not specify the type of pulse train used. That is, the asynchronous
>protocol is undefined by EIA-232. The same primer suggests two protocols
>for this purpose: "Two methods in which a data signal is self-timed are
>nonreturn-to-zero and biphase Manchester coding." I suppose there are
>I'm trying to build a DTE serial communication device that will communicate
>with the ordinary serial port of a computer or dumb terminal. (I realize
>I'll have to install a null-modem(i.e., criss-cross) in the cable, as
>computers and dumb terminals are themselves DTE devices.) A UART is not to
>be used. I would like to include RTS and CTS.
If you are building this device, you can make the pinout whatever you
want - if you know it will always connect to a PC serial port, make it
so you can use a straight-through cable, for convenience.
>I understand the pertinent standard to be EIA-232, but that alone doesn't
>tell me how to shape the asynchronous pulse train. Can anyone advise what
>protocol applies? If this is variable, what is the default?
>Suppose it's NRZ. Can you further advise what that means? May I speculate
>that if a subsequent bit is a "1" then there is necessarily NO transition
>through 0 volts?
The normal PC serial port uses NRZ coding. A logic 1 is always the
negative voltage on the line, and a zero is the positive voltage, so
the usual RS-232 level converters are also inverters.
>This is a bit confusing. Suppose we describe the voltage levels that are on
>the cable, half-way between two boxes that are connected by EIA-232 serial
>Please confirm or correct.
>1) I have read that a "mark" corresponds to a negative voltage, such as -12
>VDC. Conversely a "space" is +12 VDC.
>2) A quiescent cable carries a "space" condition.
>3) A start bit is necessarily a "mark."
>4) The voltage levels of the information bits (e.g., 8 data bits) is
>by the protocol; e.g., NRZ.
>5) If there's a parity bit, then I'm clueless as to whether its voltage
>follows from the protocol of the data bits, or if a "1" is always one
>voltage or the other.
For even parity, the parity bit will be a logic 1 (negative) if the
number of "1" data bits in the byte is odd, in order to make the total
number of "1" bits even. (and vice-versa for odd parity).
>6) Ditto for stop bit(s).
A stop bit is just a return to the idle (positive) state for at least
one bit time.
>7) And can someone clarify if a "1" is a "mark" or a "space"? I suppose
>doesn't matter, until I try to explain my system to someone else.
Mark corresponds to a logic "1".
Even though you don't intend to use a UART, I suggest you study a UART
data sheet to see what data format is normally used.
Peter Bennett, VE7CEI
new newsgroup users info : http://vancouver-webpages.com/nnq
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver-webpages.com/van-ps