Software > Software

parallel port problem


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.
 void main() 
  int i=0;

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.

You can program the parallel port in XP also,Just install this Userport driver:

--- Quote ---Every time it shows a value of 127 for the following statements.
--- End quote ---

Correct me if i am wrong: Have you only tried giving 4.8V to pin 10?

When giving 4.8V to pin 10(S6) ,and the other Status port pins(11,12,13,15) being left unconnected.
so in the status port(0x379):
S7(pin11)=0(as it is hardware inverted)

S2,S1,S0 are not available for use and they are all high(1)

So ur status port is 0111 1111(binary) =127

Try connecting the pin 10 to gnd, then ur reading should be 0011 1111(binary)=63

thanks infinite!!! you were infinitely helpful!!!!!! ::)


[0] Message Index

Go to full version