UNO R4 and Serial RX/TX

It took me some time but by now my R4 accepts uploading sketches and runs them.
But I do not get any Serial output no matter if I use the old or the new IDE.
(To confirm that the sketches are running I programmed some Morse code to be sent to the LED_BUILTIN so I know they are really getting executed.)
So I used an Arduino UNO R3 with the SerialPassThrough sketch and connected Pin-1 of the R4, labelled "TX" on the board, with my receive-pin 8 of the SerialPassThrough Arduino hoping to see there the output of the R4, but there wasn't.
(I tried the same replacing the R4 by a spare R3 and I got the output on the SerialPassThrough Arduino.)
That means Serial.begin on an R4 does not send anything to that pin labelled "TX".
If I install SoftwareSerial on the R4 and connect its output pin-9 to the SerialPassThrough everything works as expected (so the output goes from one SoftwareSerial to annother).
That leads me to the assumption that the labelling RX/TX is compatible to the R3, but the function is not. Right?
All this was done using Windows-7. Will it be different using Windows-10?

Hi @Klausj

When I'm having trouble with serial output, I like to do a quick check with the most simple possible sketch. If this works, then I know the problem has something to do with my real sketch. If it doesn't work, then I know the problem is not related to my sketch code. It seems maybe a little silly, but it allows me to be sure I'm focusing my troubleshooting efforts in the right direction.

Try uploading this sketch to your Arduino board:

  1. Copy and paste this code as a new sketch in Arduino IDE:
    void setup() {
      Serial.begin(9600);
    }
    
    void loop() {
      Serial.println("hello");
      delay(1000);
    }
    
  2. Upload the sketch to your Arduino board.
  3. Select Tools > Serial Monitor from the Arduino IDE menus to open the Serial Monitor view if it is not already open.

Do you now see the word "hello" being printed in the Serial Monitor's output field once a second?

That is correct, as explained here:

https://docs.arduino.cc/tutorials/uno-r4-minima/cheat-sheet#usb-serial--uart

On the UNO R3, the UART of the primary ATmega328P microcontroller is connected both to pins 0 and 1 and to the USB to serial adapter chip (ATmega16U2).

The Renesas RA4M1 microcontroller of the UNO R4 has native USB capabilities, so no additional "bridge" USB to serial adapter chip is needed. The RA4M1 is connected directly to the USB socket on the board and produces a USB CDC serial port on the PC that is connected to the USB cable. The separate hardware UART on the RA4M1 is connected to pins 0 and 1 on the UNO R4. You must use the Serial1 object instead of Serial in order to do communication via pins 0 and 1.

Although it may be confusing to those who are accustomed to the hardware design of the UNO R3, this difference is actually an improvement in the UNO R4 because it means you can use pins 0 and 1 freely without interfering with communication between the board and your computer. Connecting arbitrary circuits to those pins on the UNO R3 is a common cause of mysterious upload failures for beginners.

No.

Hi ptillisch,
thank you for your comment.
You are world-wide well-known for giving helpful hints but are you aware that this time you are treating users link a child giving such proposals?
When testing programs I usually print a counter otherwise I would not notice the scrolling in the Serial Monitor.
The end of the story was:
your proposed sketch does not produce any output on my Windows-7 computer.
Then I testet it on the Windows-10 machine (which I cannot use all of the time) and it worked.
(I still struggle to find out the reason for that different behaviour, may be other users have the same problem.)
This confirms:
the pins 0 and 1 should not be labelled RX and TX on the R4 board. It is more than confusing.

1 Like