10 years, 8 months ago.

USB signal to Serial signal

Hello,

I have my Mbed connected to PC, through USB pins (D+, D-) (I used USBserial library to do that). and I want to send the received signals from PC (and therefore from USB) to another device, using a UART port from Mbed. How can I send the signals received from my PC to the other device using UART port? Do I have to convert the USB signals to Serial signals and then use the UART port??

Thank you in advance for any help

3 Answers

10 years, 8 months ago.

If you use a real ( not virtual , through USB ) serial port (real RS232 , + - 12 volt levels ), you have to use a level shifter, such as MAX3232 ( 3V to RS232 levels ) Have a look at Keil MCB1700 schematic , at IC6 http://www.keil.com/mcb1700/

If you connect at microcontroller level ( between 2 same voltage microcontroller serial ports ) and the distance is short and you have no noise , then you can ommit the buffers ( max3232 ) from both sides .

Do not confuse max3232 with ft232RL etc ! ( buffer ,receiver vs serial to USB )

Regards, Christos

Accepted Answer
10 years, 8 months ago.

You will send/receive ASCII characters from the PC over the serial USB interface.

Open another serial "port" to the device you want to connect to - and act as a passthrough between that device and the USB device. Should be about less than 10 lines of code.

10 years, 8 months ago.

Thank you for your reply. Just to make sure, there is no need to use a USB to serial converter (FT232BM) before passing the data to the other device, through serial port?