Author Topic: Why does Nobody Know Nothing About PC PCI Parallel Cards???  (Read 15637 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: 3070
  • 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: 6722
  • 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: 6722
  • 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 »
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7390
  • 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: 6722
  • 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: 8275
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: 11747
  • 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: 3785
  • 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: 16284
  • 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 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf