C#接收事件中的串口

时间:2018-06-11 16:18:08

标签: c#

如何在C#中定义串口

Form1包含初始化和端口打开语句

_Serial_Interface.PortName = COM16;

_Serial_Interface.BaudRate = 115200;

_Serial_Interface.Parity = Parity.None;

_Serial_Interface.DataBits = 8;

_Serial_Interface.StopBits = StopBits.One;

_Serial_Interface.Open();

(在哪里)

Form2包含DataReceived事件。

public void _Serial_Interface_DataReceived(object sender, SerialDataReceivedEventArgs e) 
{ 

}

0 个答案:

没有答案