Solved

Comm. with parallel

Posted on 1997-12-10
3
164 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 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

21 Experts available now in Live!

Get 1:1 Help Now