TXD0 / RXD0至D + / D-


我正在從事一個涉及與Raspberry Pi進行串行通信的項目(為此我正在使用USB到串行電纜)。我目前正在構建硬件的最終版本,並且正在焊接自己的USB連接器。我需要知道哪個USB引腳與Pi上的GPIO引腳相對應。

USB的兩個數字通信引腳標記為D +和D-,它們分別與TXD0和RXD0對應嗎?


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