Programming com port in c# for sending data to micro

Status
Not open for further replies.

asic1984

Full Member level 5
Joined
Nov 15, 2003
Messages
257
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
2,340
c# com port

hi

i need to learn programming com port in c# to send data with it for microcontroller

so if any one know a good site or tutorial or example this will be very helpful

thanks for your help
 

c# - com port

Dear asic1984,

Here it is (article and source code):

SERIAL COMM
Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications
by John Hind

h**p://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx


The best article for controling an RS232 port from managed code (C#).
It was tested by me from a long time and the code works 100% (even in Win98!!).

There are many articles about this subject on Internet, but many of them contain mistakes, therefore i highly recomend U this one, for a starting point to your projects!!
 

Re: c# com port?

You can use the standard procedure for accessing Serial Port through CreateFile, OpenFile WinAPI functions. This is the general method to work with serial port under WinXP and it works anytime.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…