Solved

LPT access on pins In/Out for real-time measurements on a PCI card

Posted on 2007-03-23
6
1,035 Views
Last Modified: 2011-10-03
I bought a new computer with windows XP-SP2 on it where is everything on it USB's,firewire, and ethernet connections ... but the standard port LPT was absent, i didn't pay attention on it, i bought a PCI card to put in a slot with onte LPT and 2 COM's, now i have the same problem as others to access on pins in/out as i could before until i used windows 98 and the Borland compiler wit hthe instructions inportb/outportb .The problem with PCI cards is that there is  an indirect address to LPT's and specila initialisation as i understoud

Somebody knows how to initialize such type of card? and how to access at the pins .. i need to make some measures real-time on them ... and what was possible before easily, becomes very hard to do now
Somebody had the ame problem and could solve it?

I use CBuilder6  ( i have the precedent versions in case impossible with that one and the normal C++ compilre 4.5 or 5 form borland wher the instructions in/out and inportb/outportb where present )
I saw by case one time on net .. but sad i don't remember where that linking some file from the old compiler, a file *.obj gives the access on the instruction that where deleted on the CBuiler versions, true or not?

Sorry for my english if many mistakes ....  if somebody can help would be happy ... that could be just knowing if somebody sales a driver that gives that access on a LPT trough a PCI card .. any solution welcome, not necessarely writing directly code for it
0
Comment
Question by:BorlandUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 22

Accepted Solution

by:
grg99 earned 63 total points
ID: 18781247
The main problem is Xp doesnt provide direct access to the LPT port from protected-mode programs.

It does from 16-bit segmented programs.  You'll need to load up some ancient C like Borland C 5.5 (free download).  That will generate real-mode 16-bit programs which the DOS window will emulate the LPT port accesses.

-------------

Or alternatively there are port drivers like "PortIo" which provide raw port io through a kernel-mode driver.  That will work in protect mode C.

    Google for it.  



Hope this helps.



0
 
LVL 4

Assisted Solution

by:MacroLand
MacroLand earned 62 total points
ID: 18785720
0
 

Author Comment

by:BorlandUser
ID: 19216314
thanks for your answers, but as i told you i don't have on my new computer a direct interface on the LPT that i could wite or read in it like at the address 378H, IoPort works only on that , with an intefacce LPT : (and 2 serail COM., not used for the moment but same problem ) the real address i know in my case is 0x0000CC10 wich can be normally read read on the address 0x00000408 in the computer, reading that position that gives the base address of the  LPT. wich is 0x0000CC10, ic ould see that with a program (evaluation, expired now ... ) wich cost a lot and would not spend 3-600$ just to use that program to read a base address on that memory position ... on the CBUILEDR6 i introduced some assemble lines in  a procedure to read that position givig me the terturn address of the LPT .... and seems to work because the procedure tries to do it really ..
Inow tha tbecause i have an error message of Windows saying:  memory access violation at address 0x00000408 wich is right ....
Possible to put the prcessor . od somthing to put it in supervisor mode - to have access to all?
I show you the listing of my procedure if interested .. but that is for nothing if i don't solev the problem of access protection now ...
0
 
LVL 6

Expert Comment

by:SeanDurkin
ID: 21436120
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
  Split: grg99 {http:#18781247} & MacroLand {http:#18785720}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Sean
EE Cleanup Volunteer
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question