views:

137

answers:

3

I'm currently doing a project where I have to interact with a circuit I made through the parallel port of a computer. However, my computer doesn't have a parallel port so I borrowed a Parallel to USB adapter cable. The cable didn't come with any drivers, but it's recognized by the device manager as a "USB Printing Support" controller, under the USB section.

It seems that old parallel printers can be plugged in and work properly without any problems. So my question is, if I write a program in Java that tries to interact with a parallel port directly, will it work? And if not, can anyone give me some pointers as to what I need to do to interact with it?

Thanks.

+1  A: 

You need java parallel port drivers which I haven't found for free. You'll have to pay for the driver for Windows.

I think there might be some free drivers if you use Linux.

Pyrolistical
If you can figure out what the hardware is (as in the chip-set, not the package), you might be able to get drivers from the chip maker. That should let you use the device as you would a native parallel port.
BCS
+2  A: 

I think you should head toward javax.comm library here.. there is also a different version that is supposed to work better, called librxtx.. take a look here (it's a pluggable replacement for javax.comm)..

I used both of them for an embedded device and they worked great, they manage serial and parallel port.. maybe also usb in your case.

Jack
+1  A: 

I can't speak for parallel or Java but I've done something similar with serial-via-USB and C#. In that case it was exactly the same as a native controller. YMMV.

As for testing things: get an old dot-matrix printer (and put it in hex dump mode if you really want the nitty-gritty).

If you really want drivers for the thing, find a utility (I think the windows device manager can do it) that gives you the vendor ID and product ID numbers and from those you can look up all kinds of fun stuff (many Linux distributions have a plain text file that maps the numbers to the name of the manufacturer and what not) that plus Google should give you a driver installer.

BCS