Problem with ReadExisting in serial communication...i am sending data in hexa decimal but i am reciving it in asci.....
-
-
Problem with ReadExisting in serial communication...i am sending data in hexa decimal but i am reciving it in asci..... How to get the proper data....how to convert data from asci to Hex. as i need to display the data in the Text box in the Hex format.
-
Try string.format("{0:X2}", asciByte); which converts asciByte to a two digit Hex string.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
Try string.format("{0:X2}", asciByte); which converts asciByte to a two digit Hex string.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
No It didnt work....... Lets take an example string data "3F 50" after conversion i should get "? P" but i am not getting any thing
Look at
Parse(str, System.Globalization.NumberStyles.HexNumber)
You will have to use it a few times and skip the spaces, but it will convert hex "3F" to byte '?'
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones