Add A Dual-Port COM Switch To Your PC

March 22, 1999
Did you ever wish you had another COM port on your PC without needing an additional COM card? This article describes a simple RS-232 electronic switch that splits one COM port into two. By...

Did you ever wish you had another COM port on your PC without needing an additional COM card? This article describes a simple RS-232 electronic switch that splits one COM port into two. By toggling the RTS hardware line, the Dual Port COM Switch circuit will electronically switch between two devices connected to a single COM port.

RS-232 transmit, receive, and RTS from the PC connect to the Dual Port COM Switch circuit via connection to IC-1 (see the figure). IC-1 is a MAX232A RS-232-to-TTL converter chip with an onboard ±10-V charge-pump power supply. The transmit line and RTS line from the PC are converted to TTL logic levels via IC-1. If the RTS line is set to logic HIGH, it will pass the converted TTL transmit signal to IC-2 via the NAND gate IC-4. IC-2, another MAX232A chip, then conditions the TTL transmit signal back to the appropriate RS-232 driver voltages for the device connected to Port B. The receive signals from Port B, in turn, also are NAND-gated, via IC-4, back to IC-1 and the PC.

A logic level LOW on the RTS line routes the transmit and receive signals in a similar fashion to and from the PC and Port A. Indicator lights LED1 and LED2 provide a simple visual indication of which port is active.

Switching between Port A and Port B, using Microsoft Visual Basic, is a simple matter of setting the COM control’s RTS property to True or False:

COM.RTS = True ;connect PC to Port B
COM.RTS = False ;connect PC to Port A

The switch is activated using Microsoft QuickBasic (see the listing).

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

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