Receiving data from multiple devices using parallel wired RS232

后端 未结 2 1002
闹比i
闹比i 2021-01-22 08:37

I\'m currently developing a small application for monitoring the power / current our solar collector is generating.

The array is connected to 3 inverters. Every inverter

2条回答
  •  迷失自我
    2021-01-22 08:46

    I'm sort of chuckling at doomsday and wacky answers that so often pop up on stackoverflow...

    But anyway, in years gone buy I have used paralleled RS-232 transmit lines using diodes and it can work fine for situations where collisions are unlikely. In one particular application I used this technique there were two input terminals where a user could key in simple commands to control the system (a specialized security system) and it was very unlikely that two people would be trying to control it at the same time from the two different terminals. Amazingly enough there are no problems with voltage levels with most RS-232A receivers I tested at the time and they tolerated the signal characteristics (no negative voltage) that result from the simple use of the diodes in series with the TXD signals. However, if I had to do this again I would likely add a simple pull-down resister and capacitor to ground with a diode between RXD and the cap in a sort of charge pump configuration or a pull-down to negative going handshake signal to ensure the "OR'd" input signal goes truly negative since the RS-232 spec defines +3 to -3v as invalid.

    In any case, I would recommend not using this technique except in very specific, limited, and non-mission critical cases and would not use it in the case where you have multiple devices sending information at a programmed interval as in the case of the OP or where there is a software handshake.

    In can be a simple solution to the problem of not enough serial input ports but only in a very limited set of environments.

提交回复
热议问题