Can Python serial support run at 45.45 baud?

Hendrik van Rooyen mail at microcorp.co.za
Sun Feb 15 05:18:37 EST 2009


"John Nagle" <nagle at ...ats.com>wrote:


> So the correct combination, 5 bits with 1.5 stop bits, isn't supported in
> Python.  1 stop bit will not physically work on Baudot teletypes; the
> main camshaft doesn't come around fast enough.  (Yes, there's an actual
> mechanical reason for 1.5 stop bits.)  Requesting 2 stop bits at the
> Python level gets a reject at the Win32 level.  (Not sure why Win32
> doesn't allow that; extra stop bits just add delay, but don't hurt
> anything.  But it's not supported.)

If you can get down so low in baud rate, then you can fudge it in software.
Set the port to the single stop bit, and make a transmit character function
that outputs a single character and a flush(), and then waits for a bit time 
or so - time.sleep(0.022) will do the trick - means you have to make
a string transmitter that calls your character transmitter - you cannot
just write a string to the port - but that is no great hardship.

The receive side will not be a problem, as the syncing is done every char.

- Hendrik





More information about the Python-list mailing list