Article View: comp.os.linux.hardware
Article #804Re: 9-bit network, serial communications
From: Olav Woelfelschneider
Date: Tue, 10 Mar 1998 00:00
Date: Tue, 10 Mar 1998 00:00
38 lines
2472 bytes
2472 bytes
Matthew Eshleman <matthew.eshleman@gtri.gatech.edu> wrote in comp.os.linux.hardware:
ME> Has anyone modified serial.c to handle 9-bit serial communications?? 9-bit
This popped up on comp.arch.embedded recently. It's an all-day issue for
some people in the vending machine business (Coca Cola MDB Protocol).
The PC Uart was not designed for 9bit communication. While I not say it's
impossible, it is *very* hard to code.
Basically, you set the even/odd parity setting so that the 9th bit comes
out right. This means that you may or may not have to change this bit
with every byte transmitted. Since the 16Cx50 is a pig, you cannot just
change the bit on the fly but have to wait until the last byte has fallen
right out of the TxD pin. You might want to disable the FIFO.
On reception it's similar. You take the parity error bit and mix it with
the current parity setting of the uart (remember, this changes all the time)
to get the real value of the 9th bit received.
So, going full duplex is even harder...
Oh, what about the new high speed uart they sell to hook up external ISDN
boxes? I think it's called 16C650 or so. Never seen it, but you might check
if they added a 9bit mode to it.
Finally, I dunno about your project, but I could imagine you are better of
wiring up your own uart board using a XR88C681 or XR68C681. These can do 9bit
just fine.
I "cheated" this way once and didn't lose a single night of sleep...
(Nah, didn't do it on a PC, you can't get a driver from me.)
--
Olav "Mac" W�lfelschneider wosch@rbg.informatik.th-darmstadt.de
PGP fingerprint = 06 5F 66 B3 2A AD 7D 2D B7 19 67 3C 95 A7 9D AF
But let your communication be Yea, yea; nay, nay: -- Matthew 5:37
for whatsoever is more than these cometh of evil. on computers
Technical Details
Message-ID:
<aud2e6.qe7.ln@tweety.athome.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bd4b93$1ec8e540$44cacf82@maecndpc.gtri.gatech.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 102b32,b0c7143e18af2f99 X-Google-Attributes: gid102b32,public X-Google-Thread: 115a30,b0c7143e18af2f99 X-Google-Attributes: gid115a30,public From: wosch@rbg.informatik.th-darmstadt.de (Olav Woelfelschneider) Subject: Re: 9-bit network, serial communications Date: 1998/03/10 Message-ID: <aud2e6.qe7.ln@tweety.athome.de> X-Deja-AN: 332692361 Content-Transfer-Encoding: 8bit References: <01bd4b93$1ec8e540$44cacf82@maecndpc.gtri.gatech.edu> Content-Type: text/plain; charset=US-ASCII Organization: THD Mime-Version: 1.0 Newsgroups: comp.os.linux.hardware,git.unix.linux