Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i/o port using c++

Status
Not open for further replies.

imbored

Programmer
May 1, 2000
3
AU
can anyone help me to use c++ to use an i/o interface, to control robotics,led's, etc.<br>i am using the dos-based c++ compiler, not a program such as c++ builder, but i also have a copy of that if it is needed.<br>thanks for your help
 
imbored,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;It really depends upon what OS you are using. If you plan to access i/o through DOS, then you can use <i>inp, outp,</i> and their related cousins. If you are going to use Win32, then you will need to access the device drivers since you cannot access the ports directly. Which OS do you plant to use?<br><br> <p>James P. Cottingham<br><a href=mailto: > </a><br><a href= Veneer Co., Inc.</a><br>All opinions are mine alone and do not necessarily reflect those of my employer.
 
i am using windows, with a dos window in window. i can use either, if it is easier<br>thanks for you reply
 
I am using inline assembly with c++ builder to talk directly to the printer port, it is easy and very fast (10,000 3 byte reads per second on a PII 350). <br>asm<br>{<br>mov DX 0x378<br>mov AL val<br>out DX, AL<br>}<br><br>Hope it helps<br><br>Seth Wright
 
how the heck do i use this above code?<br>i am only very basic with borland and any c++<br>please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top