View Full Version here: : LPT port and Delphi 4
bojan
05-10-2010, 02:26 PM
I want to write an application which will control stepper motor (for focus) for my XP machine.. Simple slider on a screen and output to ULN2003 on LPT port... but I have a problem accessing the port..
Long time ago I did some applications for serial port (timer for camera) and this worked OK wit TcomPort pack.. but I never actually found LPT port package anywhere on the net.
Anyone could help me out here?
Thanks in advance!
Tandum
05-10-2010, 03:21 PM
I've never done any LPT port stuff but a quick google points to inpout32.dll. Have look at this page (http://www.sixca.com/eng/articles/pardel/) for delphi examples and this page (http://logix4u.net/) for the dll with source by the looks. It says it works in WinXp but I doubt it will work in anything newer. Looks like you have to set bits in the register for port.
AndrewJ
05-10-2010, 05:53 PM
Gday Bojan
I use the freeware AsynchPro with D6,
http://sourceforge.net/projects/tpapro/
and it does everything you could ever want.
Lots of worked examples too.
I see its valid for D4 but i've never tried it with that.
Otherwise, you can use simple embedded assembler code to read/write as long as you use something like Userport to disable the Windows port security.
Andrew
bojan
05-10-2010, 06:43 PM
Many thank, guys.. Will try :-)
If successful, I will post the app to the forum.. it looks like there is nothing suitable on the web (at least to my knowledge).
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.