parallel port programming problem

Status
Not open for further replies.

engineer khan

Member level 3
Joined
Aug 31, 2012
Messages
66
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,833
please send me basic commands for accessing pc parallel port c coding on visual c++ ,

i typed following program but it compile correctly but doesnt access parallel port,

#include<stdio.h>
#include<conio.h>

#define portaddress 0x378

int main()
{
int a;
printf("Enter a number:");
scanf_s("%d",&a);
if(a<9)
{
_outp(portaddress,0x00);
}
else
{
_outp(portaddress,0x255);
}
system("pause");
return 0;
}
//i have winxp i have lpt1 driver,pinout32 userport almost all the thing,but still it doesnt work ,i have tried many different codes
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…