Member Login
member
passwd
remember me on
this computer.

- join now -
- forgot username or password? -

Jump to a Date

Sponsored Communities
Cool stuff
Select a topic of interest:
...and press:
Neat Stuff
Control.com Stuff

Visit our shop for nerds in control lifestyle products.

Fortune
"Sometimes I simply feel that the whole world is a cigarette and I'm
the only ashtray."
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
advertisement
from the Automation List department...
Problems interfacing through parallel port
Computers in manufacturing; also hardware discussion. topic
Posted by Gert Love on 10 July, 2002 - 6:26 am
Hi all,
I made an interface for my parallel PC-port, according to the instructions in The Robot Builder's Bonanza, by Gordon McComb.

When using it under DOS, everything works fine. eg I send 255 to the datalines and all lines go high. When I send 0 all lines go low.

Now follows my problem. I am programming some Windows interface using Delphi. A GUI is much easier to use than a text based program like the one I wrote to use in DOS (using QBasic).

But apparently some bits are forced high by Windows, and others low. When I send 255 to the dataregister, for example, all outputs go high for a very short period of time (blink), and then they go low again, leaving only databits 0 and 6 high. When I want to take all low, bits 0 and 6 go low and immediately high again. As you know this is rather inconvenient: when I want a motor to stop, it has to stop, and not (randomly) turn...
The bits I spoke of go high when Windows is started, so I suppose that Windows is the source of my problem.

For testing, I used an old Olivetti M290. (I don't want to risk blowing up the motherboard of my new computer while testing). Because of limited PC-resources, I used Windows 3.1. I programmes in Delphi 1 (16 bit).

Can anyone tell me why the datalines are forced the way they are (by Windows)? And is there a way around this?

Greetings,
Gert Love


Posted by Brian E Boothe on 12 July, 2002 - 2:20 pm
Me personally i designed my Parallel Port Card As A ISA card.. That interfaces thru its own 6522 with opto-couplers. but hey thats me......anyway that is an issue i ran into as well
those lines are actually reset lines that why your printer init's at Restarts have you noticed that ?? ( is there a solution ??) Possibly!
yes..throw TTL Inverters Gates on the outputs of the LPT port then resource around that as well or .look at the LPT port in bios.. change it to flip the two address's around then you can recode around that as well then look in windows and UNLINSTALL all refrences to the LPT
port...drivers ect some mother boards this works some it doesn't...best solution?? use a 386/486 win95 or JUST USE DOS..and Code in VB4 dos pretty simple.(BUT FUN AS HELL )
another solution is to use the GAME port as well.


Posted by GC on 26 April, 2006 - 11:42 pm
The problem is easy. Instead of using the ground (pin 22) to each data line, use them in pairs to each other. E.g. use Data pin 1 and 2 as a switch and and so on. Only thing here is that you will have 4 outputs instead of 8. But the reset of windows or pc will not affect the circuit.


Posted by Jiri Baum on 13 July, 2002 - 12:30 pm
Gert Love:
> But apparently some bits are forced high by Windows, and others low.
> When I send 255 to the dataregister, for example, all outputs go high
> for a very short period of time (blink), and then they go low again,
> leaving only databits 0 and 6 high. When I want to take all low, bits
> 0 and 6 go low and immediately high again.

I'm not familiar with this under Windows, but in general you have to somehow convince it that there is no printer port, so it stops trying to manage it for you.

You could try disabling the printer port driver, or configuring its I/O address to something that doesn't exist.

> As you know this is rather inconvenient: when I want a motor to stop,
> it has to stop, and not (randomly) turn...

Note that if it's anything even vaguely dangerous, you shouldn't be letting Windows anywhere near it (or, quite possibly, any PCs).

> For testing, I used an old Olivetti M290. (I don't want to risk
> blowing up the motherboard of my new computer while testing). Because
> of limited PC-resources, I used Windows 3.1. I programmes in Delphi 1
> (16 bit).

Be aware that this can differ a great deal between different versions of Windows; in particular, I believe Windows NT won't let you do this at all, you *have* to go through a driver.


Jiri
--
Jiri Baum <jiri@baum.com.au> http://www.csse.monash.edu.au/~jirib
MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools


Posted by Anonymous on 29 October, 2002 - 5:21 pm
Yup. It's not simply a WINDOWS problem. For a through review, read HOW TO BUILD YOUR OWN LOW-COST DATA ACQUISTION AND DISPLAY DEVICES, by Jeffrey Hirst (Tab Publications). May be available via amazon.com


Posted by Christian on 4 October, 2003 - 6:26 pm
Please, do you have found a solution ? I've got the same problem ... with Win98 SE when I progam output by Labview soft

Thanks
Christian


Posted by nils on 6 October, 2003 - 6:22 pm
Check out this link: http://www.lvr.com/parport.htm.

You need a special driver for acessing the paralell port under Windows.

Good luck!
Nils

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2009 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!