Author Topic: Why does Nobody Know Nothing About PC PCI Parallel Cards???  (Read 15545 times)

0 Members and 1 Guest are viewing this topic.

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Dear Software Gurus,

Now I understand, I cannot understand everything, something has to be hidden from me before I enter my grave.

I can be happy, it is said that a fool knows more and more each day while the wisest of men knows less and less. What does this say about women??

In fact I searched for hours on the web to find some info about interfacing with the ports of a PCI Parallel Port card,.nuttin!
Finally I found one company, Lavasoft that actually had tech support for their add-on cards. What I got from was a most  courteous reply, but all this guru of tech support told was that he had no experience with directly accessing these ports with software, didn't have a clue!
Really!

The XP device manager shows the port addresses, the memory addresses used, but they remain lost upon the great sea of software, esoteric ports of call, yet unexplored.

I just wonder then, these ports undoubtedly work well with printers, how in the world did the software and hardware engineers who design these cards have managed to find this information?

Still PCI portless in Seattle...
« Last Edit: May 01, 2015, 06:44:03 pm by SuzyC »
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3063
  • Country: be
    • Freelance Hardware Engineer
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #1 on: April 30, 2015, 04:57:04 pm »
Heh... Legacy ports. Had me some fun with PS2 keyboards a few years ago. About as much documentation as you have for your device  ;D

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6694
  • Country: nl
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #2 on: April 30, 2015, 05:03:17 pm »
I think you need slightly less or slightly more pharmaceuticals before posting :)

What's the problem exactly? These ports work exactly the same as a standard parallel port, just at a different base address which you already found.

PS. is your question how to access the parallel port under windows xp period and the PCI part just useless extra information? In that case, does this help?
« Last Edit: April 30, 2015, 05:13:10 pm by Marco »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #3 on: April 30, 2015, 05:10:19 pm »
If you see my recent post about Entry Points, the legacy port access problem has been in at least two programming languages, has..uhmm..kinda mostly solved.

That is true Marco,  I have the port address but no programming  language can directly access these ports, as far as I know.
« Last Edit: April 30, 2015, 05:14:26 pm by SuzyC »
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #4 on: April 30, 2015, 05:11:46 pm »
Yeah, it can be hard getting info about obsolete technology :)

If you have the IO address, that is all you need.

If you want to remap the address to a standard address, that may or not be possible depending on the card.

Bob
"All you said is just a bunch of opinions."
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #5 on: April 30, 2015, 05:13:38 pm »
If you see my recent post about Entry Points, the legacy port access problem has been in at least two programming languages, has..uhmm..solved.

That is true Marco,  I have the port address but no programming  language can directly access these ports, as far as I know.

In the code you posted :
Quote
Dim N as Long
Dim T, u as Integer
T=Timer
DoIt:

     out &H378, 0
     u=inp(&H378)

     N=N+1

    if(Timer-T)<10 then goto DoIt

End

&H378 is the port address (hex).
Bob
"All you said is just a bunch of opinions."
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6694
  • Country: nl
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #6 on: April 30, 2015, 05:15:21 pm »
That is true Marco,  I have the port address but no programming  language can directly access these ports, as far as I know.

You were being so specific about the PCI, I thought it was relevant :) I edited my post, but I'll repeat here ... this seems a pretty thorough list of all the ways to easily access the parallel port under different flavours of windows (without writing your own custom driver).
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #7 on: April 30, 2015, 05:19:29 pm »
While 0x378..etc range ports are accessible with legacy ports with a few hard to find .dll's, PCI ports have port addresses up there in the port clouds, like the one I have: 0xDFE0-DFE7

http://janaxelson.com/parport.htm has a lot of legacy info, but the three letters "PCI" are not seen there.
« Last Edit: May 01, 2015, 01:09:42 pm by SuzyC »
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: nl
  • Current job: ATEX product design
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #8 on: April 30, 2015, 05:23:36 pm »
Usually they are shipped with a floppy disk containing the driver for Windows 95 and Dos. Maybe you should send a fax to the manufacturer, they might be able to help you.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #9 on: April 30, 2015, 05:26:07 pm »
While 0x378 is portable around legacy parallel parallel ports, PCI ports have port addresses up there in the port clouds, like the one I have: 0xDFE0-DFE7

So? It's just a 16 bit address, your VB code won't care.
Bob
"All you said is just a bunch of opinions."
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #10 on: April 30, 2015, 05:27:30 pm »
Send a Fax????  I don't know Chinese!
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #11 on: April 30, 2015, 05:33:18 pm »
My VB code may not care but  VB does not have any intrinsic port manipulation so support port in/out is out of this world, not to mention that those few .dll drivers that I have found do not allow use of the IO words to peek at those ports above 32767.
« Last Edit: April 30, 2015, 05:35:25 pm by SuzyC »
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6694
  • Country: nl
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #12 on: April 30, 2015, 06:01:09 pm »
Lets be absolutely clear here.

You tried this library and it didn't work with the address?
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #13 on: April 30, 2015, 06:06:20 pm »
I have to ask...
-WHY- are you starting a new development using a parallel port in the first place?
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #14 on: April 30, 2015, 07:29:16 pm »
My VB code may not care but  VB does not have any intrinsic port manipulation so support port in/out is out of this world, not to mention that those few .dll drivers that I have found do not allow use of the IO words to peek at those ports above 32767.

LOL, you are impossible to help. Even when people give you the answer, you refuse to believe it.
Bob
"All you said is just a bunch of opinions."
 

Offline Towger

  • Super Contributor
  • ***
  • Posts: 1645
  • Country: ie
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #15 on: April 30, 2015, 09:07:41 pm »
Open LPT1 etc as a random access file, write data to it and close the file. On Windows XP and higher the OS will capture the data into the print queue and output it to the port. On older OSs the data will be sent direct to the port. There are also DLL calls etc which can assess the port directly.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8240
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #16 on: May 01, 2015, 12:15:41 am »
My VB code may not care but  VB does not have any intrinsic port manipulation so support port in/out is out of this world, not to mention that those few .dll drivers that I have found do not allow use of the IO words to peek at those ports above 32767.
You'll probably have to use negative numbers to get at the ones above 32767 (0x7FFF); it wraps around so 32768 (0x8000) is -32768, 32769 is -32767, and this keeps going until 65535 (0xFFFF) which is -1. http://en.wikipedia.org/wiki/Two's_complement
 

Offline Ed.Kloonk

  • Super Contributor
  • ***
  • Posts: 4000
  • Country: au
  • Cat video aficionado
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #17 on: May 01, 2015, 12:25:06 am »
My VB code may not care but  VB does not have any intrinsic port manipulation so support port in/out is out of this world, not to mention that those few .dll drivers that I have found do not allow use of the IO words to peek at those ports above 32767.

The 1997 book "Visual Basic 5.0 Programmer's Guide to the Win32 Api" had an included module for VB supplied with the book to facilitate direct port IO.

http://www.amazon.com/Applemans-Visual-Basic-Programmers-Guide/dp/1562764462

HTH.
iratus parum formica
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #18 on: May 01, 2015, 03:19:38 am »
Been a very long time.   If you are using a protected OS you may not be able to do peeks pokes inp outp, etc.    OS may trap these.    There was a good article in Dr Dobbs back in the 90s (NT days) that covered how to change the exception tables.    My old PROM programmer came with a program that would change the tables.   Seems like some of the dongle guys offered these tools as well.   

Labview used to have a peek poke function in the Windows 3.x 95 days.  Long gone with NT.   

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #19 on: May 01, 2015, 12:31:04 pm »
Been a very long time.   If you are using a protected OS you may not be able to do peeks pokes inp outp, etc.    OS may trap these.    There was a good article in Dr Dobbs back in the 90s (NT days) that covered how to change the exception tables.    My old PROM programmer came with a program that would change the tables.   Seems like some of the dongle guys offered these tools as well.   

Labview used to have a peek poke function in the Windows 3.x 95 days.  Long gone with NT.

I think that this is the issue, in fact. Trying things like inp(), outp(), peek and poke in BASIC on any modern OS that runs in protected mode is hopeless. This is not a ZX Spectrum or DOS when your program "owned" the entire machine.

Your user mode program simply doesn't have direct access to the hardware and for a good reason - it would be trivial to seriously hose the machine if you could manipulate arbitrary ports or memory addresses.

Then there is the entire issue of virtual memory and how the physical address space is actually mapped to the address space of your running process - port 0xDFE0 for your process could be mapped to a different physical address for another program.

If you really want to directly access I/O ports, you need to go through some system calls. In the case of Windows you will find that you most likely need to install your own device driver for direct port access. Those drivers run in the privileged mode and can do such things. Alternatively, there are libraries that can simplify the process for you using the existing system APIs.

In Linux it is a bit easier because the hardware is exposed to user space through a special virtual filesystem and device files and if you don't need interrupts or DMA, you can do a lot without writing custom drivers. However, you will need appropriate privileges (typically root user access) to manipulate those files, normal user cannot do it.



 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #20 on: May 01, 2015, 01:06:08 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernel twiddling with ports, then my machine is my kernel to ace!

« Last Edit: May 02, 2015, 12:41:22 am by SuzyC »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #21 on: May 01, 2015, 01:21:47 pm »
   suicidaleggroll, good question:  Why use a PCI parallel port?

(1) The programming language interface to the standard parallel port is so simple, compared to trying to use a serial communication add-on like FTDI USB I/O or else attempting to  get with MSComm.
(2) All others are not, maybe a way irequires creating a modem interface, hundreds of lines of code.
(3) An USB interface can create connections whose software can crash the operating system, mandating a reboot,
(4) At least the legacy parallel port allows me to have a fairly fast and direct hardware interface with my projects, why not PCI.
(5) I have several older computers with legacy parallel port connectors that can be now used for MCU debugging or machine control or home automation etc, but are limited to one parallel port to connect directly to the outside world.. A PCI parallel port card could add others.
(6) A misstep with a probe zapped the parallel port on a powerful newer motherboard and it is now worthless on my bench to do something really useful with it.
« Last Edit: May 01, 2015, 01:30:24 pm by SuzyC »
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #22 on: May 01, 2015, 01:22:57 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernal twiddling with ports, then my machine is my kernal to ace!

Then use an operating system that is designed with the same philosophy (read: not Windows or OSX).
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16272
  • Country: za
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #23 on: May 01, 2015, 01:25:12 pm »
If it is Windows you merely are renting it, the OS is a copyrighted item, and you are not allowed to modify it without paying for a MSDN subscription and having the certification to use the published API calls.

You probably want to look up the supplier of the generic cards, some have released open source datasheets and have released source code for the drivers and for the programming of the interfaces.
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #24 on: May 01, 2015, 01:27:28 pm »
Towger, Thanks, but silly boy, you suggest the most slow way to do things, a one-way trip. I wanna do in as well as out.

I don't wanna print to the PCI port, I already have a driver for that that came with the card, I want to have a PCI fast port i/o interface to the real world.

 
« Last Edit: May 02, 2015, 12:42:38 am by SuzyC »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #25 on: May 01, 2015, 01:35:34 pm »
Thanks Ed.Kloonk,

but pray tell, does it have a chapter on how to interface with a programming language to manipulate  PCI ports with any Win operating systems >Win2000 since the book's publishing date was something like 1997?
« Last Edit: May 01, 2015, 01:46:34 pm by SuzyC »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #26 on: May 01, 2015, 01:44:55 pm »
Thanks Amyk,

Using inpout32.dll and VB6, low port numbers work perfect, but attempting to step trough my program and use  inp or out to a port number above 32767 causes the VB6 IDE to report, "Visual Basic has encountered a problem and must close."

I haven't tried negative numbers yet, but I expect the same results to the neg. equivs. to &HDFE0-&HDFE7
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #27 on: May 01, 2015, 01:50:13 pm »
Thanks SeanB,

I guess I am being just a little naughty!


Do you know of any PCI Parallel card that has any open-source driver posted on the web..I don't.

 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #28 on: May 01, 2015, 02:08:41 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernal twiddling with ports, then my machine is my kernal to ace!

In that case, you have to install an open-source operating system.
With windows, you don't (completely) own your pc. Microsoft is in charge about what you are allowed to do with it.
At least as long as you are running windows...
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #29 on: May 01, 2015, 02:36:12 pm »
Declare bool hockey as Constant

*This_Pointer to anyone who can't code anything more than a SMS message on a smartphone. Complete  nonsense that I need to find another operating system.


These PCI ports are being used by Windows 6 and 7 programs by those few who have figured it out.


« Last Edit: May 02, 2015, 12:43:43 am by SuzyC »
 

Offline Ed.Kloonk

  • Super Contributor
  • ***
  • Posts: 4000
  • Country: au
  • Cat video aficionado
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #30 on: May 01, 2015, 02:44:49 pm »
Thanks Ed.Kloonk,

but pray tell, does it have a chapter on how to interface with a programming language to manipulate  PCI ports with any Win operating systems >Win2000 since the book's publishing date was something like 1997?

As the poster who replied after me pointed out, the NT kernel got adopted not long after that book was published.

Win98 was the last MS OS that I produced any code on.

« Last Edit: May 01, 2015, 03:10:02 pm by Ed.Kloonk »
iratus parum formica
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7990
  • Country: gb
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #31 on: May 01, 2015, 03:04:43 pm »
Perhaps this will help your unGoogleness: http://www.internals.com/
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3233
  • Country: gb
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #32 on: May 01, 2015, 03:10:07 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernal twiddling with ports, then my machine is my kernal to ace!

In that case, you have to install an open-source operating system.
With windows, you don't (completely) own your pc. Microsoft is in charge about what you are allowed to do with it.
At least as long as you are running windows...

Are you saying Microsoft's Windows license prevents people directly accessing their printer ports?  i.e. DLPortIo, inpout32 etc. are actually illegal to use as they contravene the MS licence?  If not, then what point are you making?
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #33 on: May 01, 2015, 03:13:56 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernal twiddling with ports, then my machine is my kernal to ace!

In that case, you have to install an open-source operating system.
With windows, you don't (completely) own your pc. Microsoft is in charge about what you are allowed to do with it.
At least as long as you are running windows...

Are you saying Microsoft's Windows license prevents people directly accessing their printer ports?  i.e. DLPortIo, inpout32 etc. are actually illegal to use as the contravene the MS licence?  If not, then what point are you making?

The point is that Suzy and Karel are both confused. Bill Gates isn't telling anyone that it's against the EULA to directly access the parallel port. Windows (like OS X and Linux and ....) is a multiuser, multitasking operating system which necessarily has to abstract peripherals so the whole thing works as users expect.

This whole thread is pretty stupid.

If Suzy wants to peek and poke, she can look on eBay for an Apple ][.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #34 on: May 01, 2015, 03:24:11 pm »
   suicidaleggroll, good question:  Why use a PCI parallel port?

(1) The programming language interface to the standard parallel port is so simple, compared to trying to use a serial communication add-on like FTDI USB I/O or else attempting to  get with MSComm.
(2) All others are not, maybe a way irequires creating a modem interface, hundreds of lines of code.
(3) An USB interface can create connections whose software can crash the operating system, mandating a reboot,
(4) At least the legacy parallel port allows me to have a fairly fast and direct hardware interface with my projects, why not PCI.
(5) I have several older computers with legacy parallel port connectors that can be now used for MCU debugging or machine control or home automation etc, but are limited to one parallel port to connect directly to the outside world.. A PCI parallel port card could add others.
(6) A misstep with a probe zapped the parallel port on a powerful newer motherboard and it is now worthless on my bench to do something really useful with it.

1) Are you sure?  The fact that this thread has reached 3 pages without a solution tells me it's not as simple as you're suggesting...
2) What?
3) Only with a hopelessly broken driver or a shitty OS
4) I'm not talking about PCI, I'm talking about parallel ports.  They are so ridiculously obsolete that the fact you're attempting to do ANY new development using them is laughably sad
5) See #4, I'm not talking about PCI, nobody here is talking about PCI, we're all talking about parallel ports
6) Yet another reason not to use parallel ports!

You need to step back and look at the real problem.  What you're looking for is GPIO from a general purpose desktop computer.  A parallel port is the -WRONG- solution to this problem, as I'm pretty sure this thread has made painfully obvious.  There are literally TONS of external devices you can use to give you GPIOs from a general purpose computer using modern interfaces that won't disappear any time soon (or in this case, already disappeared over a decade ago).  For example AccesIO has a lot of options with PCI, PCIe, and USB interfaces and up to 96 GPIOs per device, plus other models with analog I/O, optical isolation, etc.  Some of them can run at very high speeds as well.

For a simple option:
http://accesio.com/go.cgi?p=../usbp/usbp-dio16ro8.html

16 TTL/LVTTL I/O with 32mA current capacity, USB interface, full driver support with example code for Linux and Windows.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #35 on: May 01, 2015, 03:52:18 pm »
Suzy, I think I can help.

I used to use the freeware DriverLINX PortIO when hitting the parallel port in Windows XP. The evil philanthropist Bill Gates never forced me to stop using it and switch to Linux instead like some of the nice misanthropists in this thread seem to be advocating.

DriverLINX webpage is no longer, but it's still available for download at the bottom of this page, Winford Engineering downloads

From what I can tell it only works in 32 bit and in Windows 7+ you need to set it to run in compatibility mode with XP.

Hope that helps  :-+
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #36 on: May 01, 2015, 04:30:18 pm »
Holy shit. 

A three page thread focused on "high-speed" access to a parallel port with ... I still can't believe I read this ... VB. 

:-DD :palm:
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #37 on: May 01, 2015, 04:40:20 pm »
For a simple option:
http://accesio.com/go.cgi?p=../usbp/usbp-dio16ro8.html

16 TTL/LVTTL I/O with 32mA current capacity, USB interface, full driver support with example code for Linux and Windows.

Kinda expensive, but this kind of solution would be better if one need to do things like this from an pc.

Adafruit also have an solution to this:
https://www.adafruit.com/products/2264

with tutorial: https://learn.adafruit.com/adafruit-ft232h-breakout

And seeedstudio have this: http://www.seeedstudio.com/depot/FT2232H-USB-20-HiSpeed-breakout-board-p-737.html

And I suspect that there are many more ways..
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #38 on: May 01, 2015, 05:07:51 pm »
Adafruit FT232H Breakout - General Purpose USB to GPIO+SPI+I2C
PRODUCT ID: 2264
$14.95
OUT OF STOCK

Programs in Python?


http://accesio.com/go.cgi?p=../usbp/usbp-dio16ro8.html  $189 + Shipping and Tax

Versus:My Own PC's = $0.00

I can't believe I posted so much just to save a lousy $200 bucks!

Are you all millionaires?

http://www.seeedstudio.com/depot/FT2232H-USB-20-HiSpeed-breakout-board-p-737.html

This is only $27.00 + ship+tax, but driver code is in Delphi
« Last Edit: May 01, 2015, 05:33:08 pm by SuzyC »
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #39 on: May 01, 2015, 05:21:04 pm »
Are you all millionaires?

I think he's merely a thousandaire.
 


Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #41 on: May 01, 2015, 05:28:39 pm »
Macbeth:



Thanks a million, they do have a driver for their USB I/O cards with an easy interface to Win Xp easy to interface with VB6.

http://www.winfordeng.com/support/download.php

Thanks Monkeh:
I didn't see these links at first, thanks for input pointing this out.
« Last Edit: May 01, 2015, 05:57:37 pm by SuzyC »
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #42 on: May 01, 2015, 05:29:36 pm »
http://accesio.com/go.cgi?p=../usbp/usbp-dio16ro8.html  $189 + Shipping and Tax

Versus:My Own PC's = $0.00

I can't believe I posted so much just to save a lousy $200 bucks!

Are you all millionaires?

Look again, it's $89.  The $189 one includes high current relay controlled outputs.  I'm not saying it's the only option, just that it's A option, and they provide insanely good customer support.  They'll even go as far as writing custom programs to use their hardware for you, for free, provided your requirements are not too complex.  I ordered a board once that needed different power and I/O voltages (5v power, 3.3v I/O).  I emailed them to ask what the best way to accomplish that was (where to run a jumper wire, what resistors to remove, etc.), and instead they just did the modification for me for like $10 extra (on a $400 board).

As I said in my post, there are literally tons of options though, ALL of which are better than using a parallel port.
« Last Edit: May 01, 2015, 05:36:47 pm by suicidaleggroll »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #43 on: May 01, 2015, 05:38:12 pm »
Monkeh, Thanks for your help!


My mom said "It is better to light one candle than to curse the darkness."

Some here would say, "It is better to burn your old PC's than use a PCI card to light a single LED."

Give my poor PC's and Parallel Port PCI's some amnesty!
« Last Edit: May 01, 2015, 06:39:29 pm by SuzyC »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #44 on: May 01, 2015, 05:49:59 pm »
Thanks very much again, neslekkim, you have the good character to offer encouragement where others offer only criticism.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #45 on: May 01, 2015, 06:57:53 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernal twiddling with ports, then my machine is my kernal to ace!

In that case, you have to install an open-source operating system.
With windows, you don't (completely) own your pc. Microsoft is in charge about what you are allowed to do with it.
At least as long as you are running windows...

Are you saying Microsoft's Windows license prevents people directly accessing their printer ports?  i.e. DLPortIo, inpout32 etc. are actually illegal to use as they contravene the MS licence?  If not, then what point are you making?

No. Since win2000/XP, it's not possible anymore to access the hardware. Only when you write your one driver for which you
need a microsoft SDK.

With an opensource OS like Linux, you can easily access the LPT port. First blacklist the default parallel port/printer driver.
Then you can access the hardware directly (when you have root privilege). There are lots of programming examples on the
internet that demonstrate how to do that. Even writing a small kernel mode driver for Linux that does what you want is easy.
Not the hassle like windows.

 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #46 on: May 01, 2015, 07:35:59 pm »
first, there are no ports above 32536 (or whatevre 2^15 is ).
PCI is mapped in the linear memory space of protected mode. there is a hole created in the old 'port' scheme that gets remapped. When you write to the old port addresses the southbridge recreates the operation to the correct memory.

the old ports used IORD and IOWR in combination with the lower 15 address bits of the databus of the 8086 cpu.
anything that uses a bridge no longer has iord and IOWR signals. that memory space is gone and virtualized in the southbridge.

the southbridges have a reduced pincount isa interface where data is streamed. that is how they implement legacy crap like serial ports , printerports etc.

SO : PCI is not mapped in Io space but in main memory space.
Cards are mapped on the fly. so you cannot use hardcoded addresses. what is valid in your computer isnot valid in another machine. During boot the PCI map is built and a list is created telling you what card sits at what address. your driver interoperates with the Os and gets a handle. all operations are based on this handle + offset.
It is all dynamic. you tell the os ; i need this board ( VID and PID ) and the Os tells you : here is the base address. go ahead.

this stuff is all obsolete. modern machines don;t even have PCi slots anymore. only PCIx ports.


Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #47 on: May 01, 2015, 07:47:34 pm »
this stuff is all obsolete. modern machines don;t even have PCi slots anymore. only PCIx ports.

I believe you mean PCIe or PCI Express.  PCIX is another obsolete interface, like AGP.
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #48 on: May 01, 2015, 08:42:34 pm »
Windows 7 Ultimate 64 bit, Xeon W3520, X58, 6 GB RAM
PCI Express parallel port card with Oxford chipset
WinIO driver from www.internals.com (thanks Monkeh!)

Visual BASIC .NET code
Code: [Select]

Imports System.Runtime.InteropServices
Imports System.Threading


Module Module1

    <DllImport("WinIo64.dll")> Public Function InitializeWinIo() As Boolean
    End Function

    <DllImport("WinIo64.dll")> Public Function ShutdownWinIo() As Boolean
    End Function

    <DllImport("WinIo64.dll")> Public Function GetPortVal(ByVal PortAddr As UInt16, ByRef pPortVal As UInt32, ByVal Size As UInt16) As Boolean
    End Function

    <DllImport("WinIo64.dll")> Public Function SetPortVal(ByVal PortAddr As UInt16, ByVal pPortVal As UInt32, ByVal Size As UInt16) As Boolean
    End Function

    Sub Main()

        InitializeWinIo()

        Const port As UInt32 = &HD880

        Dim leds As Byte() = {&H1, &H2, &H4, &H8, &H10, &H20, &H40, &H80, &H40, &H20, &H10, &H8, &H4, &H2}

        Do

            For Each x In leds

                SetPortVal(port, x, 1)

                Console.WriteLine("{0:X4} = {1:X2}", port, x)

                Thread.Sleep(200)

            Next

        Loop While Not Console.KeyAvailable

        Console.ReadKey()

        ShutdownWinIo()

    End Sub

End Module


 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11535
  • Country: my
  • reassessing directives...
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #49 on: May 02, 2015, 01:56:46 am »
4 pages.... let me clear some bit up about Windows and Modern OSes (including Linux perharps)... its not that they dont let you access to your hardware.... its just they dont let you access to your hardware DIRECTLY as you please, you want the access? you can! but you have to be IN QUEUE, thats the way. there is RATIONALE to this... modern OS is like a very busy traffic policeman in the middle of 100 junctions, every junctions we have cars or motorists that request (IRQ) to pass the junction to the other side (USER), among the motorists are internet data, wifi bluetooth printer mouse keyboard, mcu embedded that is connected to LPT, plethora of conected usb devices etc. this trafficman need to manage all of them to avoid clashing. now how the OS designer do this with ease, managable and in a safe and modern way? they built layers, one on top rely on the other one below, one on the topmost cannot access directly to the bottommost, they have to pass the one directly below it, they are encapsulated in their own right. the topmost layer is who? you! the user. roughly speaking the layers are:

1) kernel the OS (this is the layer that access the hardware directly, handle the irq, manage and queue them)
2) driver (kernel will pass, or the driver will fetch in from kernel about the request, get the necessary data from the hardware, perharp through the assigned pointer handle given by the kernel)
3) api (the request, info or data will further be requested by api, this is where most of us have access to)
4) app (this is what we build)
5) user

i maybe wrong in some details or order, but i'm certain there are layers that you cannot simply poke as you please without going through the top layers. you ask why i cant? because the OS will not let you, why? i have the right! right? yes you have the right but you dont have the clue. as proven many times before, directly access to hardware or memory can impose a security and safety threat. hackers may poke in, ill user/programmers may hog or screw another app on the same or another thread, it may render OS disfunctional, or even burn something. so they wont let you, for you own sakeness.

mourning about this OS do not let you this or that, license or legal bullshit this or that is like accusing the OS is a religious pius, where its nothing more than they simply want to impose some safe science behind it. now you want to get through? to access your hardware? you have to follow the R&R, ie follow the layers, and that is what you are looking for, thats what you need to find in google or elsewhere if you want to play P&P or modern OSes. mourning will not help.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #50 on: May 02, 2015, 05:20:31 pm »
Updated code with run time DLL load & link
Now checks for error return from WinIo driver
Builds as 32 or 64 bit (either will run on 64 bit)
Visual Studio 2013 Community Edition

Code: [Select]
Imports System.Runtime.InteropServices
Imports System.Threading

Module Module1

    <DllImport("kernel32.dll")> Public Function LoadLibrary(ByVal name As String) As IntPtr
    End Function

    <DllImport("kernel32.dll")> Public Function FreeLibrary(ByVal handle As IntPtr) As Boolean
    End Function

    <DllImport("kernel32.dll")> Public Function GetProcAddress(ByVal handle As IntPtr, ByVal name As String) As IntPtr
    End Function

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Function InitializeWinIoType() As Boolean

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Sub ShutdownWinIoType()

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Function GetPortValType(ByVal PortAddr As UInt16, ByRef pPortVal As UInt32, ByVal Size As Byte) As Boolean

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Function SetPortValType(ByVal PortAddr As UInt16, ByVal pPortVal As UInt32, ByVal Size As Byte) As Boolean

    Sub Main()

        Console.WriteLine("{0} bit", IntPtr.Size * 8)
        Dim winio As IntPtr
        If IntPtr.Size = 4 Then
            winio = LoadLibrary("WinIo32.dll")
        ElseIf IntPtr.Size = 8 Then
            winio = LoadLibrary("WinIo64.dll")
        Else
            Console.WriteLine("Unsupported system")
            Exit Sub
        End If

        Console.WriteLine("WinIo DLL Module Handle: {0:X}", winio)
        If winio = IntPtr.Zero Then
            Console.WriteLine("WinIo library could not be loaded")
            Exit Sub
        End If

        Dim fp As IntPtr
        fp = GetProcAddress(winio, "InitializeWinIo")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of InitializeWinIo")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim InitializeWinIo As InitializeWinIoType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(InitializeWinIoType)), InitializeWinIoType)

        fp = GetProcAddress(winio, "ShutdownWinIo")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of ShutdownWinIo")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim ShutdownWinIo As ShutdownWinIoType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(ShutdownWinIoType)), ShutdownWinIoType)

        fp = GetProcAddress(winio, "GetPortVal")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of GetPortVal")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim GetPortVal As GetPortValType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(GetPortValType)), GetPortValType)

        fp = GetProcAddress(winio, "SetPortVal")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of SetPortVal")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim SetPortVal As SetPortValType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(SetPortValType)), SetPortValType)

        If Not InitializeWinIo() Then
            Console.WriteLine("Error initializing WinIo driver")
            FreeLibrary(winio)
            Exit Sub
        End If

        Const port As UInt32 = &HD880

        Dim leds As Byte() = {&H1, &H2, &H4, &H8, &H10, &H20, &H40, &H80, &H40, &H20, &H10, &H8, &H4, &H2}

        Do

            For Each x In leds

                Console.WriteLine("{0:X4} = {1:X2}", port, x)

                If Not SetPortVal(port, x, 1) Then
                    Console.WriteLine("Error setting port value")
                    Exit Do
                End If

                Thread.Sleep(100)

            Next

        Loop While Not Console.KeyAvailable

        Console.ReadKey()

        ShutdownWinIo()

        FreeLibrary(winio)

    End Sub

End Module
« Last Edit: May 03, 2015, 12:29:21 am by oPossum »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #51 on: May 02, 2015, 08:58:06 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernel twiddling with ports, then my machine is my kernel to ace!

Um, well, certainly nobody is preventing you from doing so. However, you have to use the APIs that are provided by the OS of your choice for the purpose. That's all what I have to say to this.

 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4067
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #52 on: May 02, 2015, 09:11:33 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernel twiddling with ports, then my machine is my kernel to ace!

Um, well, certainly nobody is preventing you from doing so. However, you have to use the APIs that are provided by the OS of your choice for the purpose. That's all what I have to say to this.
Then please run bare-metal code on your machine. Adding an operating system to your machine requires you follow the design rules of the particular operating system.
In case of Windows 8+, it requires you to write a 64 bit WHQL signed driver to access IO in a non-standard way. The driver sdk is free iirc.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: Why does Nobody Know Notthing About PC PCI Parallel Cards???
« Reply #53 on: May 02, 2015, 09:16:10 pm »
Thanks Janoc.. but that is the whole point. it is my machine, I bought it, I own it, I am a programmer and electronics nerd, if I want to ace the kernel twiddling with ports, then my machine is my kernel to ace!

Um, well, certainly nobody is preventing you from doing so. However, you have to use the APIs that are provided by the OS of your choice for the purpose. That's all what I have to say to this.

nobody is preventing you form doing it. just tell the operating system what you want to do and what hardware you want to access, and it will let you, but you have to do it using the mechanisms designed for that purpose. in this case : write a kernel mode driver.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #54 on: May 02, 2015, 11:06:27 pm »
Dear Software Gurus,

Thanks oPossum, congratulations!

I have compiled with VS2010 in C# target X86 and ran the Winio.zip sample program called DumpPort on my target PC with my  2-port PCI Parallel Port card with no luck.

The Winio .dll and .sys file were put in the same folder as the .exe file on my desktop. I also put the Winio32.dll in the Windows\System32 folder. The XP Device Manager shows that the card is working normally and has added LPT2 and LPT3 to my XP X86 SP3 platform.

The program runs without any errors, but I what I see is no change looking at the Parallel Ports, namely base address of &HDFE0, &HDFE1 or &HDFE2 of the Parallel Port connector when the logic levels are manually changed with the help of shorting wires at the connector pins. These are the ports shown in the Device Manager for the PCI card installed on my X86 32-bit XP platform: 0xDFE0-DFE7 and DF98-DF9F (first PCI parallel port shown as LPT2)
(second parallel PCI port on this card shown as LPT3 has also two different port ranges: 0xDF90-DF97 and DF80-DF8F)

Why do PCI Parallel Port cards like mine have two sets of port ranges for each of the ports?
Perhaps, I am using DumpPort to examine the wrong port addresses?

Could it be that only some PCI Parallel Port cards will work?

Has anyone else had any luck with other chipsets used on other PCI Parallel Port cards?

And thanks free_electron and Jeroen3, but special thanks for the original Winio coder and oPossum for actually getting something to work!

..Still Portless in Seattle
« Last Edit: May 02, 2015, 11:47:14 pm by SuzyC »
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #55 on: May 03, 2015, 12:57:24 am »
Are you able to write to the port and see the data outputs change?

Here is a VB.NET program that will display the status, control, and data registers continuously. Be sure to edit it for the base address of your parallel card.
The status inputs have pullup resistors, so shorting one of them to ground should show a change.
Some ports will do the same with the control lines.
Note that some signals are inverted so they show 0 when pulled high, and will change to 1 when grounded.

Should look like the attached screen capture when idle.

Code: [Select]
Option Strict On
Imports System.Runtime.InteropServices
Imports System.Threading

Module Module1
    <DllImport("kernel32.dll")> Public Function LoadLibrary(ByVal name As String) As IntPtr
    End Function

    <DllImport("kernel32.dll")> Public Function FreeLibrary(ByVal handle As IntPtr) As Boolean
    End Function

    <DllImport("kernel32.dll")> Public Function GetProcAddress(ByVal handle As IntPtr, ByVal name As String) As IntPtr
    End Function

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Function InitializeWinIoType() As Boolean

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Sub ShutdownWinIoType()

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Function GetPortValType(ByVal PortAddr As UInt16, ByRef pPortVal As UInt32, ByVal Size As Byte) As Boolean

    <UnmanagedFunctionPointer(CallingConvention.StdCall)>
    Delegate Function SetPortValType(ByVal PortAddr As UInt16, ByVal pPortVal As UInt32, ByVal Size As Byte) As Boolean

    Sub Main()

        Console.WriteLine("{0} bit", IntPtr.Size * 8)
        Dim winio As IntPtr
        If IntPtr.Size = 4 Then
            winio = LoadLibrary("WinIo32.dll")
        ElseIf IntPtr.Size = 8 Then
            winio = LoadLibrary("WinIo64.dll")
        Else
            Console.WriteLine("Unsupported system")
            Exit Sub
        End If

        Console.WriteLine("WinIo DLL Module Handle: {0:X}", winio)
        If winio = IntPtr.Zero Then
            Console.WriteLine("WinIo library could not be loaded")
            Exit Sub
        End If

        Dim fp As IntPtr
        fp = GetProcAddress(winio, "InitializeWinIo")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of InitializeWinIo")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim InitializeWinIo As InitializeWinIoType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(InitializeWinIoType)), InitializeWinIoType)

        fp = GetProcAddress(winio, "ShutdownWinIo")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of ShutdownWinIo")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim ShutdownWinIo As ShutdownWinIoType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(ShutdownWinIoType)), ShutdownWinIoType)

        fp = GetProcAddress(winio, "GetPortVal")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of GetPortVal")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim GetPortVal As GetPortValType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(GetPortValType)), GetPortValType)

        fp = GetProcAddress(winio, "SetPortVal")
        If fp = IntPtr.Zero Then
            Console.WriteLine("Could not get address of SetPortVal")
            FreeLibrary(winio)
            Exit Sub
        End If
        Dim SetPortVal As SetPortValType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(SetPortValType)), SetPortValType)

        If Not InitializeWinIo() Then
            Console.WriteLine("Error initializing WinIo driver")
            FreeLibrary(winio)
            Exit Sub
        End If

        Const port_base As UInt32 = &HD880
        Const data_port As UInt32 = port_base + 0
        Const status_port As UInt32 = port_base + 1
        Const control_port As UInt32 = port_base + 2

        SetPortVal(control_port, &H4, 1)

        Console.Clear()
        Console.SetCursorPosition(0, 0)
        Console.WriteLine("S7 S6 S5 S4 S3  C3 C2 C1 C0  D7 D6 D5 D4 D3 D2 D1 D0   Register Bits")
        Console.WriteLine("11 10 12 13 15  17 16 14  1   9  8  7  6  5  4  3  2   DB25 Pins")

        Do

            Dim status As UInt32
            Dim control As UInt32
            Dim data As UInt32

            GetPortVal(status_port, status, 1)
            GetPortVal(control_port, control, 1)
            GetPortVal(data_port, data, 1)

            Console.SetCursorPosition(0, 2)

            Console.WriteLine(" {0}  {1}  {2}  {3}  {4}   {5}  {6}  {7}  {8}   {9}  {10}  {11}  {12}  {13}  {14}  {15}  {16}", _
                              (status >> 7) And 1, _
                              (status >> 6) And 1, _
                              (status >> 5) And 1, _
                              (status >> 4) And 1, _
                              (status >> 3) And 1, _
                              (control >> 3) And 1, _
                              (control >> 2) And 1, _
                              (control >> 1) And 1, _
                              control And 1, _
                              (data >> 7) And 1, _
                              (data >> 6) And 1, _
                              (data >> 5) And 1, _
                              (data >> 4) And 1, _
                              (data >> 3) And 1, _
                              (data >> 2) And 1, _
                              (data >> 1) And 1, _
                              data And 1)

            Thread.Sleep(20)

        Loop While Not Console.KeyAvailable

        Console.ReadKey()

        ShutdownWinIo()

        FreeLibrary(winio)

    End Sub

End Module
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #56 on: May 03, 2015, 01:53:07 am »
GigaThanx, oPossum, it works!

I discovered two problems with my PCI card:

Firstly, the old parallel cable had all the parallel pinout spec'd ground pins connected together at the Centronics connector end end, but they did not connect to a I/O ground point of the PCI card, only the shield wire of the DB25 wired cable was connected to ground. Connecting these two grounds together allowed me to view and change logic levels on the ports.

Secondly, I presumed that the PC's back panel DB25F of this 2-ported PCI Parallel Port Adapter was LPT2..it was in fact, LPT3 and when I changed logic levels at the connector and then input from the corrected ports, (base address 0xDF90)..everything works!
It turns out the interior bed-of-nails male connector located on the PCI PCB is used for LPT2.

Thirdly, using inpout32.dll, I attempted to debug the program and access port addresses that were used by the target PCI card which was not installed on the desktop with the VB6 or VS@010 compilers, and so I got a VB6 IDE crash, but the compiled .exe program worked fine on the target PC.

I also got my VB6 version of this access idea working using Inpout32.dll, X86 only and it also lacks the excellent error X86/X64 checking and .dll operation diagnostics and Win7 compatibility..oPossum, you did some excellent work!
« Last Edit: May 03, 2015, 02:49:20 am by SuzyC »
 

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 792
Re: Why does Nobody Know Nothing About PC PCI Parallel Cards???
« Reply #57 on: May 03, 2015, 02:36:18 am »
Thanks Mechatrommer, your explanation was most helpful to understand the importance of programs having a few manners when playing with Windows private ports.

Thanks again to all that posted, and to Suicidaleggroll and Jeroen3 and Janoc.

"Thanks free-electron..you say correctly, I assume, that, "SO : PCI is not mapped in Io space but in main memory space."

but WiNDOWS assigns the PCI Parallel Ports, so they seem to be ports, functionally identical to legacy ports, but these 0xDFxx ports do exist! (if only emulated?)
« Last Edit: May 03, 2015, 02:50:51 am by SuzyC »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf