Read Parallel Port

S

Sumedha Swamy

Jan 1, 1970
0
Hi,
I'm trying to make a system to capture digital data continuously coming
from a device that I own. There are 3 outputs that I could map to 3
pins of the parallel port..One of the pins is the clock. Refer the
diagram below :

|--- Clock
--//--- |--- Data Out 1
|--- Data Out 2

Figure 1 : Pins of the Parallel Port that I would like to capture data
from.

How do I capture the data onto my PC at every positive edge of the
clock input ?

Thanks,
Sumedha
 
Sumedha Swamy said:
Hi,
I'm trying to make a system to capture digital data continuously coming
from a device that I own. There are 3 outputs that I could map to 3
pins of the parallel port..One of the pins is the clock. Refer the
diagram below :
|--- Clock
--//--- |--- Data Out 1
|--- Data Out 2
Figure 1 : Pins of the Parallel Port that I would like to capture data
from.
How do I capture the data onto my PC at every positive edge of the
clock input ?

Depend on how fast your data is coming in. And what budget you have.

Other than that it's in essence just to read 0x379 (asfair) ie the parallell
port status register.

You might use the strobe pin to accomplish an irq for every clock. Or maybe
some other enchanced mode to speed up things.

Also don't forgett this port is 5V.
 
J

J.A. Legris

Jan 1, 1970
0
Sumedha said:
Hi,
I'm trying to make a system to capture digital data continuously coming
from a device that I own. There are 3 outputs that I could map to 3
pins of the parallel port..One of the pins is the clock. Refer the
diagram below :

|--- Clock
--//--- |--- Data Out 1
|--- Data Out 2

Figure 1 : Pins of the Parallel Port that I would like to capture data
from.

How do I capture the data onto my PC at every positive edge of the
clock input ?

Thanks,
Sumedha

The simplest way is to read the port repeatedly until the clock state
changes and then read in the data. The problem is, of course, that
unless you can predict roughly when the clock pulses are going to
arrive, your program will spend 99.999% of it's time waiting for clock
pulses. The preferred solution is to use interrupts. The following
links will get you started.

http://et.nmsu.edu/~etti/fall96/computer/printer/printer.html

http://www.lvr.com/parport.htm
 
Top