|
-
August 6th, 2009, 10:47 AM
#1
C# SerialPort Class
Q. I'm trying to write a string of characters to the serial port, which is successful, However as soon as i try and read back what has been sent, it only reads half of the the data initially sent. can anybody please help? Do i need some sort of a delay when reading or sending?
Code:
serialPort1.Open();
serialPort1.Write("Communications Solutions");
recieved_data = serialPort1.ReadExisting();
textBox1.Text = recieved_data;
serialPort1.Close();
// Recieved_data only displays half the characters in the text box.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|