danielkelly
IS-IT--Management
I am trying to communicate with a serial device using Net Framework 2 and the Serial Port Class. I have a protocol definition written in VB which I am having problems converting to C#. The main problem I seem to be having is in the ASCII conversion.
The VB code is Chr$(255) //Hex Value 255
I thought the C# equivalent would be Convert.ToChar(255) however when I use a com port viewer, it is showing a different character to the VB Code.
Can anyone help me in how to achieve the above using the serial port class.
The eventual goal is to create a string of characters to output using the port.Write Method of the SP Class.
Thanks in advance
The VB code is Chr$(255) //Hex Value 255
I thought the C# equivalent would be Convert.ToChar(255) however when I use a com port viewer, it is showing a different character to the VB Code.
Can anyone help me in how to achieve the above using the serial port class.
The eventual goal is to create a string of characters to output using the port.Write Method of the SP Class.
Thanks in advance