Arduino Leonardo with RS232 to HDMI MultiViewer : not possible to communicate

Hello,

I am trying to create a communication between Arduino Leonardo and an HDMI MultiViewer (UG-ANI-42HPIPX)

When I use the Computer, I can send the commands to the MultiViewer without any trouble but when I try to do the same with Arduino, nothing happens on MultiViewer.

The communication is :
BAUD RATE 19200 Data Bits 8 Parity Bits None Stop Bits 1 Flow Control None

The schema is :
MultiViewer RS-232 port to Arduino Leonardo (using Rx and Tx ports of Leonardo)

The code used is :

// Variables Gestion Camera
const int pin_Cam_Droite = 2;

void setup() {

pinMode(pin_Cam_Droite, INPUT_PULLUP);
Serial.begin(19200);
}

void loop() {
delay(500);
if (!digitalRead(pin_Cam_Droite)){
Serial.write("SET WINDOW LAYOUT MODE 0");
Serial.println("");
Serial.write("SET OUT A ROUTE 4");
Serial.println("");
}

The problem is :
When Pin2 is OFF (connected to Ground), the code is sent from Arduino (I see the led Rx blinking and I see on Arduino monitor that commands have been sent) but nothing happens on the Arduino
I tried to switch pins Rx and Tx (on case of inverted connection on MultiViewer) but it has no effect

When I connect the MultiViewer to my computer on RS232 (using USB to RS232 adapter), I can send the commands to the MultiViewer with no issue.

Please can you indicate me what is wrong on my code please?

Are the Leonardo Tx and Rx RS232 type?
I would assume that they are TTL type and You need an RS232 to TTL converter.

Hello,
I found my mistake, I needed to use the TTL/RS232 converter ...

Th correct way of working is :
Arduino to TTL/RS232 converter to MultiViewer

  • I used pin 8/9 of Arduino for Rx/Tx
  • I have switched pin Rx/Tx between the TTL/RS232 converter to MultiViewer

And it works correctly now.

Thanks

Good. That's the idea, things are working.

If you want to use the hardware serial port (Pins 0 and 1), use 'Serial1' instead of 'Serial' (USB).

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.