• (6 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »

Serial Port Communication in C#

#31 Blackfin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 06-August 09

Posted 06 August 2009 - 01:52 PM

:D Very good tutorial, compiled code code wored first time. Reason for joining this forum.
Was This Post Helpful? 0
  • +
  • -

#32 Senacharim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 18-August 09

Posted 18 August 2009 - 09:50 AM

View Postjano_rajmond, on 23 Mar, 2009 - 10:51 AM, said:

Hy!

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? :blink:


You need to add:
using System.Windows.Forms;


Was This Post Helpful? 0
  • +
  • -

#33 vinayakpict  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-September 09

Posted 09 September 2009 - 03:04 AM

Really good one !!!
Thanks
Was This Post Helpful? 0
  • +
  • -

#34 KrantiKishoreD  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 10-September 09

Posted 10 September 2009 - 04:02 AM

hie This is Kranti Kishore,
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..........?

Was This Post Helpful? 0
  • +
  • -

#35 yilong_vz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-October 09

Posted 27 October 2009 - 01:04 PM

This is very good program for me. This is my first time to use C#. I unzipped the project and compiled without any problem. When I tried to connect to COM11 (USB Serial port), it failed to do so. Through debug, I found user need to add one line of code to make it work.

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
Was This Post Helpful? 0
  • +
  • -

#36 bam_usic  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-April 09

Posted 29 October 2009 - 11:57 AM

Zip is corrupt
Was This Post Helpful? 0
  • +
  • -

#37 Jonadabe  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-November 09

Posted 05 November 2009 - 05:15 AM

Thank you very mutch, this is awsome.

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)


This post has been edited by Jonadabe: 05 November 2009 - 05:17 AM

Was This Post Helpful? 0
  • +
  • -

#38 intell87  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-December 09

Posted 18 February 2010 - 08:52 AM

nice tutorial to begin with>>
great thanks;

This post has been edited by intell87: 18 February 2010 - 08:52 AM

Was This Post Helpful? 0
  • +
  • -

#39 rubear  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-February 10

Posted 28 February 2010 - 05:51 PM

View Postlufc2684, on 27 March 2009 - 06:11 AM, said:

Hi

The zip file seems to be corrupt, any ideas?

Thanks


Corrupt for me too, tried several times. Shows: 93.8 KB (96,153 bytes)
Was This Post Helpful? 0
  • +
  • -

#40 Guest_Jeff*


Reputation:

Posted 03 March 2010 - 09:31 AM

Thank you so much!!! This code has been a really big help.
Was This Post Helpful? 0

#41 Guest_Yaron*


Reputation:

Posted 09 March 2010 - 01:02 AM

Thank you very much for the thorough tutorial!

Yaron.
Was This Post Helpful? 0

#42 Guest_Steve C*


Reputation:

Posted 11 April 2010 - 10:43 PM

View PostChristianne, on 04 November 2008 - 01:19 AM, said:

Has anyone noticed in Task Manager that this app eats up alot of CPU memory and keeps expanding? I think its related to the string.Replace() which is eating up the memory.


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?
Was This Post Helpful? 0

#43 Guest_Clayton B*


Reputation:

Posted 12 April 2010 - 11:03 AM

View Postth4k1dd, on 20 March 2008 - 05:46 AM, said:

Hello, I was so excited to find this post and can't wait to play. I did run into one problem I am having with the code. I went ahead and threw it into C# and compiled. The program detects my one and only COM port, COM12 and adds it to the port drop down box like it should.

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!
Was This Post Helpful? 0

#44 MarcelMonteny  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-April 10

Posted 27 April 2010 - 06:17 AM

Hello thanks for the great tutorial, unfortunatly it does not work for me all the way... Opening works OK, Sending works OK, Receiving does not work.....

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?
Was This Post Helpful? 0
  • +
  • -

#45 Guest_jeff*


Reputation:

Posted 06 May 2010 - 01:22 AM

View PostMarcelMonteny, on 27 April 2010 - 05:17 AM, said:

Hello thanks for the great tutorial, unfortunatly it does not work for me all the way... Opening works OK, Sending works OK, Receiving does not work.....

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
Was This Post Helpful? 0

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »