I want to take a number such as 600 (0x0258) and send these hex values to a C-based system which is assigning char's to the received bytes and rebuilding to the original number.
Currently, I am converting to bytes in VB.Net but it is not giving me the expected outcome (because of the ascii nature of the transfer most likely)
Dim btData() As Byte
Dim TempShort As UShort
TempShort = btData.Length
bytes = (BitConverter.GetBytes(TempShort))
myComPort.Write(bytes, 0, bytes.Length)
I've also tried using Hex but this doesn't get the data in the correct format. Can anyone help?
Thanks
Currently, I am converting to bytes in VB.Net but it is not giving me the expected outcome (because of the ascii nature of the transfer most likely)
Dim btData() As Byte
Dim TempShort As UShort
TempShort = btData.Length
bytes = (BitConverter.GetBytes(TempShort))
myComPort.Write(bytes, 0, bytes.Length)
I've also tried using Hex but this doesn't get the data in the correct format. Can anyone help?
Thanks