Need help with parallel port

This forum is all about circuits and components.

Need help with parallel port

Postby crislem on Sun Jan 25, 2009 6:46 pm

Hello,

I am trying to use a parallel port to control a stepper motor, but I'm having a bit of trouble "taming" the parallel port. I read this article http://www.epanorama.net/circuits/parallel_output.html and I still don't know what to do.

I read that if I go to device manager and check the port properties I should see something like "Input/Output Range 0378 - 037F", but when I do that I get this:"Input/Output Range DC80 - DC87". The port is set for LPT1 and now I'm puzzled because I don't know what address to put in the C program that I use to control the pins.

From the moment the computer starts I measure 5V constantly with my voltmeter. I tried using all three addresses in the #define (378,3BC,278) and then send 0 to the Data so that all pins go low, but I still measured 5V.

Anyway, this sis where I am and I hope somebody can help me with this. If I can provide any information, please let me know and I will do my best to explain my situation even better.

Thank you in advance.
crislem
 
Posts: 3
Joined: Sun Jan 25, 2009 6:35 pm

Re: Need help with parallel port

Postby Tomi Engdahl on Mon Jan 26, 2009 9:11 am

I read that if I go to device manager and check the port properties I should see something like "Input/Output Range 0378 - 037F", but when I do that I get this:"Input/Output Range DC80 - DC87". The port is set for LPT1 and now I'm puzzled because I don't know what address to put in the C program that I use to control the pins.


In think you should try to put DC80 to that C program.
It could work or not. At least worth to try.
If the hardware of your parallel port is similar to traditional parallel port in PCs or very close to it, just sitting in different address, then putting DC80 to the C program should work. If the hardware is something different then it might not work.

The PCI bus parallel port notes could be also good idea to read
http://www.epanorama.net/circuits/paral ... tml#pcibus
"I have not played much with parallel port card that plug to PCI bus, but I have seen cases where the parallel port that plugs to PCI bus does not work properly with legacy software, meaning a software that control parallel port directly at I/O bus level. It seems that the PCI parallel ports are different hardware than normal parallel ports, at leasts sit at different I/O address. The parallel port driver (comes with the card or built into Windows) makes the parallel port card to look like normal parallel port to high level applications, enven though the internal operation is different than in traditional ports. I have bene told that in systems where there was both ISA and PCI bus, the I/O address range normally used for parallel ports was limited to be only accessable though ISA bus, meaning that the ports on PCI bus needed to be on different I/O address (higher I/O address). Nowadays when the ISA bus has practically dissapeared from desktop computers, and things could be different."
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Re: Need help with parallel port

Postby crislem on Tue Jan 27, 2009 1:26 am

Tomi,

Thank you for the quick reply. I was hoping to get some help from somewhere.

I tried putting "#define Data 0xDC80" in my C program, but I don't know if it's working... I get 5V constantly no matter what I do. I have no idea why this is happening. Shouldn't the Data pins be 0V when Windows starts? Why do I measure 5V all the time? Should I turn something off in Windows?

I decided to attach 4 pictures with what I get in device manager. I noticed something else that I don't know how to interpret. I have a "Ports" section, but I also have a "Multifunction adapters" section. In both of them I have something about my PCI card, but the info is slightly different and I don't exactly know how to interpret it.

Do you have any thoughts on that?

Thanks again for trying to help.
Attachments

Error 404 - Not Found

Error 404 - Not Found

Error 404 - Not Found

crislem
 
Posts: 3
Joined: Sun Jan 25, 2009 6:35 pm

Re: Need help with parallel port

Postby crislem on Thu Feb 05, 2009 4:05 am

I solved my problem by using the inpout32.dll and the free borland C compiler. For more info, you can check out http://hytherion.com/beattidp/comput/pport.htm and http://csjava.occ.cccd.edu/~gilberts/bcc55.html.

The second link was a very nice, step by step guide as to how to do things.

Anyway, I hope this helps somebody that encounters my problem.
crislem
 
Posts: 3
Joined: Sun Jan 25, 2009 6:35 pm


Return to Circuits and Components

Who is online

Users browsing this forum: No registered users and 3 guests

cron