cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual COM Read Speed

daryl2
Associate II
Posted on June 29, 2007 at 00:13

Virtual COM Read Speed

3 REPLIES 3
daryl2
Associate II
Posted on June 27, 2007 at 05:57

Using an STR750 and Virtual COM port example given in STR7STR9 USB developer kit. I realise that when I transfer a text file through the virtual COM port using hyperterminal, the device side is receiving the data one byte at a time. Since the VIRTUAL_COM_PORT_DATA_SIZE is 64, shouldn't it receive more than 1 byte of data? For a USB2.0 device, it is quite inefficient to receive one byte at a time. Is this a STR750 USB setting issue or it is due to the usbser.sys driver use by Windows? Thanks

jpeacock2
Associate II
Posted on June 28, 2007 at 14:26

''this a STR750 USB setting issue or it is due to the usbser.sys driver use by Windows?''

More likely it's a problem with using hyperterminal. A full speed USB transfer using interrupt can transfer a 64 byte packet every 1 millisecond. USBSER.SYS handles packets, not byte at a time, so if you see single byte transfers it's the programming on the PC side. An application that reads/writes larger records instead of byte at a time will work much better.

Jack Peacock

daryl2
Associate II
Posted on June 29, 2007 at 00:13

Thanks JakBird,

You ae right. I just written an application which transmit data to the device using the following function.

WriteFile(hVCOM, bData, 20, &dwTemp, NULL);

Debugging shows a 20 bytes packet is received as compared to receiving a 1 byte packet using the hyperterminal, wasting the bandwidth transfer 1 byte packets.

[ This message was edited by: tiger4 on 29-06-2007 03:50 ]