At first my english could be much better, but I'm sorry, it isnt.
If got a problem with the communication between a commerciel software on my computer and an Arduino Mega ( Clone).
My constellation:
ports of mega:
Serial is connectet to computer for the debugging messages of the Nextion TFT.
Serial1 is connected to the Nextion Display,
Serial2 is connected to a UNO (RX- RX / TX-TX reset Pin to Ground) and with USB cable to the computer
Serial3 is connectet to a USB TTL adapter (RX-TX/ TX-RX) stuck in my computer.
the software on my computer transmits and recieves strings to Serial2 and other strings to Serial3.
In this constellation everything works fine.
Now I want to change the UNO to another USB TTL adapter.
I tried different one with multiple chips on. At least I diceded to take the one with the CH340 wich would be the same as the UNO.
But the communication between the software and the mega does not work.
The adapter works fine (tested with a bridge on RX TX and the Arduino serial monitor).
Now my question:
what could be the difference in the behavior of the UNO (used as adapter) and the USB TTL adapter? Why does the software accept the uno, but not the adapter?
I checked everything twenty times. There must be a little difference I didnt know.
Could it be something with the reset pin on the uno. How can I transmit this behavior to the adapter?
I am not sure if I understand everything in your post, but if you want to abuse the Uno as Serial-to-TTL adapter the sketch in ATmega328p must not have Serial.begin
Yes. It has CH340. Driver is installed. It seems to work ( I tested it by connecting RX and TX, and send some lines with the Serielmonitor in the Arduino IDE)
The only question is, there must be a little difference in the behavior, so that the software can divide between the uno and the adapter.
CarstenE:
The only question is, there must be a little difference in the behavior, so that the software can divide between the uno and the adapter.
With your Uno on Serial2 you connect Rx to Rx but with your USB-TTL on Serial3 you connect Rx to Tx. If you replace the Uno with a USB-TTL adapter it must be connected Rx to Tx like on Serial3
Have you tried the USB-TTL adapter that you want to use on Serial2 in place of the adapter on Serial3?
If that does not solve the problem then you need to draw a simple diagram that clearlt labels all the connections in the working system and in the non-working system. Then post a photo of the diagram - see this Simple Image Guide
the adapter that is connected to serial2 gets no connection to the computer. I does not matter which one I use. ( I also changed the comports in the Sotware so that the address is correct)
CarstenE:
the adapter that is connected to serial2 gets no connection to the computer. I does not matter which one I use. ( I also changed the comports in the Sotware so that the address is correct)
then it could be anything. try to swap the cables, the USB ports, ...
CarstenE:
the adapter that is connected to serial2 gets no connection to the computer. I does not matter which one I use. ( I also changed the comports in the Sotware so that the address is correct)
Have you tried what I suggested - to check if the "new" adapter works with Serial3 ?
Have you tried changing the order in which you connect the USB devices? On Linux the order of connection determines the serial port names on the PC. And don't expect the USB TTL adapter to appear as the same COM port as the Uno.