Tuesday, 5 March 2013

Posted by Prasad KM | 22:36 Categories:
Serial port data show in textbox using C#


        private string rxString;
        private void mySerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            rxString = mySerialPort.ReadExisting();
            this.Invoke(new EventHandler(displayText));

        }

        private void displayText(object o, EventArgs e)
        {
            tbRX.AppendText(rxString);

        }

0 comments:

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube