【发布时间】:2013-02-26 03:04:17
【问题描述】:
我的步骤: 1.使用System.IO.Ports;使用system.Threading;
2.SerialPort mySerialPort=new SerialPort("Com1",9200,Parity.None,8,StopBits.One); 3.mySerialPort.Open(); //Exception Caught:System.IO.IOException has been throwed :has no such file or directory.
4.myThread=new Thread(new ParameterizedThreadStart(ReadPortThread)); 5.myThread.Start(mySerialPort);
6.ReadPortThread(SerialPort serialPort() //从串口接收数据。
希望您对问题提出一些建议。
【问题讨论】:
-
也许 Com1 需要是 COM1
标签: c# thread-safety serial-port monodevelop