I am working on a project involving serial communication with the Raspberry Pi (for which I was using a USB to serial cable). I'm currently building the final version of the hardware, and I'm soldering my own usb connector. I need to know which USB pins correspond to the GPIO pins on the Pi.

The two digital communication pins for USB are labled D+ and D-, how do these correspond to TXD0 and RXD0?

  • D+ and D- are differential signals and nothing to do with RXD/TXD. Could you clarify what you are doing?
    – joan
    Sep 19, 2016 at 21:26

1 Answer 1


The traditional UART/USART and the new USB are worlds part. Please read about the differences before wiring up two completely incompatible systems, possibly damaging the electronics and/or endangering yourself. There are products that provide a USB to USART bridge such as this that handle the USB protocol, voltage levels etc and make the 2 ends compatible for communication.

USB to serial

Serial Communications can use several standards such as RS232 and RS485 for long distance or TTL working 3.3v/5v for inter-chip communications possibly on the same PCB

To answer your question, if you use a bridge like the one I have mentioned, there will typically be 4 wires - Power At 5V, Tx, Rx and Ground. Tx wire should go to the PI Pinout board pin 10 (marked UART0_RXD) and the Rx wire should go to the board pin 8 (marked UART0_TXD). You should connect the ground wire to the Pi so that the reference voltages are the same. any pin marked Ground should do (6/9/14/20/25/30/39). You can ignore the power wire since the Pi is already powered separately (make sure to tape it off for safety if it does not have a insulated connector).

Notes => Make sure the adapter voltage levels for Tx / Rx are 3.3V and not 5V => you can use the above bridge as an additional serial port by hooking it up to a USB connector on the Pi and using the wires one the other device. You will need to figure out if the drivers are supported and the right serial port device (/dev/? ) to read/write


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.