Is a real data rate of 115,200 or higher possible?

During some tests with the FT232R USBtoRS232 chip, which should support speeds up to 3 MBaud, I have a problem with my actual speed being only about 38 kBaud or 3.8 kB / s.

I searched the Internet but could not find comparable data to prove or disprove this restriction.

While I look further into this, I would like to know if anyone here has comparable data.

I checked with my own code and with this tool here:

http://www.aggsoft.com/com-port-stress-test.htm

Settings: data packet 115, 200, 8N1 and 64 bytes.

I would expect such results:

At 115200 baud β†’ effectively 11 520 bytes / s or 11.52 KB / s

At 921600 baud β†’ 92.16 kb / s

I need to confirm the minimum speed of 11.2 KB / s, the best speed is about 15-60 KB / s.

Based on the table, this should not be a problem - based on reality, I'm stuck at 3.8 KB / s - for now, at least.


Oh my god, I found a pretty good hint - my transmission speed is highly dependent on the size of the packets. So, using 64-byte packets, I get 3.8 KB / s using 180-byte packets, on average it is about 11.26 KB / s - and the main indicator lights up when I checked the speed by 1 byte. packets β†’ about 64 bytes / s!

Adding math to it -> 11.52 KB / s, divided by 180, is 64 bytes / s. So basically speed depends on the size of the byte. It is right? And why so?

+4
source share
1 answer

The results you are seeing are due to how the serial port works via USB. This is a USB 1.1 chip. USB transmits using packets, rather than a continuous stream, such as serial.

Thus, your device will receive a time interval, and the driver should effectively use this window. When you set the packet size to 1, you can only transfer one byte per USB packet. To transfer the next byte, you must again wait for your turn.

Typically, a USB device has a buffer on the side of the device where it can buffer data between transfers and thus maintain a constant output rate. You do not load this buffer enough when you set the packet size too small. The time interval on USB 1.1 is 10 ms, which gives you only 100 transfers per second, which will be distributed between all devices.

When you make a β€œsend” call, all your data is sent in one transmission to ensure that interactive applications work correctly. It is best to use the maximum transfer size to achieve the best performance on USB devices. This is not always possible if you have an interactive application, but it is mostly possible when you have a data transfer application.

+5
source

All Articles