1

A member of our scientific collaboration designed a data acquisition box with with 4 channels @ 1 kHz that synchronizes time with GPS. He uses USB 2.0 to have the box communicate with a computer, and the COM serial interface with a baud rate of 115200 is used to transfer data to the computer in ASCII format. The manufacturer calls this "virtual serial" over USB 2.0. Consequently, all configurations such as parity, workflow control, etc... does not matter in the serial interface, but only the baud rate has to be set to 115200 for this to work.

My question is: Does this number 115200 really represent the number of bytes per second that can be maximally transferred through this port, creating a limitation of what the USB 2.0 port can do? Or does this number really not matter and the real transfer rate is about 480 Mbits/s as standard USB 2.0?

What are the factors that decide this?

Why asking? The box currently uses uni-directional serial communication to deliver data, which causes problems of losing bytes some times on computer overload. The reliable solution would be to make the connection bi-directional with checksums and ask for packets and re-ask when data is corrupted. However, if we're really limited by 115 kB/s, this means we cannot transfer 4 channels @ 1 kHz.

If you require any additional information, please ask.

The Quantum Physicist
  • 770
  • 4
  • 18
  • 36

1 Answers1

5

Serial over USB 2.0. Is it really faster than serial?

Your terminology is sloppy.
"Serial over USB 2.0" could refer to using USB-to-RS232 adapters, or refer to CDC/ACM.
Your last reference to "serial" presumably is to RS-232.

My question is: Does this number 115200 really represent the number of bytes per second that can be maximally transferred through this port, creating a limitation of what the USB 2.0 port can do?

115200 is the baudrate, which (in this case) is bits per second (and not bytes per second).
Since this is an asynchronous channel, each character/byte is individually framed with one start bit and 1/1.5/2 stop bits. So there's a framing overhead of 25% (assuming the typical configuration of 8N1).

USB is a bus, and can handle more than one data channel.
The asynchronous RS-232 data is packetized for transmission over synchronous USB, and shares the total bandwidth of the USB 2.0's 480 Mbs. (Although the typical USB-to-RS232 adapter uses only USB 1.1.)

I've witnessed four simultaneous 115200 baud RS-232 channels transmit over a single USB 1.1 connection without any hiccups.

Or does this number really not matter and the real transfer rate is about 480 Mbits/s as standard USB 2.0?

The number does matter because it is the baudrate configurured for that channel.

What are the factors that decide this?

The maximum baudrate is typically limited by the hardware and the supporting software.

Why asking? The box currently uses uni-directional serial communication to deliver data, which causes problems of losing bytes some times on computer overload.

Your data loss appears to be a case of system buffer overrun. The data is arriving faster than it's being read/processed by the application program. No flow control is being employed on the data channel to prevent the overrun.

sawdust
  • 18,591