Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Optimizing Performance
Return to Introduction  Previous page  Next page
The question of how to setup an application for optimized data throughput is complicated by the format of the data that is transferred over USB. Data is transferred over USB in a series of 64 byte packets. Each packets contains two bytes that are reserved by FTDI and 62 bytes of actual data. So a 4Kbyte USB transaction contains 3968 bytes of actual data, and a 64Kbyte transaction contains 63488 bytes. In general, an x byte USB transaction yields x - ((x/64)*2) bytes of actual data.

Optimized throughput occurs when the maximum amount of data is transferred in the least possible number of USB transactions. The necessary condition is that the application's request size must be matched to the current USB request size. More precisely, optimal throughput is achieved when the application request size is a multiple of the number of actual data bytes contained in the current USB transfer size. For example, using a current USB transfer size of 4Kbytes, optimal throughput is achieved with application request sizes that are multiples of 3968 bytes.

Maximum throughput is achieved using a current USB transfer size of 64K bytes, and application requests that are multiples of 63448 bytes.