954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

parallel port interfacing with switch input

Hi to all viewers and members! can anybody help me or gave me any idea about parallel port interfacing that accepts input from a switch instead of keyboard and that input will be displayed in a seven segment.just a sample c program that has an input(inport) and ouput(outport) through the parallel port. Thanks more power to this site!!

loimarie
Newbie Poster
14 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

Don't expect a lot of help from lvr on dot net subjects.
I got vb.net 2003. I've looked for over 2 years for code to turn on/off the individual pins of the paralle port. Nobody including lvr has ever helped. There is a program on lvr that checks the port, that's all it does. Nobody on Daniweb has either. Yes, I have the dll already, from logix4u.net. Anything but the code is just somebody trying to sound like they know all the answers.

GaryR

GaryR
Newbie Poster
16 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

The Windows operating system makes it more difficult than it should be. If I needed to use the parallel port, I'd look into Matlab, or maybe Python.

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

See what I mean. :-) And no info/code as to how to do it in thoes either. Gota love 'em. Two years of this bs. It's getting old fast.

GaryR

GaryR
Newbie Poster
16 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Hi loimarie,

Did you make progress with your project.

Several hundred years ago I used a pico product called an ADC10. pico provided a 'driver' which was just some C that read the parallel port.

Google picoscope and go to their 'software' section and download the free adc10 driver if you're interested.

Regards

DCL

dinosaurclover
Newbie Poster
4 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

See what I mean. :-) And no info/code as to how to do it in thoes either. Gota love 'em. Two years of this bs. It's getting old fast.

GaryR


I suggested Matlab, because it is what I would look into, I have it installed and I know it comes with libraries to use the PC ports. I didn't give any more info because everything is given in the help. If this isn't a good enough reason to suggest it, then I take it back.

Btw, the site that was linked offers a book written on the parallel port. Have you read it? You say you feel no one at Daniweb has helped you in two years. Then at what point might it have been a good idea to try another forum for help. Let me guess, you did and they couldn't help either. So I think I do see what you mean, it's everyone else's fault and not yours and the whole world is against you?

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

Good for you, I have vb.net2003 and c++.net. Why do I have to conform to your standard?

I have that book and read it ,clearly you didn't.

Yea , sure I'll google Matlab and see how much more money I have to spend.

For your information, I lost count at over 150 sites and forums.

People like you is why I hardly ever come to DaniWeb, and vary unlikely to come back.

Insert four letter woords here.

GaryR

Real damn nice place you got here Dani !!!

GaryR
Newbie Poster
16 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 
I have that book and read it ,clearly you didn't.


Yes, I haven't. You're the one that needs to use the port not me.

Anyway, out of the interest in that it could take someone two years of trying and not be able to access the parallel port, I found a free ebook called, "My Experience In Parallel Port Interfacing" by Bibin John. It explains that Userport is needed, to allow direct access to the ports under NT based OSes, making the old DOS functions inportb() and outportb() work. I then found a thread which apparently verifies this. http://www.roboticsindia.com/modules.php?name=Forums&file=viewtopic&p=6428

I also found this page which shows you how to write to the parallel port in Java using Userport and another dll called Parport. With sample code.
http://algoval.essex.ac.uk/cec2005/race/ParSoftware.html

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

Deep Sigh: It looks like you've put more than a little time in on this so I thank you. Take a look at inoup32.dll on logix4u.net. Inoutp32 uses a kernal mode driver. It does nearly the same thing as praport. I use this with the check port program on the lvr site. It works fine, however , it only checks the port and gives no clue as how to turn on/off individual pins.
I will look at that book and the page, though I expect I'll find yet another check port program.
I did check on matlab, I'm not that rich. Oh that were as easy as it is in old qbasic. Mostly I'm just trying to justify the vb.net2003, which so far has been a waste of money.

GaryR

GaryR
Newbie Poster
16 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

I got it working using Python under XP.

To do it, install Python.
Then get pyparallel-0.2.win32.exe and giveio_setup.exe
http://sourceforge.net/project/showfiles.php?group_id=46487

Use this code

import parallel
p = parallel.Parallel()
p.setData(0x55)

You can see it working with LPT http://neil.fraser.name/software/lpt/

Colin Mac
Posting Whiz
327 posts since Sep 2006
Reputation Points: 78
Solved Threads: 22
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You