Solved

Comm. with parallel

Posted on 1997-12-10
3
162 Views
Last Modified: 2010-04-04
Hi everybody

I have a big problem, I have to send some commands through different pins on the paralleport to control a external device in a College project, I don't have a clue on how to do that. I only need to send commands, not receive any, if anybody know how to do that I would be very happy :-). I have said the question is easy... for you, I have tried for a long time, so please help.
0
Comment
Question by:koger
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1353291
This is what I gave as an answer a while ago :

check out if it helps you.

 I can give you already this code. That's the easiest way. It's the way to print by bypassing windows. Don't think it's different to send your codes to your hardware.

                   var
                    f : TextFile;
                   begin
                    AssignFile( f, 'LPT1' );
                    Rewrite( f );
                     //
                     // do your printing here...
                     //
                    WriteLn( f, {codes});
                    CloseFile( f );
                   end;

(Following: I'm not sure if you need it)
If you plan on sending control codes to the printer, call this function immediat

 procedure SetBinaryMode (var F: Text); assembler;
                      asm
                      mov ax,$4400
                      les di,F
                      mov bx,word ptr es:[di]
                      int $21
                      or dl,$20
                      xor dh,dh
                      mov ax,$4401
                      int $21
                      end;

Look on the net for this file! --
                                 |

The Delphi Hardware Programmers's Archive
All of the files in this archive were collected from FTP sites to illustrate how to interface Delphi with IBM PC hardware. They are all public domain and should be used with care. I disclaim                    everything, this file is provided as a service to all who are interested.

GOOD LUCK! Alan Young
ajtech@apc.net

DELFHDWR.DOC Contains a MS Word document explaining how to interface Delphi with hardware. Contains references to the other files below.

VBAJGAME.ZIP Shows how to interface a Delphi DLL with Visual Basic. Accesses joystick port

->>>>>>>>>>>>>>>>>>>>>>>>>

LPCTRL.ZIP Shows how to program parallel LPT port in Delphi

->>>>>>>>>>>>>>>>>>>>>>>>>> Isn't this what you need?

HWPORT95.ZIP A PORT I/O Driver for Win 95. Use with Delphi as per document's instructions

loaddrv.ZIP CONTAINS LOADDRV program for WinNT. This is for loading the giveio.sys driver

DIRECTIO.ZIP Contains GIVEIO.SYS driver for WINNT.



                   Have fun,
                   c.u. ZifNab;
0
 

Author Comment

by:koger
ID: 1353292
Where did you said that I could find the files?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1353293
Well, after my computer melt-down :-(. Everything was lost. Including these files, but!! I found them again :

http://Sunsite.icm.edu.pl/delphi/ftp/d10free/delfhdwr.zip

Don't let d10free let you think that it's only for D1. This file contains documents about delphi and hardware for ALL delphi versions

Have fun,
c.u. Zif;
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now