Serial/COM question

This isn't arduino related, but if I asked this on a computer forum, I'd get a bunch of blank stares.

If I took a device running on COM/Serial, make a breakout board for the socket, had one computer be the "master" (gets all 9 pins), and one be a "slave computer" (only gets TX, RX, and ground), would it be possible to share that one device to the 2 computers with successful data transmission?

The device is a weather station, which has software on the computer. But for a special case, 2 computers need to be running that software for 1 device.

The only conflict I can come up with, is that if they sent signals asynchronously to the station, and got the asynchronous signals back, what if one computer's transmit overlapped the other's? They both need to be able to transmit, as the software 'pings' the device every so often.

Thanks. (and hopefully that made half sense)

You could share the receiving pin, not the transmitting one. During idle times they will all try to drive it to a 1.

In your situation I would make something like a "double adapter" with a Arduino where each computer goes to its own COM port, and the sketch takes data from whichever port is active and sends it on to the weather station. For stuff that comes back, it could receive data and forward it to both computers. You might be better off with a Mega which has multiple hardware serial ports.

The other approach would be to have something running on one computer that just forwards whatever it gets to the other (eg. via Ethernet).

[quote author=Nick Gammon link=topic=106987.msg802956#msg802956 date=1337748803] You could share the receiving pin, not the transmitting one. During idle times they will all try to drive it to a 1.

In your situation I would make something like a "double adapter" with a Arduino where each computer goes to its own COM port, and the sketch takes data from whichever port is active and sends it on to the weather station. For stuff that comes back, it could receive data and forward it to both computers. You might be better off with a Mega which has multiple hardware serial ports.

The other approach would be to have something running on one computer that just forwards whatever it gets to the other (eg. via Ethernet). [/quote]

OK.

I'd need a level shifter from +/- 24 volts to +/-5 volts for both sides, yes?

Yes, I wired one up the other day. The MAX232 will do that.

But for a special case, 2 computers need to be running that software for 1 device.

If both PC run that "special software" and it's a real dialog with commands and replies depending on the previous command, and both PC are active in parallel, you might run into a real hard task having your arduino play "man in the middle" for two serial lines to the PC and a third one to the weather station.

If simply listening to the returned weather data (eventually with your own PC program) is possible, that's certainly simpler. I understand RS 232 is voltage driven by the sender, so reading without handshake is easily duplicatable. (No arduino, just a Y cable with only the Rx and GND line on one branch might do it ?)