RS232 access from C#

  • Thread starter Thread starter Pohihihi
  • Start date Start date
P

Pohihihi

Hello NG,

Is there a way to control RS232 from C# to send and rec data? Maybe via Win
APIs? If you have examples, website, or books then please do post them too.

thx,
Po
 
Hey,
I've posted something on that before, can't find it now.

My outgoing server does not allow attachments in the news,
so download dlls.zip file from
www.ece.ualberta.ca/~nurchi/files/dlls.zip

There is a program I made to send data to your printer port.
(both .dll files MUST be either in the same folder as the program
or any folder where there is path...)

PortInterop.cs file is pretty straight forward to use.
If you decide to use only one of the .dll files,
remove unnecessary code from PortInterop.cs file, and
search for both .dll files on the net, find official
websites for both, there will be description of both
and how they work, etc.

One of them is better as it works on both Win9x and NT based
systems (i think io.dll), but the other (inpout32.dll) is
easier to use...

Well, it is for you to decide what you need, but search for
those dlls on the net and find their official websites.
They might have newer versions there.

Run my program, open settings, change port address to your
rs232's address and then you should be able to send 0 or 1
to the port.

Hope this helps.
 
Back
Top