[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: I need to configure serial port to send 5 bit characters
OK, this trick worked for sending characters, however I have another
is that the B75 baud rate (75 baud) does not seem to work.
I am using cfsetospeed with B75 but the baud still seems to be 9600 coming
the serial port.
Is 75 baud not supported by the UART? Is there a way to manually set the
divisor from a user program?
At 09:27 AM 10/4/2002 +0200, email@example.com wrote:
>even when the hardware does not support 5 bits (and that's a fact) you can
>5 bit characters using a simple trick:
>1. Configure the serial port for 8 data bits
>2. Take your character and shift it left by 3
>3. Set the 3 lowest bits to 1
>4. Send it out
>This should basically work, but you have o live with some limitations.
>- Between two characters you have now 3 more stop bits, this means that you
>cannot send at the full data rate
>- This works only on transmitting. When you want that receiving works the
>way you must ensure that the opposite system inserts also some pause time
>between two characters, and you have to mask off the "unused stop bits".
>Hope this may work for you,