本文介绍了我可以使用vc ++进行串行端口通信吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在项目中通过串行端口通信使用c#,但是我无法处理大于7F的十六进制值,因此我可以在项目中使用VC ++.
解决方案<我认为c#和串行端口通信没有问题.如果您遇到问题,则您的代码中似乎有问题.如果您需要有关如何解决此问题的建议,请显示到目前为止已完成的工作.
这是C#串行端口通信的问题, 您必须将串行端口的编码更改为UTF-8 使用以下代码在C#中设置Encoding .. SerialPort port = new SerialPort(); port.Encoding = System.Text.Encoding.GetEncoding(1252);
Hi, i am using c# from serial port communication in my project, but i am unable to handle hex values greater than 7F, so can i use VC++ for my project.
解决方案 I don''t think that there is a problem with c# and serial port communication. If you face an issue, there seems to be a problem in your code. If you need advice on how to solve this, please show what you have done so far.That is the Problem with C# SerialPort Communication, You have to change the Encoding of your serialport to UTF-8 use the below code to set Encoding.. in C# SerialPort port = new SerialPort(); port.Encoding = System.Text.Encoding.GetEncoding(1252);更多推荐
我可以使用vc ++进行串行端口通信吗
发布评论