Board index » delphi » parallel (printer) port communication

parallel (printer) port communication

Hello!

Does anyone have information howto create a bidirectional
communication between two PC's via the parallel port with Delphi
applications?

Thanks!

 

Re:parallel (printer) port communication


Try the TParPort component:
http://sunsite.icm.edu.pl/delphi/ftp/d20share/tparport.zip

<matthias.faulst...@t-online.de> schreef in bericht
news:3a84f2b5.147211@news.btx.dtag.de...

Quote
> Hello!

> Does anyone have information howto create a bidirectional
> communication between two PC's via the parallel port with Delphi
> applications?

> Thanks!

Re:parallel (printer) port communication


Quote
"M.H. Avegaart" <avegaartNOS...@mccomm.nl> wrote in message

news:968c8r$9r2$1@porthos.nl.uu.net...

Quote
> Try the TParPort component:
> http://sunsite.icm.edu.pl/delphi/ftp/d20share/tparport.zip

I can recommend that - it works a treat!

It has, however, raised a question or three for this newbie who is trying to
walk before he can crawl ;-)

The unregistered version uses parprtpk.dpl but, no matter what Project
Options I set, the app's executable needs vcl30.dpl to run.  A bit of a
heavy overhead for an application that would otherwise be about 50k in size.
Is this normal or am I doing something wrong?

Before anyone calls me a "tight-ass", I know I should register it (and get
the source) but, as it's just a one-off hobby application, $35 is really
more than the application's worth ;-)

I'm assuming that, if I do register and get the .pas file, I'll be able to
compile a completely stand-alone executable. Is this correct?

As an alternative, is there a parallel-port tutorial on the web anywhere so
I can have a go at rolling my own?

Thanks,

John. www.vwlowen.demon.co.uk

Re:parallel (printer) port communication


Quote
"John Owen" <j...@vwlowen.demon.co.uk> wrote in message

news:982148680.13556.0.nnrp-08.9e9807f0@news.demon.co.uk...

Quote

> "M.H. Avegaart" <avegaartNOS...@mccomm.nl> wrote in message
> news:968c8r$9r2$1@porthos.nl.uu.net...
> > Try the TParPort component:
> > http://sunsite.icm.edu.pl/delphi/ftp/d20share/tparport.zip

> I can recommend that - it works a treat!
> As an alternative, is there a parallel-port tutorial on the web anywhere
so
> I can have a go at rolling my own?

Sorry to follow up my own post but I've found what I was looking for at:
 www.arunet.co.uk/tkboyd/

The following snippet from his page seems to work well:-

--------
    procedure PortOut(IOport:word; Value:byte); assembler;
    asm
      xchg ax,dx
      out dx,al
    end;

    function PortIn(IOport:word):byte; assembler;
    asm
      mov dx,ax
      in al,dx
    end;

 --------

 procedure TForm1.SendButtonClick(Sender: TObject);
 var
    Data: Byte;
 begin
    Data:= 255;
    PortOut($378, Data);   {$278 for LPT1}
 end;

 procedure TForm1.InputButtonClick(Sender: TObject);
 var
    Data: Byte;
begin
    Data:= PortIn($379);
end;

John.

Re:parallel (printer) port communication


JRS:  In article <982148680.13556.0.nnrp-08.9e980...@news.demon.co.uk>,
seen in news:comp.lang.pascal.delphi.misc, John Owen
<j...@vwlowen.demon.co.uk> wrote at Wed, 14 Feb 2001 11:06:46 :-

Quote

>As an alternative, is there a parallel-port tutorial on the web anywhere so
>I can have a go at rolling my own?

Some of the relevant links in Web <URL: http://www.merlyn.demon.co.uk/pc
-urls.htm> may still work; feedback appreciated.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
 <URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.

Other Threads