COM Port Access

How do I send and receive data to and from COM Ports?
LVL 1
kiphughesAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
chensuConnect With a Mentor Commented:
0
 
kiphughesAuthor Commented:
The first 2 links are invalid.
0
 
kiphughesAuthor Commented:
Nevermind my first comment.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
superekkeCommented:
You find the TComThread Component for Borland Builder to use asynchronous serial I/O ports. It is easy to use.

http://www.protogene.com/people/giles/builder.html

If you use the Borland Builder, ask me for examples
0
 
kiphughesAuthor Commented:
I should have explained myself better in the first place. I'm more into electronics than I am into programming, although I do have some programming background. However, C++ is a new thing to me.

I'm trying to get either the printer port or mouse port to send some kind of signal to an electronic device which I will connect to it. This electronic device is something I will design myself.

I need to be able to send signals to it, know what kind of signals they are, and how to control and manipulate them. All I really need is to send 1s and 0s to the port and know which pins to look for these signals.

I'm using Borland C++ v 4.52. If someone can give me a sample program, it would be greatly appreciated. Thank you.
0
 
superekkeCommented:
What kind of operating system you are using?
The using of ports is different for Win 95 / 98 or NT. It is more easy to access the ports directly in 95/98. On NT you need to use a devicedriver to access the ports
0
 
kiphughesAuthor Commented:
I'm using Win 98. How difficult is this going to be?

I'm also new to this experts-exchange thing. I do realize that there seems to be a point system here. I posted this exact same question titled "Serial or Parallel" -- or something like that. That's worth some 100+ points to whoever is interested.
0
 
superekkeCommented:
I'm also new in the experts-exchange system. If you ask a question you have to spend points for it. You choose the best answer to your question. The one who gives the best answer will get points.
So, under 98 you can simply access the port. For parallel port write the value to the portadress of the printer port LPT1.
e.g.
outp(0x378,0xeb); writes the value 0xeb to the printerport.
The serial port must be configurated befor using.
0
All Courses

From novice to tech pro — start learning today.