Reply-To: "John B"
From: "John B"
Subject: Re: designing COM port interface without UART
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
Date: Sat, 26 Oct 2002 02:47:30 GMT
NNTP-Posting-Date: Fri, 25 Oct 2002 19:47:30 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net
"Peter Bennett" wrote in message
> >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
> >protocol applies? If this is variable, what is the default?
> >Suppose it's NRZ. Can you further advise what that means? May I
> >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.
Ah. Thank you. The levels on the line are simple to generate, then. A "1"
at the upstream computer becomes a simple voltage level on the serial line,
rather than a voltage transition, or lack thereof.
> 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).
OK, I got that. Also, I see that a parity bit follows immediately after the
last data bit, in the frame. However, what if there is "no parity"? Does
the "parity bit" disappear, and the stop bit immediately follow after the
last data bit, in the frame? Or does the parity bit become another stop
bit; i.e, always a "space"? (Sorry if this sounds like a stupid question,
but I'd hate to miss this.)
> >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".
OK. And that's a low voltage (e.g., -12 VDC) on the serial line.
> 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.
Yes, there might be something there. I'm glad you came along, however, as I
haven't gotten the answer to my protocol question elsewhere. That is, I was
confused as to whether logical bits were defined physically on the serial
line by voltage levels, or voltage transitions.