View Full Version : [SOLVED] parallel port through usb interface?!!
SIGTERMer
November 14th, 2008, 08:41 AM
hi, i need to write a program that uses the parallel port to access an external circuit. of course outb and inb will be used. the problem is that i don't have a parallel port on the computer i will be using! so my question is: will i be able to use outb and inb normally if i use a usb-to-parallel cord? or even more, use a usb-to-serial cord with a parallel to serial converter? and if you haven't figured out yet what language im using, it c
Zugzwang
November 14th, 2008, 12:35 PM
I don't know about the serial-to-parallel converter, but the USB-parallel port interface is likely not to work, mainly because these special cables do not emulate a full parallel port, just enough that printers which do not need some "back-channel" (unlike the HP scanner/printer combination) work.
SIGTERMer
November 14th, 2008, 12:47 PM
if thats true, how much of the port can i use?
samjh
November 14th, 2008, 02:02 PM
hi, i need to write a program that uses the parallel port to access an external circuit.If your program will be using a parallel port, then it needs a physical parallel port on the machine it is running on. You won't get that effect with a mere USB-to-parallel cable.
Therefore, no go.
You might want to purchase a PCI parallel port card. They will need a bit of tinkering to work under Linux (Verbatim has instructions available for Linux setup for its cards).
Alternatively, you might want to look for a software emulator to create a fake parallel port on your machine, but which will use a USB port for physical communication. I don't know if anything exists for Linux.
SIGTERMer
November 14th, 2008, 02:25 PM
pci is not an option for me (laptop). i guess i'll have to get my self a pc... isn't there any way i can use my laptop?
Zugzwang
November 14th, 2008, 06:44 PM
pci is not an option for me (laptop). i guess i'll have to get my self a pc... isn't there any way i can use my laptop?
There are some "generic" docking stations for notebooks, i.e. you plug it in and get a bunch of connectors, like PS/2 keyboard connectors, more USB ports, serial and parallel port. These **might** have true parallel ports. I have seen such a device once for ~100€. But I have no idea about the Linux support.
SIGTERMer
November 15th, 2008, 01:54 PM
thanks people, but i guess i'll just have to use a normal desktop :(
thanks anyways.
Tails86
February 2nd, 2009, 06:18 PM
I was wondering the same thing. I did some quick searching on google and found one guy's site where he made a USB parallel port emulator that can be used for any parallel device (not just printer). Found here: http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/USB2LPT/index.html.en
I'm not sure how well it works, but it at least gives hope that it's possible.
wmcbrine
February 2nd, 2009, 08:05 PM
Hardware aside, you aren't going to able to use inb and outb under any modern operating system, except through DOS emulation, unless you're actually writing a kernel-level device driver, with all that entails. Banging directly on the hardware went out of style with DOS.
balagosa
February 3rd, 2009, 12:05 PM
sorry for reviving a SOLVED thread but i have the same problem.
Mind if I ask what is "inb" and "outb". I know it is a Port interface, but what exactly does it do? Because in my I/O systems in school, we have this library (inpout32.lib) that was made by one of my professors that has a function Out32(short data, short address). Is this possible that outb will be the same as Out32? There is also a function named Inp32(short address) which accepts data from a port.
In my case, I use 0x378 (Data Register for parallel port) for address.
Tails86
February 3rd, 2009, 04:39 PM
sorry for reviving a SOLVED thread but i have the same problem.
Mind if I ask what is "inb" and "outb". I know it is a Port interface, but what exactly does it do? Because in my I/O systems in school, we have this library (inpout32.lib) that was made by one of my professors that has a function Out32(short data, short address). Is this possible that outb will be the same as Out32? There is also a function named Inp32(short address) which accepts data from a port.
In my case, I use 0x378 (Data Register for parallel port) for address.
I've actually used that same library a couple years ago (or at least one with the same name). outb/inb and Out32/Inp32 basically do the same thing. As wmcbrine has said, inb and outb will not work under any modern operating system. That library gets around all the crap and puts your right at the hardware. Not sure how, but it works and it's fun to play with :-)
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.