4
\$\begingroup\$

I am using a laptop ( windows 7 and 64 bit) I bought usb to parallel connector as i want to control the LED's through the data lines of the parallel pin( 25 pins)... So i am trying indirectly to use a LPT port.. please tell me how to go about.. The code works fine on desktop PC when connected to parallel port..

\$\endgroup\$
4
  • 2
    \$\begingroup\$ What code? We need to see what you are trying to do. \$\endgroup\$ – Majenko Jan 29 '12 at 8:51
  • 1
    \$\begingroup\$ What USB to parallel converter are you using? How is it not working exactly? How have you determined this? \$\endgroup\$ – Oli Glaser Jan 29 '12 at 8:57
  • \$\begingroup\$ Check if there are PCI/PIC-E parallel port cards available in your area. They almost always implement a real parallel port which can be used for experimenting with electronics and there are even some which may have parallel port and several serial ports available. If you're using a laptop, there are some ExpressCard devices which have a parallel port, but you need to be extra careful with them. ExpressCard has both PCI-E and USB and you need one which used PCI-E connection. The problem with them is that they're much more expensive than PCI/PCI-E cards and are rarer. \$\endgroup\$ – AndrejaKo Jan 29 '12 at 11:50
  • 2
    \$\begingroup\$ I am going to be nit-picky about 'converter' and 'connector'. USB is in no sense 'converted' to parallel, or serial, or anything else, it is not as simple as re-arranging the shape of the connector. USB is a bus, just as PCI is a bus; you never hear anyone make the mistake of 'converting PCI to serial', etc. You plug adapters into the USB bus that provide parallel ports, serial ports, etc., but 'adapter' shouldn't be confused with 'conversion'. Just wanted to belabor this point since this mistake is so commonly made with USB. \$\endgroup\$ – JustJeff Jan 29 '12 at 15:12
4
\$\begingroup\$

I have never seen a gadget that claims to be a real usb-to-parallel converter. I have seen usb-to-printer-port converters, but they do just that: create a windows virtual printer port.

The difference between usb-to-printer converters and usb-to-serial converters is not so much the converter itself, but the (sad) fact that windows software often seems to use the windows serial port interface, so a usb-to-serial converter can sneak beneath that interface and preent itself to the unnkowing program as a serial port.

AFAIK there is no compareable windows parallel port interface, so windows programs use either the windows printer interface (which is at the level of print this file using this printer driver) or use the parallel port hardware directly. It is probably not totally impossible to emulate the parallel port in hardware, but I have not seen a product that does so. (but check AndrejanKo's comment)

So for the hardware hacker an usb-to-serial converter can be almost as usefull as a real serial port, but an usb-to-parallel converter (which should be called usb-to-printer converter) is almost useless.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ +1 absolutely. Traditionally the parallel port has been manipulated by writing directly to the hardware, eg port 0x3f8. You can't do this with USB. I would recommend some programmable USB device like, for instance, an Arduino or similar system which will allow you to manipulate the IO lines in the way you want through a USB (typically Serial) interface. \$\endgroup\$ – Majenko Jan 29 '12 at 10:39
  • 1
    \$\begingroup\$ There's this project that claims to have a USB to parallel port which should work like a real parallel port, but I haven't tried it yet, so I don't know how good it is. \$\endgroup\$ – AndrejaKo Jan 29 '12 at 11:53
  • \$\begingroup\$ Another issue which may not matter for controlling LEDs, but which is a big problem in many other situations, is that when using a hardware printer port, a fast PC can read data from the port and write output to the port whose value depends upon the data read, about a million times per second. When using full-speed USB, that can happen at most 1,000 times per second, and even with high-speed USB the fastest possible turnaround would only be 8,000 times/second--two full orders of magnitude slower than a hardware port. \$\endgroup\$ – supercat Apr 24 '12 at 17:51
  • \$\begingroup\$ @Majenko Note that 0x3f8 is typically COM1. You meant 0x378. \$\endgroup\$ – John Burger Jun 25 '16 at 7:57
  • \$\begingroup\$ Maybe. It's been a long time since I've had to do it. \$\endgroup\$ – Majenko Jun 25 '16 at 8:14
0
\$\begingroup\$

Something like an FT245 is effectively a USB to parallel converter - as distinct from the commodity USB-to-printer converters sold at computer shops.

One could also build similar functionality using an USB enabled microcontroller which can have its program customized.

However, as the USB bus is packetized and has a fair amount of latency, it is a poor way to do "bit bang" type manipulations. When such are needed, it is better to move the "bit bang" logic to the USB microcontroller, and have the PC send higher level commands instead - getting back towards what the commodity printer adapters are an application-specific example of.

You might want to hunt recycling facilities for an old PC with an actual localbus printer port...

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.