-1
\$\begingroup\$

In the "Universal Serial Bus Class Definitions for Communications Devices" document there is the "Class-Specific Request Codes" table. In this table there is the GET_LINE_CODING code that refers to the USBPSTN1.2 ("Universal Serial Bus Communications Class Subclass Specification for PSTN Devices") document.

In the USBPSTN1.2 document there is a description of the GetLineCoding with the "Line Coding Structure" table. The 6th byte of the GetLineCoding code is the bDataBits that described as "Data bits (5, 6, 7, 8 or 16)"

So, is it possible to transmit/receive 16 bits in single symbol with the UART? Do an USB-UART bridge (or something else device) which can transmit/receive 16 bits in single symbol exist? If not, what does "16" number mean?

\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

There are two different concepts mixed here. USB CDC class, and UART.

Such thing as "The UART" does not exist. UART is a thing that can be implemented by anyone in any way they want, so UARTs from different eras of computing and from different vendors have different properties.

Technically it is of course possible, nothing prevents using 16 data bits in an asynchronous start stop frame. In practice, it is unlikely that any commonly used UART has ever implemented 16 data bits, as that would be quite an exotic special case.

1 start bit, 9 data bits, one optional parity and two stop bits is approximately what typical UART implementations provide.

Now, what parameters the USB specification allows for a virtual communication interface is another thing. It may just take all combinatios you could have into account, even if no such thing exists.

You should remember, that the CDC exists to communicate with many types of devices, and the fact that there is an actual UART is a special case. Most CDC devices don't even have an UART. Sometimes they may have an USB UART chip, to communicate UART with the MCU, but all that is unnecessary if the MCU has an USB interface, so there is no UART anywhere in the data path.

So the CDC is a superset of many communication interfaces. The CDC might have parameters to support a communication interface other than UART which does have 16 bit symbols. Or, it might be there to allow 9 bit UART frames like MCUs, as everything up to 8 bit frames fit into a byte.

\$\endgroup\$
5
  • \$\begingroup\$ Of course, there is no standard that can be call "The UART". And I can make my own UART with the 123-bit symbol, for example. But some standards fixes some parameters for some reasons. I try to understand the reason that the USB CDC tells about 16-bits symbol. I think it's not possible that the autors put this number randomly to their standard. And I guess that there can be a device that support this feature of the standard. \$\endgroup\$
    – Arseniy
    Dec 27, 2022 at 14:03
  • \$\begingroup\$ @Arseniy I don't think you're going to find answers to that most anywhere on the internet; have you considered contacting the USB group to see where the number came from? Perhaps it's some obscure or archaic standard, perhaps it doesn't matter with respect to the standard (i.e. it's just a number in a field), but it seems unlikely that someone on that committee will happen upon this question (possible, but it's a long shot). \$\endgroup\$ Dec 27, 2022 at 14:33
  • \$\begingroup\$ @Arseniy Yes but you are fixated that there must be an UART somewhere on USB CDC implementation. But that's not true. The CDC class allows to communicate with whatever you want to communicate, such as a modem, and there is no requirement that it must go through an UART. The fact that there actually is an UART is a special case, and the CDC just has parameters to cover that too, which enables the CDC endpoint to set the baud rate and line parameters how it will be sent if it is an UART. I can communicate with many CDC devices like MCU directly and there is no UART and the parameters are unused. \$\endgroup\$
    – Justme
    Dec 27, 2022 at 14:33
  • \$\begingroup\$ @TimWilliams "I don't think you're going to find answers to that most anywhere on the internet" But what if :) What if there is an old man here that can tell "Oh, 16! That's why!" \$\endgroup\$
    – Arseniy
    Dec 27, 2022 at 14:45
  • 1
    \$\begingroup\$ @Justme Interesting theory, that the "16" belongs to another standard than UART. I try to ask it to the USB group. The electronics.stackexchange is the biggest electrical community, thus I try to ask here before. I thought I just didn't know something that everyone else knew :) \$\endgroup\$
    – Arseniy
    Dec 27, 2022 at 14:45
0
\$\begingroup\$

The "bDataBits" field in the "Line Coding Structure" table of the USBPSTN1.2 document specifies the number of data bits per symbol in the UART communication. The value of "16" in this field indicates that 16 data bits per symbol can be transmitted and received using the UART communication.

In general, the UART communication protocol is used to transmit and receive data over a serial communication link, using a specific set of signaling conventions to encode and decode the data being transmitted. One of the parameters that can be specified in the UART communication is the number of data bits per symbol. The number of data bits per symbol determines how much data can be transmitted in each symbol, with more data bits per symbol allowing for more data to be transmitted in each symbol.

It is possible to transmit and receive 16 data bits per symbol using the UART communication, but this would depend on the specific hardware and software being used for the UART communication. Some USB-UART bridges or other devices may support the transmission and reception of 16 data bits per symbol, while others may not. It is important to check the specifications of the specific device or devices being used to determine their capabilities and limitations.

\$\endgroup\$
3
  • \$\begingroup\$ "not possible to transmit more than 8 bits in a single symbol using a standard UART, as the number of data bits per symbol is limited by the number of available signal lines". What standard do you mean when say "standard UART"? What lines do you mean when say "the number of available signal lines"? \$\endgroup\$
    – Arseniy
    Dec 27, 2022 at 13:30
  • \$\begingroup\$ @Arseniy I edited my answer. \$\endgroup\$ Dec 27, 2022 at 13:37
  • \$\begingroup\$ Actually I have read the documents I tell about in the question. And I know that "the "bDataBits" field specifies the number of data bits per symbol". Also, I know that "The number of data bits per symbol determines how much data can be transmitted in each symbol". Actually, I think it's obviouse. Finally, I guess that if a take a FPGA, for example, I can make a custom device that can support a 16-bits symbol. But I can't understand an interesting feature of the community - obviouse statements instead of answers. It's not common, but it happens. \$\endgroup\$
    – Arseniy
    Dec 27, 2022 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.