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

[Ideas For Design]

Single-supply RS-232 transmission without level-translator ICs



Contributing Author  |   ED Online ID #6399  |   May 27, 1997

Article Rating: Not Rated

In general, the best way to reduce the price of cost-sensitive consumer products is to lower chip count as much as possible, leaving more tasks to be performed in software.

For example, in applications where RS-232 transmission is used (remote data loggers or distributed data acquisition systems that use a microcontroller to report data to a host PC computer through RS-232 interfaces), it’s easy to replace the hardware UART and implement this function in software.

It’s also possible, however,. to replace the IC normally needed to translate TTL voltage levels to RS-232 voltage levels (i.e. replace the MC1488 or MAX232 ICs) by using a very simple software trick, creating a direct link between the microcontroller and the serial port of the host PC computer (Fig. 1).

In accordance with the RS-232 standard, a MARK signal (logic “1”) is a negative voltage between −3 V and 25 V, and a SPACE signal (logic “0”) is a positive voltage in the range from +3 V to +25 V. Therefore, if signals are sent between +5 V and −5 V, they will be detected by standard RS-232 receive circuitry as being valid RS-232 signals.

To get these levels with a microcontroller powered only by 5 V, the voltage applied to the common or reference line must be changed to obtain +5 V or −5 V. That is, to transmit a MARK signal (−5 V), the TxD line must be pulled down to 0 V while the GND line is pulled up to +5 V. In this way, the PC will sense a negative voltage between its RxD and GND pins. Similarly, to transmit a SPACE signal (+5 V), the TxD line up must be pulled up to +5 V and the GND line of the microcontroller pulled down to 0 V so that the receiver (PC serial port) can sample a positive voltage between its RxD and GND pins (Fig. 2).

To test this software trick, an assembly language program listing based on the low-cost, low-end Motorola MC68HC705K1 microcontroller is provided (see the listing). It transmits the sentence: “ELECTRONIC DESIGN MAGAZINE: IDEAS FOR DESIGN” over and over again. In addition, it can be displayed on the screen of the PC using the Windows Terminal program configured for 9600 bits/s with 8 data bits, l stop bit, and no parity bits.




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
    (176 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (168 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (87 views today)
    4) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (80 views today)
    5) Downconverting Mixers Lower Power Consumption While Improving Performance
    (63 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