Controlling serial port

  • Thread starter Thread starter Seb Schöps
  • Start date Start date
S

Seb Schöps

Hi everyone,

I need a way to control the serial COM port from my PC. I find several
options to do this with VB 6.0, but I can't figure out how to do this with
..NET. What I need to do is:

- set the RTS bit to 1 or 0
- set the DTR bit to 1 or 0
- set the TXD bit to 1 or 0
- get the CTS bit.

That's all. Does anyone know how to do this?

Thanks very much in advance!

Regards
Sebastian
 
Hi,

There is no way to "- set the TXD bit to 1 or 0" in any language. TxD is
controlled by the UART. The other things are simple to do

You send data using the Windows serial APIs, or a control or class that
wraps these APIs. There are lots of options in these areas. I have code in
my book (see below), you can download NETComm.ocx from my homepage, and
there are LOTS of resources available on the web.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
Hallo Seb,


Seb Schöps said:
Hi everyone,

I need a way to control the serial COM port from my PC. I find several
options to do this with VB 6.0, but I can't figure out how to do this with
.NET. What I need to do is:

- set the RTS bit to 1 or 0
- set the DTR bit to 1 or 0
- set the TXD bit to 1 or 0
- get the CTS bit.

look at your crossposting (German VB.net) and the answer from Thomas
Scheidegger.

Gruß

Thomas
 
Dick,

where can I get a copy of your book in the United Kingdom?

Amazon.co.uk says it is out of stock.

How much of the content is using VB.Net?

I have some experience of RS232 in VB6 and
interfacing with microcontrollers, etc, but very
little in .Net. I have used the VB6 CommControl
in VB.Net but that is all.

Thanks,

Jason.
 
Hi,

Grey Matter.

However, it may be faster (and perhaps no more expensive) to order directly
from www.mabry.com/vbpgser.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top