[lug] 16550 Serial port buffering?
Scott A. Herod
herod at interact-tv.com
Fri May 25 09:56:35 MDT 2001
"D. Stimits" wrote:
>
> "Scott A. Herod" wrote:
> >
> > After 3 days of trying to get it to work....
> >
> > "man setserial" search for low_latency.
>
> Makes me wonder if this could have a beneficial effect on the serial
> port of a 56k modem while working with games that require low latency.
> When I get around to it, I think I'll give it a try (not exactly serious
> work, but hey, someone needs to be less serious).
>
> D. Stimits, stimits at idcomm.com
I think that it would depend on the rate at which you are receiving
data. From watching a scope and reading the man page, it looks like
the serial port ( with default latency ) buffers for about 10 msec
if it gets a small ( 4 byte in my case ) burst. I imagine this
happens to wait for more data before triggering an interrupt.
I was needing to get 60 hz clock ticks ( 59.97 hz actually I think )
and start sending a response in about 11 msec. Now, setting the
low_latency flag, I can get data in and out in 4 msec consistantly.
I'm not sure why 4 msec seems to be the minimum. I was watching
on a scope a pulse coming in followed by my response to a read
followed immediately by a write. It's consistantly 4.3 msec.
I've tried using select, poll, and just looping on a read and
it doesn't seem to change how fast I can turn around.
Scott
More information about the LUG
mailing list