Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
UART TX/RX connection with USBSerial
I want to use the USB D+ and D- as a virtual UART to speak with other UART devices. I think I can use USBSerial to accomplish this. Since the library is using the USB pins as a serial port, does that mean I can connect my other device's UART TX/RX directly to D+/D-?
Question relating to:
2 Answers
9 years, 1 month ago.
It makes it a virtual UART, not a real UART. It operates over USB, it isn't an UART anymore, but a regular USB connection where software makes it act as UART.
So if you want to connect another device, you need a real UART (or a software UART if you don't have real UARTs left).
Unfortunately I do not have access to a scope now, but you are saying if I probe the USB D+/D- pins while using the USBSerial library, I will see USB behavior in addition to UART frames being sent? I.e. Not pure UART frames because it still has the USB interface?
I am confused because it sounds like you described a software UART that merely uses the USB D+/D- pins.
Thanks
posted by 11 Nov 2015No you will see only a USB interface. There is no UART signal on it, it is purely USB. However one of the types of connection which can be made with USB, is a USB UART. This is physically still a USB connection. Just like if you use USBAudio for a USB DAC, it will still transmit USB packages, only in a standardized format used for audio.
posted by 11 Nov 20159 years, 1 month ago.
a USB UART is really a USB CDC device. it will packaged up UART traffic and send it over the USB bus. The signals are still USB signal levels and protocol.
you can purchase USB CDC device dongles which have a USB connector on one end and a DB9 UART connector on the other end. Then use USBHostSerial from handbook and this dongle hardware, and it should work.