HardwareSerial / 500kpbs / Mega / Sending Receiving HEX data

Hello to all forum members,

I am trying to establish communication between an evaluation board and my arduino but in vain.

Here what works :

Im able to communicate with my evaluation board via FTDI usb cable, and docklight sending HEX data. The evaluation board has a MCU wich I can communicate with at 115,2 kbps. The MCU then communicates to two other chips at 500 kbps.

Now what frustrates me :slightly_frowning_face:

I plugged in my arduino Mega to the evaluation board.

TX , RX , GND .
Everything is in TTL UART .
And set my baudrate at 500kpbs in order to communicate directly to the chips without using the MCU of the evaluation board. ( jumpers disconnected )

I tried sending an HEX command with something simple as :

byte message1[] = {0x80, 0xC1, 0x01, 0x91, 0xB8 };
Serial1.write(message1, 5);

Unfortunately the two chips does not seem to receive the command.

What I have also tried, is to plug in my arduino like a packet sniffer to ensure myself that I get the same command I sent via docklight to the MCU of my evaluation board. The MCU does not modify in any sort the HEX command (Im 100 % sure).

PC -> FTDI USB CABLE (115.2kbps) -> Onboard MCU (evaluation board) -> chips ( 500kbps) -> RX pin of one of the chips to RX pin of my arduino

And here what I get :

Sending via docklight : 88 B0 55 05 D5 14
Receiving on my Arduino : 87 0B 55 B5 34

Sending via docklight : 89 B0 55 05 D4 E8
Receiving on my Arduino : 19 60 A5 5 B4 C8

Could it be the hardware serial of the Arduino not supporting 500kbps ?

I really hope you could enlighten me.

Thank you in advance .

HoObbes

After looking at the binary, it seems that the LSB is right but not the MSB oO.

Does Arduino have a proper way of reading hex values ?

this is what I send via Docklight

88 b0 55 05 d5 14

And these are what I receive on my Arduino (LSB does not change but the MSB is +- 1 in binary + an unknown offset )

18-60-A5-5-A5-34-
8-70-A5-5-A5-24-
18-60-B5-5-B5-34-
8-60-A5-5-A5-24-
8-70-B5-5-B5-34-
8-70-B5-5-A5-24-
18-60-A5-5-B5-34-
8-70-B5-5-A5-24-
8-60-A5-5-A5-24-

:cry: