views:

419

answers:

1

We are trying to emulate a device that runs off a parallel port.

We have the exact same model that runs on RS232, and can run a null modem cable from one port to another and emulate the device with the following settings:

_port = new SerialPort
                {
                    PortName = comport,
                    BaudRate = 9600,
                    DataBits = 8,
                    Parity = Parity.None,
                    StopBits = StopBits.One,
                    DtrEnable = true,
                    RtsEnable = true,
                };

So to emulate the same device with a parallel port, we merely got a cable that runs from parallel to a RS-232 port. Although, we are not sure if it is the correct cable we need.

What are the System.IO.Ports.SerialPort settings that would allow the parallel device to work?

We have a serial port monitoring program and no data is coming through, this makes us think that our baud rate, stop bits, data bits, etc. are incorrect.

Does anyone know how parallel communication is translated to RS-232 on the other end?

Any suggestions? Is this even possible? We want to avoid having 2 parallel ports and using C# to communicate over parallel (it would be time consuming).

+1  A: 

You need more than just a cable, you need a converter. Here is one such device. I haven't used this model, but I've used other converters in the past successfully.

Jon B
We have converters that take DB9 pin to DB25 (that also do not work), you can see one on the bottom page you linked. So it is not working because the parallel port protocol is radically different than RS-232 and we need a device to translate that?
Jonathan.Peppers
Exactly - you need a device that "translates" serial to parallel. The device I linked to is one such device. If you look around on Black Box, they probably have a handful of options. Just make sure you're looking at a proper converter and not just an adapter for one pinout to another (which won't work).
Jon B
The "protocol" is quite different in the sense that parallel ports send data on eight pins (http://en.wikipedia.org/wiki/Parallel_port#Pinouts) while serial ports use just one pin per direction (http://en.wikipedia.org/wiki/RS-232#Pinouts). So the translator has to receive 8 serial bits, buffer them up, then send them onwards over 8 wires (and vice-versa). The DB25-DB9 cables you have are probably for connecting 25-pin serial ports to 9-pin serial ports (http://en.wikipedia.org/wiki/RS-232#Connectors).
mtrw