I’m working on a project in which a PC communicates with an Arduino (a Colorduino, to be exact) over a serial connection. It’s an 8×8 RGB LED matrix, which will be controlled by music. The ATmega168 MCU in my beta Colorduino has such small RAM that I can only buffer at most 2 screenfuls of data, even when I reduce the color resolution from 24-bits per pixel to 12-bits per pixel. I need to send the data down to the Colorduino very quickly. There needs to be very little latency, or the lights will lag the beats of the music. The serial communication speed is not much of a problem. Each data packet I’m sending is 100 bytes, so at . Besides the raw speed of communication, there is a built-in latency, due to buffering being done by the communications drivers. Luckily, FTDI’s Windows drivers provide a way to tune down the latency a bit.
Start the Windows Device Manager while your FTDI USB->Serial cable or Arduino Duemilanove is attached. Look for its corresponding USB Serial Port under Ports (COM and LPT).
Right click on it, and select Properties from the popup menu. Next, click the Port Settings tab, and click the Advanced… button.
In the dialog which pops up, lower the Latency Timer (msec) value from its default of 16 down to 1, and click OK.
After you disconnect/reconnect your device, the new Latency Timer value will take effect.
I am not sure if there are similar settings in OSX or Linux. Hopefully, someone can dig up a similar IOCTL to achieve the same effect.