Serial Port Communication in C#
#31
Posted 06 August 2009 - 01:52 PM
#32
Posted 18 August 2009 - 09:50 AM
jano_rajmond, on 23 Mar, 2009 - 10:51 AM, said:
I this that the reception thread may be interrupted by something. I modified the code in order to use separate windows for Tx and Rx and also took down the RichtextBoxes and replaced the with Normal TextBoxes, but the same thing happens..
Any ideea?
You need to add:
using System.Windows.Forms;
#34
Posted 10 September 2009 - 04:02 AM
You Are Article Is Very Good. In That i Have Small Dought.
To WriteData We Are Displaying How To Send.
But If We Want To Receive the data How To Receive And How
To Display It Their. And if We Are Getting Continuously Then How To Get
Every Line To Line For Particular Time. please Give reply. Bcoz i need It to My
Project. And Can We Run This Exe To Multiple Times in One system for
Different Ports..........?
#35
Posted 27 October 2009 - 01:04 PM
private void cmdOpen_Click(object sender, EventArgs e)
{
...................
comm.PortName = cboPort.Text;
...................
}
But I still did not figure out why the receiving from Serial Communication (COM11) message did not display in display window.
If any of you know, please post it or send email to me.
Thanks,
YZ
#37
Posted 05 November 2009 - 05:15 AM
I did the download at:
http://uploaded.to/?id=zr771n
and convert the VS2005 project to VS2008. It converted it very smooth, without problem.
I didn't test it yet but it seems very well done.
Thank's again!
The attached file is the original that I downloaded!
Attached File(s)
-
SerialPortCommunication.zip (101.85K)
Number of downloads: 674
This post has been edited by Jonadabe: 05 November 2009 - 05:17 AM
#38
Posted 18 February 2010 - 08:52 AM
great thanks;
This post has been edited by intell87: 18 February 2010 - 08:52 AM
#39
Posted 28 February 2010 - 05:51 PM
#40 Guest_Jeff*
Posted 03 March 2010 - 09:31 AM
#41 Guest_Yaron*
Posted 09 March 2010 - 01:02 AM
Yaron.
#42 Guest_Steve C*
Posted 11 April 2010 - 10:43 PM
Christianne, on 04 November 2008 - 01:19 AM, said:
Does anyone else notice this????
It's happening to me too Christianne
I've used this (great) class to communicate with an embedded system, but no matter what I do the CPU % crawls up until the app freezes. Anyone have any ideas?
#43 Guest_Clayton B*
Posted 12 April 2010 - 11:03 AM
th4k1dd, on 20 March 2008 - 05:46 AM, said:
However, when I hit the Open Port button, it throws up an error in the Rich Text Box which says that COM1 does not exist. Of course that was not a mistype. I select COM12 and yet it tries to connect to COM1.
I took a look at the code and followed the _portName variable but was unable to see why it would cut off the 2 in 12. It would seem it should not as the variable is setup as a string.
Quick Info:
Windows Vista Business
Microsoft .Net Visual Studio 2008 Express
Arduino USB Microcontroller Card
Port Settings (should be): COM12, 9600, None, 1, 8
Programs Receiving COM12: Arduino Software, Putty, & Realterm
Am I missing something? You help is greatly appreciated.
One thing I noticed...I went into Device Manager and changed the USB Virtual COM port to use COM1 and for some reason the program works fine. Also works great if changed to COM2 in Device Manager.
Any ideas?
* Needs to read up on variable tracing *
I noticed the same thing, it looks like the form does not set the port name so the default COM1 is always used.
Try adding "comm.PortName = cboPort.Text;" to the "cmdOpen_Click" method in frmMain.cs.
Excellent tutorial, very very helpful!
#44
Posted 27 April 2010 - 06:17 AM
Sending/receiving over hyperterminal works OK. But over the program receiving does not work.
Connecting over the com-port and sending data works OK. Closing the port and opening hyperterminal causes direct reading the data in hyperterm which should be red by the program.
Sugestions?
#45 Guest_jeff*
Posted 06 May 2010 - 01:22 AM
MarcelMonteny, on 27 April 2010 - 05:17 AM, said:
Sending/receiving over hyperterminal works OK. But over the program receiving does not work.
Connecting over the com-port and sending data works OK. Closing the port and opening hyperterminal causes direct reading the data in hyperterm which should be red by the program.
Sugestions?
I'm having the same problem.. I've used this code on an xp and it works. Now when I try to use the same code in windows 7 receive does not work
|
|






MultiQuote


|