UART to USB-C, no data

Good day,
I bought an R4 and immediately ran into a problem.
When setting up a simple project
Serial.begin(115200);
Serial.print("#0");
the arduino terminal prints #0 repeatedly. When I try to connect another windows terminal to the COM Port, the connection goes through, but I don't see any data. What is different compared to R3 or 2560? Connection via USB-C, original Arduino R4 minima

Welcome to the forum

See the section on USB Serial & UART in https://docs.arduino.cc/tutorials/uno-r4-wifi/cheat-sheet

Do R3 or Mega boards have the ability to connect two terminals?

Know this is probably obvious but been bitten by it a couple of times. Make sure the baud rate in the terminal you are using matches the baud you set up in the sketch, in this case 115200

Arduino uno sends data to the COM port without problems. It has one UART connected to USB. With the same simple program. The Arduino 2560 has 4x UARTs, I can also see data on each of them. (Serial.begin(115200);
Serial.print("#0") (Serial1.begin(115200);
Serial1.print("#0");.....) But on R4 I only see data in IDE Terminal. No other terminal will display them. (Delphi10.4, Serial port Terminal...) The connection is made, the port is reserved, but I don't see any data. The port settings are correct. I enjoy multiple arduino models, everywhere without problems. I wondered if there was an error in setting other parameters. Baudrate 115200, DataBit 8, StopBit1, Parity none, Flow Control none. ? It cannot be a connection.

When you print to Serial1 on the Uno R4 what have you got connected to pins 0 and 1 ?

nothing is connected to pins 1 and 2. I can see the data in IDE through USB. But I don't see them in other programs connected to the COM port. I need to capture them on USB.


I am surprised that you can connect to the same port as that being used by the Serial monitor because that port will already be in use

As an experiment try printing to Serial1 as you would using the Arduino 2560 and reading the data from pins 0 and 1

of course, it is first necessary to disconnect the serial monitor in the IDE. I connected a converter to another COM port on pin 0.1. And rewrote the program see screen. this is how it works normally. But I would need to draw data from the USB arduino.

So, you now have it sending data to a COM port on the PC via Serial1

To the PC the USB connected to the Uno looks like a COM port so why can't you use the second COM port connected to Serial1 to collect the data that you require ?

What is it that receives the data on the PC ?

I would like to use the full potential of the processor. Why use additional HW when the processor should handle it by itself? Older processors can handle it.
Bez názvu

I think that you are confusing what older processors can do with what other board designs can do

I strongly suspect that the Uno R4 was configured this way in order to provide a dedicated serial port for communicating with other devices, including the PC, with no interference with either the Serial monitor or uploading sketches to the board.

Time and time again we see problems here caused by the fact that a user has used pins 0 and 1 to communicate with an external device only to find that they cannot upload code and/or they cannot use the Serial monitor

It may still be possible to do what you want but why not do it properly ?

1 Like

I have the same problem, the USB serial only works in Arduino IDE.
Has someone resolved this issue?

Hey @m_timmy , I attempted to implement flow control, and I began to receive data from my UNO R4. However, the terminal application I'm using (YAT in my case) isn't functioning as intended.

I believe there might be a 'handshake' or some other process that the Arduino IDE's serial monitor is performing, which we might be overlooking.

FWIW, I have no trouble talking to my Minima vis the USBSerial port using PuTTY...

What configuration are you using in putty?

This works for me using a Uno R4 WiFi


void setup()
{
    Serial.begin(115200);  //Serial monitor
    Serial1.begin(9600);    //pins 0 and 1
}

void loop()
{
    static byte x;
    Serial1.println(x++);
    Serial.println(x * 10);
    delay(1000);
}

As expected the Serial monitor prints the value of x and PuTTY, connected to pins 0 and 1 using a TTL to USB board prints 10 times x

There is nothing special about my PuTTY setup, just a Serial link connected to the COM port provided by the TTL to ISB board at 9600 baud

Summary : working as expected. Pins 0 and 1 provide an external serial link on Serial1 whilst the Serial monitor uses Serial via an internal link that has nothing to do with pins 0 and 1

Other terminal emulators, such as Coolterm, work in place of PuTTY when connected

1 Like

@m_timmy , I found what was missing in the serial port configuration. Last night, I was testing with different terminals—some worked fine, while others didn't. However, I couldn't pinpoint the difference between their settings. In the end, I created my own extremely basic terminal to figure out what was happening. So, I tried various configurations and discovered that the missing piece was activating the "DTR" signal on the computer's side of the port, and that's it:

@UKHeliBob, By default, PuTTY has flow control enabled:

On the other hand, what we were trying to figure out is why the USB serial works fine in the serial monitor but didn't behave as expected in other terminals. Part of the reason seems to be that, since it's not a UART port, it must have the complete signals of an RS-232, unlike pins 0 and 1, which are just two signals without flow control or anything like that.

My conclusions are:

  1. The USB serial of the UNO R4 has a complete serial port, not just TX and RX.

  2. f you want to use the USB serial of a UNO R4, you need to enable the "DTR" signal for it to work.

1 Like