I have an Arduino Mega writing to a serial port, which is then read by another system. I'm finding that when I output to Serial through the USB-B programming port, the other system can read it fine, but when I output to Serial3 through pins 14 and 15, the messages come out garbled.
Output Serial Read Serial3 Read
----------------------------------------------------------------
Test Test \DC1$00
Hello World Hello World $DAt$BA\STX$00
000 000 $F6\ACK$00
001 001 $D6\ACK$00
002 002 $B6\ACK$00
012 002 $D6$B6\ACK$00
I've validated that multiple different systems have the same problem and that they work with other output systems, so I'm confident the problem is on the Arduino end. My theory is that I missed something in setting up Serial3 and it's not outputting data properly, but I don't know what issue that might be. Any ideas?
The device receiving the data is a PC running DEWESoft Serial Communication Control Center. The messages are transmitted from Serial3, through a DB9, through a DB9 to USB, to the PC.
I haven't tried that. Would I need to take apart a USB-B cable to connect Serial to Serial3?
It certainly has occurred to me, as I indicated by saying, "My theory is that I missed something in setting up Serial3 and it's not outputting data properly, but I don't know what issue that might be." I'm not sure where I implied that the problem lies with the Arduino system itself and not my use of it.
The loopback test just connects jumper wires directly from Serial TX/RX to Serial3 RX/TX.
The problem is probably in your cabling/wiring so please post a diagram of that, also a link to specs or information about DEWESoft Serial Communication Control Center
Ah I see, I just meant that the problem isn't with the setup of the PC system but with the setup of the Arduino system. Since the very next sentence was about how I think it's my mistake, I think some benefit of the doubt would be warranted, at very least.
The purpose of the system is to control some relays connected to devices and power supplies, hence their inclusion, but the issue occurs in as simple of a system as:
Programming port: To DEWESoft
14: TX, to DEWEsoft
15: RX, to DEWEsoft
All else: Empty