My laptop doesn't have a parallel port so I purchased a USB to parallel convertor. I wrote a program which sends data to the parallel port to turn on some LEDS and it works ok on a PC with a built in parallel port but it wont work on my laptop with the USB to Parallel convertor. I used the delphi parallel port driver inpout32.dll which I found at

Typical use is shown below....

procedure TForm1.Button1Click(Sender: TObject);
begin
Out32($378,$0f); //send $0f to parallel port
end;

Does anyone know why the above code will not work with a USB to parallel convertor?

Dani AI

Generated

Short answer: USB->parallel "printer" cables do not give you a real, memory- or I/O-mapped parallel port. They implement the USB Printer class and hand print data to the spooler or a vendor driver; there are no legacy I/O registers to poke at. Code that writes to port addresses expects actual parallel-port hardware on the motherboard/PCI bus, so it will simply have nothing to talk to when a USB print adapter is used.

How to confirm: open Device Manager and look under "Ports (COM & LPT)" and "Universal Serial Bus controllers." A USB-printer cable commonly shows up as a virtual printer port (for example "USB001") or "USB Printing Support" rather than an LPT device with an I/O resource. Right-click the device, Properties -> Resources: a real parallel port will list an I/O range; a USB adapter will not. That proves there is no 0x378/0x278 to write to.

Practical alternatives: if you need direct control of data/status lines (bit-banging, toggling LEDs, precise timing), use hardware that exposes GPIO, not a printer cable. Options include adding a true parallel port (desktop PCI/PCIe card or laptop expansion slot solution), using a USB GPIO/relay module or a small MCU board (USB‑serial devices or vendor-API USB I/O modules) and control it from Delphi via serial or the module's API. If the goal is only to send printable data to a printer, use the OS print APIs (spooler) instead — but that will not give per-pin control.

Notes tied to the thread: was right to check alternate I/O addresses for a real port, but that approach only works for hardware ports. (ARCHEON cable) and are seeing the same limitation because the adapter is a printer-class USB device, not a legacy parallel-port adapter.

Recommended Answers

All 3 Replies

What brand is the USB Parallel converter?
I am just taking a guess here but it could be that the converter is using 0x278 for the memory location of the port and not 0x378 . Look at the manual and see what location the port is using.
Let me know if you can't find the correct memory address.

It's a ARCHEON’s USB-Parallel Printer Cable and the manual doesn't say what address it uses. I did try 0x278 but still no joy.

Yes same i don't see that address to my laptop using usb to paralel can explain for more? thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.