Serial communication

Hi all, I am relatively new to the Arduino.
I am trying to configure a device via USB, direct serial USB communication is possible. I have tried Termite which works, however for some reason I cannot modify any of the settings on the device.

Apparently it is possible via the Arduino. So my question is can I just wire a usb cable directly into the Tx Rx headers on the Arduino board and use the Serial Monitor? Or do I need to purchase a USB host shield?

if you wish to use USB OTG Host mode I suggest you look at the ESP32-S3 which is supported by the Arduino IDE

have a look at ESP32S3-OTG-HOST-VCP-serial

2 Likes

Which device? User manual would be useful for those that might want to help you.

No, you can't. You can a usb-to-serial converter.
Which Arduino are you using?

1 Like

1. A USB cable (Fig-1) has four wires with signals/power shown below.



Figure-1:

Wire Color Signal Name Function
Red VBUS +5 V power from host to device
Black GND Ground reference
White D‑ Data‑ (differential pair)
Green D+ Data+ (differential pair)

2. USB uses a different line encoding method called NRZI with bit-stuffing (Fig-2), sent over a differential pair (D+ and D–). This signal is not compatiable with asynchronous logic (Fig-3) of TX/RX signals of ATmega328P MCU of UNOR3 board.


Fgure-2:


Figure-3:

3. The following chip (CH340G, Fig-4) can be used to convert USB signal to asynchroous format:


Figue-4:

4. Setup using CH340 (USB <---->async converter) to connect PC with UNOR3 (Fig-5).



Figure-5:

2 Likes

Wow, thank you for the detailed explanation.

I discovered what the issue was, it was user error. In the end it was a simple solution.

These things seem complicated when they are new.