Read Parallel Port

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

Reply to
Sumedha Swamy
Loading thread data ...

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.

Reply to
pbdelete

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.

formatting link

formatting link

-- Joe Legris

Reply to
J.A. Legris

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.