By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

Controlling serial port

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hallo Seb,
"Seb Schöps" <no****@internet.com> schrieb im Newsbeitrag
news:ce**********@online.de...
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

Nov 20 '05 #2

P: n/a
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.
Nov 20 '05 #3

P: n/a
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.

On Tue, 27 Jul 2004 09:26:57 -0600, "Dick Grier"
<di**************@msn.com> wrote:
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.


Nov 20 '05 #4

P: n/a
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.
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.