Is it possible to directly communicate USB D+ D- to Arduino Mega serial port TX RX?
Asked
Active
Viewed 7,158 times
1
-
1Actually it is possible with some passive components to get close enough to the USB spec to *usually* be able to bit-bang the lowest speed version in *software*. I believe on the ATmega328 you can do this with fairly arbitrary GPIOs, presumably you can on a mega as well. – Chris Stratton Oct 20 '14 at 04:46
-
Despite the answer to the contrary it IS possible to access USB directly from digital I/O pins. As TX & RX are also standard digtal 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. – Russell McMahon Feb 18 '15 at 08:52
1 Answers
2
No, D+/- are high frequency USB signals. TX/RX is 5V UART protocol, i.e. compeletely different. But you can e.g. use AT90USB128x processor to avoid 16u2 bridge. The prosessor is not so mighty as 2560 but it's cheaper and simplifies design.
TMa
- 619
- 3
- 5
-
Thanks. I knew it but I was thinking may be arduino mega has an option to go through the 2560 UART. I thought it would be the serial port 0 as it is the port for PC serial monitor. – Nafis Oct 19 '14 at 13:25
-
1The Arduino Leonardo has a ATMega32u4 witch also supports USB directly. An entire board might be easier than just a raw chip. – Gerben Oct 19 '14 at 17:49
-
Well, I have few couple of Arduino Mega, so, I don't really need to have a Leonardo I think. :) – Nafis Oct 20 '14 at 02:16