0

I need to test LPT Ports via a Loopbacktest. I've got Loopbackdongles and just want to know if the LPT Ports are working correctly. I have no idea how to accomplish this goal with c#. I know that I need these inpout.dll's for either 32- or 64-bit. But how can I use this for a loopback?

Thanks in advance.

DerHelm
  • 37
  • 6

1 Answers1

1

Parallel ports went the way of the dodo fifteen years ago. Back in the stone age, they were used for printers, the Centronics interface was standard. The standard parallel port back then looked like this schematically:

enter image description here

Note that it had 8 bits for Data Out but no bits reserved for Data In. Printers didn't talk back, other than a few handshake and status signals (ACK, Error, Selected, Out of paper, Busy).

That wasn't very useful for general purpose I/O so after a while the interface was improved. Rather poorly unfortunately, there was no single industry standard. There was at least EPP (Enhanced Parallel Port) and ECP (Extended Capabilities Port), neither became dominant. Ports used in industrial applications just used their own vendor specific schemes, mutually incompatible. That completely killed the idea, USB put the final nail in the coffin.

Accordingly, there never was a common standard in software either. MS-Dos just supported the LPT device for printers, Windows' Parallel driver only supports interfacing to a printer and just implements the STROBE/ACK handshake with only support for output.

So the first thing you need is a driver that supports your parallel port. Not uncommonly that's inpout32.dll, a very simple driver that gives a user mode program direct access to the I/O ports. In which case you also need to know at which address the port is mapped and what registers it uses. Contact the vendor of the device you use if you don't know.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536