Bidirectional RS-232 Communication Uses Only One I/O Line

May 15, 2000
Occasionally, when designing with microcontrollers, it’s necessary to include a bidirectional serial communications capability, but, only a single I/O line is available. This situation can be accommodated, though, if the transmission and reception...

Occasionally, when designing with microcontrollers, it’s necessary to include a bidirectional serial communications capability, but, only a single I/O line is available. This situation can be accommodated, though, if the transmission and reception directions are well defined. In other words, the microcontroller system and the peripheral system should work as a transmitter/receiver pair or vice versa, and never as a transmitter/transmitter pair.

An RS-232 driver like the MAX232 needs to be included in the design to meet the requirements specified for EIA232-C voltage levels. The TTL-side of this interface driver enters into a single microcontroller line (see the figure). Only resistor R has to be determined to detect the incoming data and the transmission within the proper voltage range possible. The possible scenarios are as follows:

  1. The microcontroller tries to output a low to the RS-232 driver. For this situation, the current flowing into the microcontroller must be maintained at less than its maximum specification (see Equations 1 and 2).
  2. The MAX232 outputs a low at the TTL side. For this scenario, R must hold a value that keeps the input voltage of the microcontroller under its VILMAX level (see Equations 3 and 4).
  3. The microcontroller tries to output a high to the RS-232 driver. This case is not a concern, since both R and the 5k internal resistor pull up the input of the RS-232 driver.
  4. The MAX232 tries to output a high to the microcontroller. This is exactly the same as the previous case.

When using a MAX232 line driver and a PIC microcontroller, R needs to be between 263 Ω and 476 Ω. A value of 370 Ω lies in the middle of these two, and thus is a good choice.

Finally, a software consideration must be taken into account: Any data transmitted from the peripheral system to the microcontroller will also be received by the peripheral. This feedback may be used to check data corruption or it simply can be discarded.

Sponsored Recommendations

The Importance of PCB Design in Consumer Products

April 25, 2024
Explore the importance of PCB design and how Fusion 360 can help your team react to evolving consumer demands.

PCB Design Mastery for Assembly & Fabrication

April 25, 2024
This guide explores PCB circuit board design, focusing on both Design For Assembly (DFA) and Design For Fabrication (DFab) perspectives.

What is Design Rule Checking in PCBs?

April 25, 2024
Explore the importance of Design Rule Checking (DRC) in manufacturing and how Autodesk Fusion 360 enhances the process.

Unlocking the Power of IoT Integration for Elevated PCB Designs

April 25, 2024
What does it take to add IoT into your product? What advantages does IoT have in PCB related projects? Read to find answers to your IoT design questions.

Comments

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