There is a bit in the control register that controls the direction of the data lines in ECP and PS2 modes. If bit 5 of the control register (base address + 2) is set to 1, the data lines are inputs. If it is set to 0, the data lines are outputs. Here's some code to set it: BYTE byControlReg = 0; WORD wBaseAddress = 0x378; // or whatever // // Set the direction bit in the control register to read // byControlReg = _inp( wBaseAddress + 2 ); byControlReg |= 0x20; _outp( wBaseAddress + 2, byControlReg ); // // Now you can read from the port.... // At 02:16 PM 6/26/98 PDT, you wrote: >Hi all, > >I am working on an X.25 analiser using a 16C73 but the serial port on >most PC's are too slow for the rate I need to tranfeer data to my PC. I >am currently working on a paralell interface on an ECP port. I need to >set the data direction registers to all inputs on my pc but don't know >how. I have compiled some code to read them but it doesn't work yet >because they are set to outputs. If Anybody out there has any ideas (in >'C') I would be very thankfull. > >Here is my code so far:) > >#define data 0x0378 /* LPT port address */ > > >void main (void) >{ > int in; > while (1) > { > in = inport (data); /* read the data port */ > printf ("The data on the port is %i \n",in); > } >} > > >Thanks in advance, >Brian. > >