Control parallel port with C++

H

Thread Starter

Harry

I'm trying to find the file which declares the commands to control the parallel port but no luck. Searching the internet, it is adviced to include the conio.h file and then use the command outportb/inportb or _outport etc. The thing is, whatever command i use in my code, the compiler gives an error indicating that this function is not declared in the conio.h file. Where can i download this file (conio.h) that declares the functions in order to use them in my code and control the parallel port?

Thanx

Harry
 
Hi,
add the dos.h file and use the above command, make sure you have set the directory path right in the otions menu of the compiler.
the address is usually 0x378 for data, 0x37a for control and 0x379 for
status.

Harish
 
<p>Harish, this is the code i'm trying to use:
<pre>
#include &lt;iostream.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;dos.h&gt;
#include &lt;conio.h&gt;
#include &lt;stdio.h&gt;
int main()
{
int x;
for(x = 0;x<=255;x++)
{
_outp(0x378,x);
sleep(250);
}
system("PAUSE");
return 0;
}

the compiler complains:
implicit declaration of function `int _outp(...)'
implicit declaration of function `int sleep(...)'
</pre>
<p>any advice??? i even included io.h
 
Could anyone help me regarding robotics or interfacing "robotic arm" in a parallel port or controlling it through the use of computer...

How do you controll/interface a robotic arm in a PC of controll it using the parallel port....

I need help it's for my senior project please email me... ASAP
 
R
First, you should know what kind of O.S. u'll work. In windows, we have to load a DLL file to take acess to the parallel ports, in Linux, we only have to be root and aks to permission for the kernel.

To develop in parallel port, a very good site is

http://www.logix4u.net.

the DLL file is InpOut32.dll.

Hope I've helped you at all.
 
Top