Main Site Documentation

Encode Hex Value


#1

I need to send hex values to a serial lcd. How do I encode the value, such as 0x80 so that the display receives 0x80, in the NETMF?

Simple, I am sure, but I have had no luck solving the problem.

Thanks,
bdrew


#2

there’s several code projects that do just this - search for “hex string”


#3

http://code.tinyclr.com/project/84/convert-byte-to-hex-string/


#4

Perhaps I did not ask the question right. If I have a one byte hex value, such as 0x11 (17 decimal), and I want to send the one byte over a serial port to a device, what are the specific C# instructions to do that? The Encoding, etc. has me confused!! I need the device to receive one byte of 0x11.

Thanks.
bdrew


#5

B(0) = 0x11; no encoding needed for hex under 256


#6

Thanks so much. That is what I needed!!!