Automatic Switch Handles RS-232 Or RS-485 Serial Data

Sept. 20, 2004
The need arose for a programmable control system that handles 8-bit data to have both RS-232 and RS-485 modes. This requirement was satisfied with a serial communication controller-transceiver, an octal buffer, and a two-line port (Rx and Tx for...

The need arose for a programmable control system that handles 8-bit data to have both RS-232 and RS-485 modes. This requirement was satisfied with a serial communication controller-transceiver, an octal buffer, and a two-line port (Rx and Tx for receiving and transmitting data), either in RS-232 or RS-485 mode. The RS-232 mode will program several parameters of the control system via a dedicated program in a PC. The RS-485 mode is used for serial communications to other similar systems and to a remote central station.

Originally when the demand called for programming, P2 with lines Rx and Tx was connected to the PC's RS-232 serial port. In addition, the communication interface transceiver had to be configured for RS-232 mode. This was done by using four jumpers to manually connect the RS-232 transceiver points R1OUT, R1IN, T1OUT, and T1IN to the octal buffer, port P2, and the serial communication controller's output TXDA. After programming, the four jumpers had to be removed to configure the system to the RS-485 mode by connecting the RS-485 transceiver points RO, DO/RI, DO/RI, and DI once again to the octal buffer, port P2, and the serial communication controller's output TXDA.

To avoid that frustrating job of jumper move-remove, an automatic and reliable switch was used. As shown in the figure, the MAX4533CPP, an electronic analog quad SPDT switch, can be used to simultaneously switch the octal buffer, port P2, and the Z8530H serial communication controller to RS-232 or RS-485 mode at any time.

The device is triggered by +5 V via a simple debounce RS flip-flop using an SPDT switch. All digital inputs IN1-IN4 are parallel triggered, and therefore all "contacts" are set to the CLOSE or OPEN position. Thus, selecting RS-232 or RS-485 mode is easily accomplished. The switch operates from a single supply of +12 V dc, and digital-input thresholds ensure TTL-compatibility for the connected devices. ON resistance is 175 (omega) maximum. However, this doesn't harm the data signals, which stay at +2.4 V dc. The +12-V dc supply is available from the system's board, and +5 V is derived from the zener diode and R1. C1 and C2 are used to decouple the +12-V and +5-V supply lines.

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!