Read the instrument data from printer port directly with computer

communicationconnectormicrocontrollerparallel port

I could not find the step by step guide of some kind to accomplish what I am planning to do. I have two devices that I want to connect to PC (windows). Right now, both devices write their output through the printers attached to them. My goal is intercept the data sent to the printer and read the output through computer and remove the printer completely from both devices. On one of the device, the OEM seems to have used just some pins and removed others.

Can you please advise in a step-by-step manner the instructions I need to follow to transmit the data directly to the computer?

I have attached the images of the cable that is now going to printer.

I have some programming experience but this is the first time I am playing with serial and parallel port communication.

Input to pin-from instrument 1

enter image description here

Best Answer

Forget trying to read data from the parallel port. You can do it, but it's not built in to the PC. Instead, look at the serial port.

ETA - Sorry, but I was unclear. First, of course, new machines generally don't have a parallel port. Problem is, new machines don't have serial ports, either. Drat. You can get USB adapters for both. What I meant was that basic (not BASIC, although it applies) operation of serial ports is intrinsically bidirectional, so you can read data from a serial port without getting into advanced features. This is not, in general, true of parallel ports, although bidirectional data transfers have been available for a long time. It's just not as easily implemented with standard commands the way serial data is.

You'll notice that only 8 pins are used. That is a bog-standard pin use, and is very common. Now look at the back of your PC, and you should find a serial port connector, which has 9 pins. You can get a standard "DB25 to DB9 serial port adapter" which will allow you to connect to this 9-pin connector using a standard serial cable. Note also that, for many applications you only need 3 wires to do this. Google RS232. Actually, you can probably get away with 2 wires, since most printers don't talk back to the device that is commanding it.

Now that you've made physical connection, it's time for software. What language do you program in? Read the manual, dude. If it's C or BASIC, there are built-in commands that will let you do this very simply. Note, though, that you may well have to fiddle around (perhaps with an oscilloscope) to determine the bit rate and configure your PC serial port to the correct speed and other parameters. (If you just want to jump in, try 9600 baud, 1 stop, no start, no parity.) Again, read up on RS232 and serial communications.