[Rxtx] Latency Woes
Kustaa.Nyholm at planmeca.com
Mon Mar 7 21:43:57 MST 2011
On 3/8/11 05:51, "jfh at greenhousepc.com" <jfh at greenhousepc.com> wrote:
>None of that is relevant, as long as the UART is reasonable and the code
>implements a proper half duplex protocol.
>If I understand correctly, you send a byte, the sensor sends back two
>bytes. So long as you don't send the next byte until the two bytes are
>in the UART receiver FIFO, you're fine. You don't have to actually
>=read= them, just know they are available.
To the OP,
are you using a serial USB port, like FTDI?
This has a built in latency of 10ms ie nothing is actually sent
out of the device if you send less than 64 bytes until 10 msec
timeout. This has nothing to do with RxTx. If you search the
list archives you'll find more about this issue and IIRC someone
reported that there is some diver parameter you can tweak to
get rid of that latency.
I'm sure the FTDI people had a good reason for this but it really
brings down the communication speed if your protocol uses short
messages and need to wait for a response.
Sorry if this has already been mentioned or if this is not relevant,
I've not been paying attention to this thread.
More information about the Rxtx