Re: need to read serial data at non-standard rate (2700 baud)

New Message Reply About this list Date view Thread view Subject view Author view

Andreas Bogk (ich@andreas.org)
Fri, 23 Oct 1998 18:47:11 +0200


On Fri, Oct 23, 1998 at 12:17:09PM -0400, Steven Cooper wrote:
> Does anybody on this list know enough about standard PC UARTs to know
> how to set an appropriate divide-by constant to achieve the desired bit rate?

PC UARTs generate the baud rate by dividing 115200 by an integer value.
So the closest you can get to 2700 is 115200/43 = 2679. This is an error
of less than 1%, so it should work.

If you are using Linux, use the setserial command to set a custom divisor
of 43. If you enable a custom divisor, it is used instead of the default one
when you select a baud rate of 38400.

So, do

$ setserial /dev/ttyS0 spd_cust divisor 43

and then select a baud rate of 38400 in your application.

On other OSes, you're probably on your own.

Andreas

-- 
Gwydion Dylan Development -> http://www.randomhacks.com/dylan
"We're fully buzzword-compliant."


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:15:22