[Python-talk] Pyserial questions
lkvam at venix.com
Fri Mar 6 09:10:19 EST 2009
It's been many years since I've dealt with serial connections with
severe timing restraints. This could be obsolete advice.
On Fri, 2009-03-06 at 08:41 -0500, Bruce Labitt wrote:
> In python under windows, is it possible to set up a timed event that
> sends a serial (binary) message to a device every 50ms and
> 'simultaneously' reads a message (serial binary) data from the same
> device? The receive data is about 55 bytes.
If the other end of the serial cable needs reliable timing from your
Windows box, I think you are out of luck. Having said that, I've done
OK in the past on Win98 with 50ms timing. The device (a firmware
burner) was able to tolerate the timing variations OK.
55 bytes/message * 20 messages/sec * 10 bits (8 data,start,stop)/byte == 11000 bits / sec
So you need 19200 or better connection rate (and presumably
Your timer would be pushing the characters into the output buffer and
reading from the input buffer.
> I have not played in this realm (controlled timing under windows) so I
> am not sure if it is hard or close to impossible. On a micro with no
> OS, it is trivial.
> How much oomph (real technical term there...) would be required to
> decode the received data and run a wx display giving a 'realtime' view?
No useful experience here.
> (I'm thinking of a couple of gauges and maybe a scrolling graph.) I
> know it is an unfair question but I am trying to get a realistic
> perspective on my general approach.
> Python-talk mailing list
> Python-talk at dlslug.org
1 Court Street, Suite 378
Lebanon, NH 03766-1358
More information about the Python-talk