Solved

Connection via LPT

Posted on 1998-12-29
6
322 Views
Last Modified: 2010-04-04
Where can I find components that makes me manage data IN/OUT the Parallel port ,
I also need full informations about how does the LPT work

Thanks for help
anas
0
Comment
Question by:anas_madani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 1

Expert Comment

by:Fatman121898
ID: 1353666
Hi, anas.
You have no need of any Delphi components in order to work with LPT. For every LPT there are three IO addresses (Ports) which are: Data port, Status port and Control port. They are as follows:
 
for LPT1:
$378 - Data port (Read/Write)
$379 - Status port (Read)
$37a - Control port (Read/Write)

for LPT2:
$278 - Data port (Read/Write)
$279 - Status port (Read)
$27a - Control port (Read/Write)
.

If you are using Delphi1 or Delphi2 you should use code like this:

Port[xxx]:=SomeValue;   //  in order to write SomeValue to IO port #xxx
SomeVar:=Port[xxx];      //  in order to read IO port #xxx into SomeVar
.

If  you are using any 32 bit Delphi (Delphi 3 or Delphi 4) you should use this:

// to write SomeValue to IO port #xxx:
asm
  mov DX, xxx;
  mov AL, SomeVal;
  out DX, AL;
end;
.
// to read port #xxx into SomeVar:
asm
  mov DX, xxx;
  in AL, DX;
  mov SomeVar, AL;
end;
.
Where: xxx : IO port number
           SomeValue: Byte type value;
           SomeVar:     Any Integer type variable;

NOTES:
1.All this stuff will not work if your OS is WindowsNT, because it doesn't allow direct access to such resources as IO ports.
2.The meaning of every bit in Status and Control port is fully described in literature.  


0
 

Author Comment

by:anas_madani
ID: 1353667
Hi  Fatman

You have mentioned my problem in your NOTES   ( Yes I'm working with WINDOWS NT4)

0
 

Author Comment

by:anas_madani
ID: 1353668
I do work with DELPHI 3
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:inthe
ID: 1353669
there's a good component called tvichw32 probably here
also one called tserial i think that does nt lpt ports
http://sunsite.icm.edu.pl/delphi/
or
 www.torry.ru/

comes with good examples etc and is fine for nt
(it maybe shareware cant remember)
Regards Barry

0
 
LVL 7

Expert Comment

by:Motaz
ID: 1353670
Hi Anas nice to see you here, I'm interested in your quesion, so I'll check for notification.

Motaz A. Azim
0
 
LVL 17

Accepted Solution

by:
inthe earned 20 total points
ID: 1353671
here are some more for ya.
it seems there are no free ones for nt, these were cheapest around
http://www.torry.ru/  under system#4   IOPort_v2.0  $35.00
http://www.torry.ru/  under system#4   TinyPort_V2.0 $50.00
tvichw32 is there as well and although is much better is also more expensive

fot more info on parallel port there are many links here about how the ports work and faq's etc:
http://www.lvr.com/parport.htm

Regards Barry
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to center only a line in richedit? 4 69
how to update exe applicatio from internet ? 6 95
Dynamically Created Query 3 70
how to change, disabled button color FMX ? 1 51
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question