0

I have been asked to create a connection that would send data from a device to computer via DB9 connector. There it will be processed by our application. The same data should also be sent to a printer using LPT (DB25). I have been looking around using google to find a suitable cable or program (multiplexer) that could split the streams, but so far no luck.

I was thinking that maybe a custom made cable could do the trick and came with following connection (cant post images to make it easier due to reputation):

DEVICE-DB9(F)-------PC-DB9(F)

               |
               |---PRINTER-DB25(M)

Do you think that this connection would work?

Does anyone here have some experience with following problem/solution?

user
  • 30,336

2 Answers2

2

DB9 (actually, DE-9) is normally used for serial connections. DB25 (DE25) can be used for either serial or parallel data transmission. I don't think I've ever seen a nine-pin connector used for eight-bit parallel data transmission; there just aren't enough pins to make it work reliably!

You cannot simply "split" a serial signal into a parallel line.

So the simple answer is, no, it won't work. I suppose it could be made to work by using something that buffers up serial data and pushes it out along a parallel path, but I haven't ever seen anything like that readily available.

To be clear: as stated in the title (split a DB9 into a DB9 and a DB25 both receiving the same data) is doable; modem connection cables did exactly that back in the day because both variants of serial ports were found in the wild (and I might even still have a cable like that collecting dust in the attic), though they generally left the extra pins on the 25-pin connector unconnected or possibly connected to ground. Splitting a serial to a serial and a parallel is a very different problem, and much more difficult to solve.

user
  • 30,336
1

On all PCs, any "DB9" connector is going to be connected to a UART, which speaks RS-232.

Any DB25 that is an LPT/printer port will not be connected to a UART - the pins directly change bits in I/O ports - the devices on both sides are responsible for implementing any protocol.

So why would you want to send RS-232 serial data to a printer expecting LPT? That's why there is no such cable.

Now, you will find some cables that have DB25 on one end and DB9 on the other. This is because there is such a thing as DB25 serial ports, but they are wired to match the right pins on the DB9 side. Some 56k modems have DB25 ports on their end, and you can use such a cable to connect it to a PC DB9 serial port (or use a DB25-to-DB25 serial cable and connect it to a PC DB25 serial port, this wasn't unheard of on older PCs).

Additionally, I think the gender is reversed with respect to LPT ports (printer DB25 ports are female, serial DB25 ports are male) and the voltages may not be the same (RS-232 is 12 volts, not sure what the LPT port is)

(Also, technical correction here: the old EGA and CGA connectors on ancient PCs were also DB9 but they were female sockets, not male sockets like the serial port.)

LawrenceC
  • 75,182