C# Code for reading and sending to serial port

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

C# Code for reading and sending to serial port

N5GE
Howdy,

Does anyone have an example of this in C#?

Thanks,

Tom, N5GE

[hidden email]
K3 #806 with SUB RX, K3 #1055, PR6,
XV144, XV432, KRC2,
W1, 2 W2's and other small kits

1 K144XV on order

http://www.n5ge.com
http://www.swotrc.net

______________________________________________________________
Elecraft mailing list
Home: http://mailman.qth.net/mailman/listinfo/elecraft
Help: http://mailman.qth.net/mmfaq.htm
Post: mailto:[hidden email]

This list hosted by: http://www.qsl.net
Please help support this email list: http://www.qsl.net/donate.html
Amateur Radio Operator N5GE
Reply | Threaded
Open this post in threaded view
|

Re: C# Code for reading and sending to serial port

Sanjin Tajic, E71DX
Hi Tom,

this is very simple in C#, you can find a walktrought here:

http://www.scribd.com/doc/6162040/Serial-Port-Communication-in-C

and a little more about here:

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx

I also suggest that you google this, you will find lots of examples.

73, Sanjin
E71DX
Reply | Threaded
Open this post in threaded view
|

Re: C# Code for reading and sending to serial port

Carl Clawson
In reply to this post by N5GE
Tom,

The general idea is to use the framework's Ports class to discover the
available ports and use them. You need version 2 or newer. In version 1 the
only way I could find was to dig up a copy of the old MSCOMM32.ocx control
and use it.

There is an example in VB.net at:
<http://mysite.verizon.net/carlclawson/Ham/Elecraft/K3CommunicationExample.h
tml>

It should be translatable to C# easily.

73, Carl WS7L
K3 #486

> -----Original Message-----
>
> Howdy,
>
> Does anyone have an example of this in C#?
>
> Thanks,
>
> Tom, N5GE

______________________________________________________________
Elecraft mailing list
Home: http://mailman.qth.net/mailman/listinfo/elecraft
Help: http://mailman.qth.net/mmfaq.htm
Post: mailto:[hidden email]

This list hosted by: http://www.qsl.net
Please help support this email list: http://www.qsl.net/donate.html