Esempio n. 1
0
 public void SetInt()
 {
     if (sci.SCIOpen())
     {
         //设置接收中断处理事件
         sci.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.SCIPort_DataReceived);
         //设置每接收到1个字节中断1次
         sci.SCIReceInt(1);
     }
 }
Esempio n. 2
0
 private void BtnGetTemp_Click(object sender, EventArgs e)
 {
     if (sci.SCIOpen())
     {
         //设置接收中断处理事件
         sci.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.SCIPort_DataReceived);
         //设置每接收到1个字节中断1次
         sci.SCIReceInt(1);
     }
     ind = 0;
     sci.SCISendFrameData(ref Confirm);
     sci.SCISendFrameData(ref GetTemp);
     timer1.Start();
 }