I want to avoid using the big USB B connector to program my Arduino Mega. Since there are those RX TX Pins I thought, it would be possible, to connect my USB - Wires from my PC directly to those RX TX Pins. D+ -> TX and D- RX. This Post on Arduino Stackexchange says, those wires are just connected, while this post says the exact opposite.

I'm confused. Is it possible or would I damage my board when connecting USB wireq to RX / TX pins on my Arduino?

2 Answers 2


The first answer that you cite that you say says it is possible is in fact not talking about what you are referring to - it is discussing the use of the RX & TX pins directly when they are not being used for USB connection.

The second answer you cite is technically incorrect but "correct enough" in the context.

The answer to your question is "It can be done but it requires a different boot loader, its slower, its technically inferior, it's less standard, it requires a degree of understanding (on someone's part) to get it going, and it can be done

It IS possible to access USB directly from digital I/O pins. As TX & RX are also standard digital I/O pins they could be used for this purpose BUT you need dedicated bootloader code to do this and it has inferior performance if a USB to serial converter is available. The eg ADAFruit Arduino Trinket uses this system.

Here is how the (or a) ADAFRUIT Trinket Bootloader works. (The Trinket is not mentioned here but I'm told that this is what it uses. If not, it works in functionally the same manner).

This is in turn based on the USBaspLoader

A (very) simple "more or less Arduino compatible" development board which can use this system is Metaboard. It's circuit diagram is shown below. As can be seen - it uses an ATMega168 and the USB connection is made to two standard digital I/O pins.

enter image description here

"Metaboard" using ATMega168

  • note USB connection to pins PD2 & PD4 - NOT via RXD on PD0 and TXD on PD1 via a serial to USB converter, as is more usual.

AND another version: AVRUSBBOOT

enter image description here

And again

BootloadHID They say -

  • BootloadHID is a USB boot loader for AVR microcontrollers. The uploader tool requires no kernel level driver on Windows and can therefore be run without installing any DLLs.

    BootloadHID is a USB boot loader for AVR microcontrollers. It can be used on all AVRs with at least 2 kB of boot loader section, e.g. the popular ATMega8. The firmware is flashed into the upper 2 kB of the flash memory and takes control immediately after reset. If a certain hardware condition is met (this condition can be configured, e.g. a jumper), the boot loader waits for data on the USB interface and loads it into the remaining part of the flash memory. If the condition is not met, control is passed to the loaded firmware.

    This boot loader is similar to Thomas Fischl’s avrusbboot, except that it is built on top of the HID device class. This implementation is more user friendly on Windows, since no kernel level drivers need to be installed.

  • I thought about the 'EDIT' Part of the Answer where it is from jfpoilpret: EDIT: Serial data over USB goes through copper traces connected to the rx and tx pins, connecting them to the USB to serial converter chip. This got me thinking about this post.
    – Joel
    Feb 18, 2015 at 9:15
  • 1
    @Joel Telling me that it got you thinking is nice - but telling me WHAT you were thinking is liable to be more useful. Maybe you were thinking what I said was wrong. It's not. A problem is that you are reading what somebody has written and adding words and thoughts that are not actually there. This is easily done (ask me how I know :-) ) and needs to be watched for, always. He says that you can use the TX and RX pins as standard digital I/O if TX and RX are not being used to connect to a serial to USB connection. This is not saying anything remotely like that you can connect to USB directly... Feb 18, 2015 at 9:54
  • 1
    @Joel Somebody else notes that the pins connect directly on board to the onboard converter. That also does not in any way say that the pins can connect to USB. Read what they say, draw a picture - DO NOT ADD ANYTHING they do not say. DO NOT remove anything they do say. See what the picture tells you. | NOTE that I have told you that you CAN do what you are trying to do BUT it is harder slower and less capable. And you will need to know special magic or know somebody who does to do it. | QUESTION: WHY do you want to do this? Feb 18, 2015 at 9:58
  • first: thanks for your tips, i will keep them in mind. I want to put my Arduino in a case and i will need a bigger case if the big USB Plug is plugged in. I wanted to connect the wires from the USB cable going to my PC with the RXTX Pins on my Board, to save space. But this is not possible, since i need a lot more utilities to achive that, which need more room, than an USB Plug.
    – Joel
    Feb 18, 2015 at 10:06
  • 1
    @Joel For a "one off" it would be far easier to add a custom socket (maybe a micro USB or mini USB) or even use a short wire tail to an off-board socket which can be more conveniently located. Feb 18, 2015 at 14:34

Strictly Serial interfaces use ±15V, although this is uncommon these days (but then so are PCs with serial ports). ±12V, ±5V or even 0/+5V also exist. Connecting a ±15V interface to the Pi would destroy it. There are RS232 adapters to ensure safety.

If you are talking about connecting USB data lines to serial forget it. The voltages are the least of your worries, the USB serial encapsulates the data in a protocol.

  • I Thought since USB is the Universal Serial Bus, I could connect it. There is no way in connecting the Arduino to my PC in order to upload programs to it, without additional hardware?
    – Joel
    Feb 18, 2015 at 9:06
  • See my answer - he's talking about an Arduino, not a RasPi. It is possible to use std digital I/O pins to implement low speed USB functionality and bootloaders to do this are available. See links in my answer. Not a path most would want to follow. This is what the ADAFruit Trinket Arduino look alike does. Feb 18, 2015 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.