"Read" parallel port data with arduino?

We have a piece of proprietary hardware/software that is no longer supported. I need to figure out the communication back and forth between the PC and the hardware. From what I can tell this hardware is not using any standard parallel protocol. The data/strobe lines appear to be standard, but nothing else does. I have used an oscilloscope on the data lines and found that the PC sends packets of data on every refresh (from proprietary software). Each pulse in the packet is roughly 10 microseconds. The problem is I can not seem to make sense of the data packets on 8 lines at once using an oscilliscope. Ive tried a parallel port monitor but they don't update fast enough. I'm really not sure if the arduino is the best tool for the job here but I have several sitting around and if not maybe someone can point me in the right direction.

So my question is can i "read" in these bytes of data (1 bit per line) in sync with the strobe line and show them on the serial monitor or datalog to an sd card? (I have 8 inputs and only 2 interrupt pins, will i miss data?). Can i use an external IC to make this possible?

Also, im fresh out of college, and parallel ports are no longer taught, so if someone wants to school me on low level parallel communication I wont be offended :slight_smile:

Get thee a logic analyzer.

Conceptually there is nothing complicated about a parallel port. Data gets put on the port. The Strobe changes state to indicate data is ready and then the process repeats.

A mega would be better to get you more input lines.

You can probably use a parallel in - serial out shift register, like 74HC165, as explained here:
http://playground.arduino.cc/Code/ShiftRegSN74HC165N

Please tell us what the existing system does.

If, for example, it involves sending a lot of data at high speed you may have a problem capturing enough of it on an Arduino.

If the speed is not too high the Arduino could send the data onwards to a PC.

...R

10uS is pretty quick, 100,000 samples/sec.
You can use the strobe line as an interrupt.
On each interrupt, capture the data on a port, port D for example:

dataArray[x] = PIND;
x=x+1;

Store as much as you can - with Atmega1284P, that could be nearly 16K bytes, then send to the PC when your buffer is full. (2K on an Uno, 8K on a Mega - limited by the SRAM needed for the program - experiment.
You could try sending each byte to the PC as it comes in, use a datarate of 115200, but there is very little margin as the interrupt handling will take 4-5-6-7uS or so.

If you want more parallel port info, check below. I've still got some old parallel port cams.

http://janaxelson.com/parprtib.htm

dustin02rsx:
We have a piece of proprietary hardware/software that is no longer supported. I need to figure out the communication back and forth between the PC and the hardware. From what I can tell this hardware is not using any standard parallel protocol. The data/strobe lines appear to be standard, but nothing else does. I have used an oscilloscope on the data lines and found that the PC sends packets of data on every refresh (from proprietary software). Each pulse in the packet is roughly 10 microseconds. The problem is I can not seem to make sense of the data packets on 8 lines at once using an oscilliscope. Ive tried a parallel port monitor but they don't update fast enough. I'm really not sure if the arduino is the best tool for the job here but I have several sitting around and if not maybe someone can point me in the right direction.

So my question is can i "read" in these bytes of data (1 bit per line) in sync with the strobe line and show them on the serial monitor or datalog to an sd card? (I have 8 inputs and only 2 interrupt pins, will i miss data?). Can i use an external IC to make this possible?

Also, im fresh out of college, and parallel ports are no longer taught, so if someone wants to school me on low level parallel communication I wont be offended :slight_smile:

If I were wanting to send "proprietary" data from a PC parallel port, I would simply write the 8 bits then toggle a strobe line.

On the Arduino side, I would connect the 8 parallel lines to one port (prefer to use a MEGA2560 R3 because it has a lot more ports) and then connect the strobe line to one of the Arduino inputs associated with an interrupt, then finally write a small ISR to read the parallel data upon each interrupt received.

So all you need to do is find if a parallel line is being used as a strobe (that is, one "up" or "down" pulse per data byte), then connect it all and write the Arduino code.

Is this enough help, or do you need more detail?