Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Ideas For Design]

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



Contributing Author  |   ED Online ID #3475  |   May 15, 2000

Article Rating: Not Rated

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.




Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (184 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (169 views today)
    3) Adjustment-Free Fan Controller For Under $1
    (114 views today)
    4) Science Fiction Meets Science Fact In Today's Robot Research
    (110 views today)
    5) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (108 views today)
    ALL TOP 20







    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
    (Acceptable Use Policy)
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources