kiphughes
asked on
COM Port Access
How do I send and receive data to and from COM Ports?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nevermind my first comment.
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
http://www.protogene.com/people/giles/builder.html
If you use the Borland Builder, ask me for examples
ASKER
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.
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.
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
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
ASKER
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.
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.
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.
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.
ASKER