4

When I send some data using RS-232 cable a sender and receiver have UART. I can use RS-232 to USB converter to connect some device or other PC to my laptop. Does such converter has inbuilt UART? How data is converted from RS-232 to USB?

2
  • Depends on the adapter... Some have a physical UART chip, some emulate it in software, but it doesn't matter since it's electrically the same to the device... Other than that, on the USB side, it's just ones and zeros like any other device. Guess I am not quite getting the jist of your question.
    – acejavelin
    Mar 28, 2017 at 11:34
  • 1
    if you're capable of getting really technical then you may get some good responses on electronics.stackexchange.com
    – barlop
    Mar 29, 2017 at 23:13

2 Answers 2

5

Yes, a RS232 to USB converter does have a full-blown UART circuit built-in. As any standard UART, it does have Rx, Tx, and flow control pins. As any UART, it must be properly configured to be able to communicate with the "partner" at the other end of UART link.

To do so, the UART circuit is "bridged" to USB interface. The USB interface has the CDC class descriptor (Communication Device Class), and the USB host driver maps this USB device into a virtual COMnn port with nearest available number, so PC applications can use it as an usual COM port.

The bridge is fairly simple. To read the UART data, the USB COM port driver is constantly asking the USB device for data (since it has no other means to know when the UART will receive its data and will be ready to give them to host). When there is no data, the bridge responds with NAK. When data is there, the USB side returns the piece of data.

When the host wants to send a UART data, it issues an OUT packet with 1 byte of data. The bridge receives the serial byte into a parallel buffer (at USB speed), and then stuffs the received parallel byte into the parallel side of UART for transmitting it at UART's speed.

Before communicating over UART, the USB side must configure the UART for proper baud rate, stop signal length, and use of flow control, as in case of usual UART in a PC. This is virtually transparent to application terminals, and the terminals use the usual interface to set these parameters up.

2

Yes, many such RS-232 to USB adapters have a USB-to-UART chip. Common ones are:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .