Ports
May 19, 2013, 02:44:17 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Welcome to the PORTS Forum. Please post your questions, answers, and comments relating to USB and other hardware interfaces in the appropriate forums below. - Jan
Pages: [1]
  Print  
Author Topic: miniPCIe Parallel Port - Direct access to Databits  (Read 2224 times)
Chris_Muench
Member
*
Posts: 1


« on: May 02, 2012, 08:37:53 pm »

I am working on a project that requires to set some GPIO bits under Windows 7 64Bit. The PC I am using has only a miniPCI Express Slot (Zotac Atom board).
The closest I came to a solution was to use a Oxford Chipset based MiniPCIe card, but it does not have the "normal" 0x378 LPT1 port definitions (something above 0xC000).
 
Is there any way to program a miniPCIe card with direct realtime bits like it could be done on older OSes with the standard LTP cards?

I am using the inpoutx64.dll and can access any port address just fine. But using it against the 0xC010 port range of the MiniPCIe card does not do anything. (including setting control bit 5 on control port "0xC012 (base +2)" to zero)

Thanks
Chris
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1625


WWW
« Reply #1 on: May 03, 2012, 10:36:09 am »

In Windows Device Manager, you could try fiddling with the port address and the options in Port Settings.

Jan
Logged
bb
Member
*
Posts: 3


« Reply #2 on: May 24, 2012, 07:48:31 am »

Hi,

I am having exactly the same problem with exactly the same PCIe/parallel card but with XP 32.
The card is correctly installed and is assigned to LPT3 port with D012 adress.
A footswitch is connected to the parallel port. I would like to read parallel port to know if the footswitch is activated. I am programming with visual c++.
After Input32.dll I also tried dlportIO.dll and the File manager (CreateFile, ReadFile...) of windows API without success.
Do you have any idea if it is still possible to use these tools with an adaptator card?

Thanks for your help.
 

Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1625


WWW
« Reply #3 on: May 24, 2012, 08:47:11 am »

See this discussion:

http://www.lvr.com/forum/index.php?topic=578.0

Jan
Logged
bb
Member
*
Posts: 3


« Reply #4 on: May 24, 2012, 10:05:16 am »

Thank you for your reply.
I have already seen the discussion you pointed.
I used Input32.dll and DlportIO.dll on an onboard parallel port and it worked well. But when I am using the same application on the PCIe/parallel (after changing address etc.) it failed.
I was thinking it was because these dll assume that you can send data directly to the parallel port pins so they "jump" the xp kernel/user protection. But with the PCIe/parallel adaptator i can't have a direct access to the parallel port pins.
So I try using windows API (CreateFile...) without success.
Before trying desperately to make it works I would like to be sure it is possible.
Do you know any code sample that access on board parallel port with win API? because i do not find anything so i conclude that if it doesn't work with on board parallel port it will not work with my parallel card. What do you think?

Many thanks
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1625


WWW
« Reply #5 on: May 24, 2012, 08:41:23 pm »

What error do you get with CreateFile?

Jan
Logged
bb
Member
*
Posts: 3


« Reply #6 on: May 25, 2012, 03:53:46 am »

I don't have error using CreateFile. But I can't read with ReadFile.
I had a reply on msdn forum http://social.msdn.microsoft.com/Forums/fr-FR/vcgeneral/thread/d19392c9-69f2-417d-a137-0a3e0d57751b that tell me that ReadFile is not supported for LPT port. So I give up using windows API.
I give a last try using CParallelPort class from http://www.naughter.com/parallelport.html and if I can't communicate with my PCI/parallel card I would have to find another way to acquire the footswitch signal.
I will let you know the results.
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1625


WWW
« Reply #7 on: May 25, 2012, 10:00:24 am »

ReadFile might work. You'll need to disable the data outputs by setting control port pin 5 = 1 and set the Status inputs to show printer selected, paper available, no error, not busy. For pin functions, see:

http://www.lvr.com/files/ibmlpt.txt

Jan
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!