Re: Events on Serial port
- From: Derek <derek.philip@xxxxxxx>
- Date: Fri, 4 Jul 2008 02:07:08 -0700 (PDT)
On 4 Jul, 08:09, Rolf Schroedter <m...@xxxxxxxxxxx> wrote:
Derek wrote, On 03.07.2008 23:02:
I'll take at look at these suggestions at work next week, I have amore
pressing problem in that the polling version that works fine under
linux dosn't under windows.
It seems a write over the serial port is screwwing things up some
where. I have to find out what this issue is before I can get any
further.
Write issues: Many people are not aware, that a non-blocking channel
means non-blocking reads *_and writes_* (this was different for
Windows-Tcl before 8.4).
Non-blocking writes means, that your [puts $chan] returns immediately
buffering the data for background write *_at full baud speed_*. A slower
receiving hardware may have problems with those writes.
[fconfigure $chan -queue] opens alternatives to you:
(A) Blocking channel, polling [fconfigure $chan -queue] in an
after-script until the expected number of bytes have been received.
(B) Non-blocking channel, waiting for the output bytes to be sent after
each write operation.
What do you mean by full speed, at the set baud rate?
I presume the latency in the actual write from the background is OS
dependant!, this may not be the issue but would have an impact on what
I'm doing.
I have quite strict timing, i need to detect and process RDS data
within 22mS worse case.
This is fine under Linux, Tcl is quite fast at doing the processing,
getting the data into the script is the slow part!
Derek
.
- Follow-Ups:
- Re: Events on Serial port
- From: Rolf Schroedter
- Re: Events on Serial port
- References:
- Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Rolf Schroedter
- Re: Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Ralf Fassel
- Re: Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Rolf Schroedter
- Events on Serial port
- Prev by Date: Re: Events on Serial port
- Next by Date: Re: Events on Serial port
- Previous by thread: Re: Events on Serial port
- Next by thread: Re: Events on Serial port
- Index(es):
Relevant Pages
|