I'm trying to avoid custom hardware if possible.  I have always used
parallel ports and never had a problem with them until now.   I like the
idea of a parallel port because they are still built onto motherboards, and
there are also a TON of USB to parallel port adapters out there.   I'm
trying to keep this simple.

I put a repository of my test program here:
https://github.com/Zaaphod/FPC-Parallel-Port.  Perhaps someone can see what
I'm doing wrong.    I'm reading 255s no matter what I do.    I included my
old turbo pascal test program.  I would normally specify the port in hex
with a $ like this $378.  I could write to the port then read back what I
just wrote.. which is what I am trying to do now.. I don't have anything
hooked up to the port yet, I should be able to write to it and read it back.

I seem to be accessing the DLL correctly, because I tried it on a windows 7
computer and  IsInpOutDriverOpen was false, because I forgot to install the
driver, once I installed the driver IsInpOutDriverOpen is now true, so that
tells me I'm accessing the DLL and the DLL is confirming the driver is open.


-----Original Message-----
From: fpc-pascal-boun...@lists.freepascal.org
[mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of Mark Morgan
Lloyd
Sent: Friday, July 22, 2016 5:39 PM
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] Parallel Port Access with Free Pascal - windows

James Richters wrote:

I was rather rushed earlier for reasons that would probably amuse but would
be vastly OT (shoving sheep around Sussex since we're shearing Saturday...).

> I like the looks of that Velleman K8055,  that would do the job for me if
I
> can get it to work.   I would actually prefer a linux port of my program

The Velleman boards usually come as kits, but they use PTH components and
are a doddle to assemble. My recollection is that the K8055 came with
something crude that allowed you to interface from e.g. Visual Basic,
however I found that somebody had reverse-engineered it and produced a
library (?) for Linux... I can't remember whether this was C or Pascal. I
used this with Lazarus (the IDE and class library that sits on top of FPC)
to produce something similar to Velleman's own demo app, you'd obviously be
welcome to this.

However in the general case I think it would be worth bearing in mind that
functionality of the Velleman board could fairly easily be implemented using
appropriate firmware on an Arduino, and this is likely to be more "future
proof" than a demo kit. But I don't have any ready URLs etc.

> however I keep hitting a roadblock when I try to use the graph unit.  
> My program used the turbo pascal graph unit exclusively for it's user 
> interface and I'm trying to avoid re-writing the entire thing.  It 
> works fine in windows, but when I try to run it on linux I can't get 
> it to compile, it can't find the graph unit.  I may have some 
> directories set wrong or something, I'm not sure, but that's what's
holding me up on a linux port.

Can't comment on that, but I see Graham's lending a hand. Particularly if
you're porting to Linux you do need to consider whether you're planning to
run in the context of a GUI or over SSH etc, what /exactly/ are you trying
to display and on what sort of system?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to