i have installed win XP on my system.To enable myself to program using the parallel port,I installled M.S Virtual PC,on that(virtual computer) i have installed Windows 98.
I have been able to output to the parallel port using turbo C++(Borland 3.0) compiler with the following statement.
outportb(0x378,0xff)//This makes all the pins high.
Everythings fine till here.
..................|||THE PROBLEM|||..............
i know the pins 10,11,12,13 and 15 can be used for inputting data from the parallel port by giving a logic 1(2.47V to 5 V).i am not able to read the data from any of them.Every time it shows a value of 127 for the following statements.
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i=0;
i=inportb(0x379);
printf("%d",i);
getch();
}
The multimeter reads 4.8V for the lead i am going to insert into the pin 10.
If anyone can identify where i am going wrong,please reply and any advice is always welcome.