Sending serial data via Arduino USB port

I am using an Arduino-compatible board with a USB host screen to send and receive serial data through a USB port.

Note for all beginners, this nice video explains how to make Arduino serial transfer via USB: http://www.youtube.com/watch?v=KYWCkdrCUKg

The software that I use is Arduino 1.0 on my PC for recording, compiling and downloading firmware to the Arduino board. I can successfully send and receive serial data between Arduino and a PC using the Arduino Serial Monitor software. The Arduino Board LED blinks for each byte sent to the PC. So far so good.

My problem arises when I disconnect the Arduino USB cable from the PC and connect to my own USB device - FTDI-compatible USB slave.

(My Arduino board now has an external power supply to provide USB power. The firmware is flashing with a Digital Pin 13 LED, so I know that the firmware is working. I checked USB pin 1 on the slave, so I know that it gets 5V.)

But now, when the same firmware tries to send some bytes to my USB device, the TX indicator will not blink and nothing will be transmitted. I think that maybe USB + data and data lines might have to be swapped, but I don't know. Can anyone offer any advice?

+4
source share
3 answers

Digital output pins 0 and 1 are serial. Try performing serial RX / TX on these pins on an external device.

Arduino Serial Reference

+2
source

The TX LED is for communication only on the USB port used to load your screens. The HOST USB adapter is another device on different pins. You can connect both of them simultaneously, as shown in the image, http://www.seeedstudio.com/wiki/index.php?title=Seeeduino_ADK_Main_Board

See in Adb.h how the data is actually sent to the board. And divide it up to your needs (since FTDI is not an Arduino device, for which this additional port is advertised in the first place).

+2
source

If you directly want to use the RX / TX Pins to exchange data with your computer, you may need some of these small parts: http://www.ebay.de/itm/6Pin-USB-2-0-zu-TTL-UART -Modul-Serieller-Wandler-CP2102-STC-Ersetzen-Ft232-V1N3- / 262814438851? Hash = item3d30f615c3: g: -LAAAOSw4DJYgKa8

You can communicate with them via USB if you do not want to use a serial serial port for the USB driver.

The TTL protocol is used.

0
source

Source: https://habr.com/ru/post/1414235/


All Articles