串口封装类SerialPort.rar
c#Winform中的串口通信封装类,示例:(1)创建对象 SerialPortUtility sp= new SerialPortUtility();(2)打开串口 sp.OpenSerialPort("COM10"/*串口号*/, 115200/*波特率*/, 0/*校验位*/, 8/*数据位*/, 1/*停止位*/);(3)关闭串口 sp.CloseSerialPort();(4)发送数据sp.SendData(new byte[] {});
下载地址
用户评论