input to PC parallel port

Oct 10, 2006 9 Replies

Hi, I've been trying to read a signal by a parallel port. The signal is the output of a comparator LM339, by a 21k resistor connected to 30V, and then 10k connected to ground. The problem is - whenever I connect the parallel port - the signal dies (0V read). What am i doing wrong? What should I check? Can anyone refer me to an example circuit where data is read by a parallel port? Thanks!



Not knowing the details. Here is my guess: You are comparing against a 10V signal (21K,10K divider). So, your LM339 is at least 10V VCC, and the output is almost 10V.

Check if you parallel port is still working (not smoking).

I tried it with a 5k-25k voltage divider as well - no good. And it's not smoking... How do I check whether the comparator is "strong" enough to raise the pin to '1'?

Try it without the comparator, by connecting the pin to +5V and ground and checking that you can read the values with your software. Then check that the comparator is working by testing the output with a DVM or scope.

Leon

Without the comparator (Directly from a power source ) it reads ok, although only from about 7V. I was thinking maybe the 20k and 10k resistors are too large. could this be a reason? Thanks

"yoavshe" schreef in bericht news: snipped-for-privacy@e3g2000cwe.googlegroups.com...

l>

\\I tried it with a 5k-25k voltage divider as well - no good. And it's \\not smoking... \\How do I check whether the comparator is "strong" enough to raise the \\pin to '1'?

If you tried to push 10V onto a parallelport pin it might as well been blown. What pin did you use anyway? What mode is the parallel port suppose to work in? For a comprehensive treatment of PC ports see:

formatting link

Fisrt, you should select in your bios setup SPP for the printer port. thats short for Standard Parallel Port. That ensures that the outputs and inputs behave like standard TTL . Then if you want some software and info to horse around with, get laplink.zip at

formatting link
Source code included. That software uses a cable between printerports, to send /receive computer files.

The LM339 is opencollector and requires a pull up resistor to +5 volts.

+5------2K resistor ------output of LM339 and input pin to port.

Dave

A simple setup below.

formatting link

Looks like you have a problem with that input. It should respond to TTL levels.

Leon

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required