• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Microcontroller Tips

Microcontroller engineering resources, new microcontroller products and electronics engineering news

  • Products
    • 8-bit
    • 16-bit
    • 32-bit
    • 64-bit
  • Applications
    • 5G
    • Automotive
    • Connectivity
    • Consumer Electronics
    • EV Engineering
    • Industrial
    • IoT
    • Medical
    • Security
    • Telecommunications
    • Wearables
    • Wireless
  • Learn
    • eBooks / Tech Tips
    • EE Training Days
    • FAQs
    • Learning Center
    • Tech Toolboxes
    • Webinars/Digital Events
  • Resources
    • Design Guide Library
    • DesignFast
    • LEAP Awards
    • Podcasts
    • White Papers
  • Videos
    • EE Videos & Interviews
    • Teardown Videos
  • EE Forums
    • EDABoard.com
    • Electro-Tech-Online.com
  • Engineering Training Days
  • Advertise
  • Subscribe

Asynchronous serial communication explained (including TTL, UART, and RS232)

December 13, 2017 By Scott Thornton 4 Comments

A microcontroller can communicate with a computer or another device by using a standard method of communication that has been worked out ahead of time. Serial communication is a very common means of communication. Unless you’ve been working in electronics for a while, you might not have a full handle on the plain facts about asynchronous communication.

asynchronous serial communication
Figure 1: A female serial communication connector for nine wires is called a DB-9 (or DB9) connector and is quite common. This serial interface, found on older PCs, is often referred to as UART (the transmitter-receiver itself) or RS-232 (the protocol).

What is asynchronous serial communication?
Devices using communication send and receive a series of digital pulses between them at a rate that’s been decided upon before communication starts. That agreed-upon signaling is called a protocol. Serial communication initially begins when one device that wishes to communicate sends out data via digital pulses via a serial communication bus (wires) to another device at a rate that the protocol supports. The receiving device picks up the pulses, looking for pulses coming in at the same rate. This type of serial communication is called asynchronous serial communication, where sending and receiving a serial train of pulses does not require a timing clock for both devices to keep everything running at exact times. Instead, both devices keep their timing independent of each other.

Recall that each instruction that’s carried out by a microcontroller (or any other traditional processor) needs a timing clock, kept on pace by a quartz crystal or other regularly pulsing device, to keep instruction cycles running predictably. Asynchronous communication does not require a timing clock that is common to both devices. Each device independently listens and sends digital pulses that represent bits of data at an agreed-upon rate. If both devices can transmit and receive at the same time, it is called full-duplex communication. Half-duplex means that like a walkie-talkie, only one device may communicate at a time and devices take turns transmitting. Sometimes you only need a device that only needs to monitor, or receive, a signal, in which case half-duplex is fine. As another example, if you have a speakerphone where it’s not possible to interrupt the person at the other end, your speakerphone is probably half-duplex.

Asynchronous serial communication is sometimes referred to as Transistor-Transistor Logic (TTL) serial, where the high voltage level is logic 1, and the low voltage equates to logic 0.  Almost every microcontroller on the market today has at least one Universal Asynchronous Receiver-Transmitter (UART) for serial communication. All PCs and laptops used to have them a decade or so ago, but serial communication for consumer use has been replaced by Universal Serial Bus (USB).  Even so, microcontroller development kits still often use serial communication through a serial port to program the microcontroller using a PC as a host for the programmer. To get around this, USB-to-serial converter cables and drivers are available. FTDI’s USB-to-RS232 level serial UART interface to USB converter is one such product. RS-232 is a well-known serial protocol that was widely used on PCs, is still in wide use, and uses inverted logic.

What do devices need to communicate asynchronously?
To communicate successfully, both devices need to be set up ahead of time regarding some expectations that will enable communication that can be understood on both ends.  Besides the data rate for the pulses traveling between devices, the devices need to have in common:

  1. Both devices must interpret the voltage level of the serial train of pulses in the same way. More specifically, they need to agree on what voltage level represents a bit that is a zero (0) and the voltage level that represents a bit that is a one (1).
  2. Both must agree as to whether the higher voltage level is a 1 or a 0, or vice versa (which would mean the signal is inverted).
  3. The devices must share three wires for:
    1. ground as a common reference point for measuring voltage levels
    2. sending data, called the transmit line, or transmitter (TX)
    3. receiving data, called the receiving line, or the receiver (RX)

This might be a good time to point out that a transceiver (XCVR) is a device that combines the ability to both transmit and receive.

The rate at which a serial communication takes place is called a baud rate. Baud rates are measured in bits per second (bps) and some standard baud rates are 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 5600, 57600, 115200, 128000, 153600, 230400, 256000, 460800, and 921600 bps. For simple communication, such as communicating with a microcontroller to program it from a host PC, the baud rate is usually 9600 bps or so.  At 9600 baud, a transmitter sends one bit every 1/9600 the of a second and the receiving device will receive at the same rate. Microcontrollers typically sense a high voltage level at +3.3 or +5.0 volts for serial communication. Thus, every 1/9600th of a second, a receiver will look at the line and determine if it’s high or low-level voltage and translate that into a bit or 1 or 0. In TTL series communication, a low voltage level means a 0-bit value and a high voltage level means a 1-bit value.

Some other facts of note are that serial ports (See Figure 1) can only communicate with one device at a time, which means that typically there is one device at each end of a serial cable and no more. Other serial communication protocols such as USB can have several devices connected to the same cabling (called a “bus”) and communicate co-operatively and at much higher speeds than the RS-232 serial communication protocol.

If your microcontroller is communicating serially with another device, both the microcontroller and the other device can only see what the other is sending. Therefore, it’s important to be certain that the programs running the communication on each side is using the same protocol and baud rate.

Filed Under: FAQ, Featured Tagged With: basics, FAQ

Reader Interactions

Comments

  1. Calvin Barajas says

    February 12, 2019 at 3:40 pm

    This is by far one of the best descriptions of TTL and serial communications in general. Thank you very much.

    Calvin
    Sacramento, CA

    Reply
  2. Andy says

    September 27, 2019 at 3:45 pm

    To the points, both practically detailed and big pictured; Looking forward to learning more.

    Reply
  3. Might lert says

    November 3, 2019 at 5:18 pm

    How does uart cable looks like ? Does uart and ttl cable look the same ? Do you have pictures ?

    Reply
  4. luisa says

    July 20, 2020 at 6:33 am

    Nice. Thank you.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Featured Contributions

Five challenges for developing next-generation ADAS and autonomous vehicles

Securing IoT devices against quantum computing risks

RISC-V implementation strategies for certification of safety-critical systems

What’s new with Matter: how Matter 1.4 is reshaping interoperability and energy management

Edge AI: Revolutionizing real-time data processing and automation

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“bills
“microcontroller
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

RSS Current EDABoard.com discussions

  • How to calculate Gate Driver's propagation delay time?
  • Bidirectional data bus
  • Editing posts
  • avoiding mixer compression when acting as a phase detector
  • Crude Powerline FSK comms literally shorts the power bus at a certain frequency?

RSS Current Electro-Tech-Online.com Discussions

  • RS485 bus: common ground wire needed or not?
  • Kawai KDP 80 Electronic Piano Dead
  • Good Eats
  • What part is this marked .AC ?
  • Photo interrupter Connections

DesignFast

Design Fast Logo
Component Selection Made Simple.

Try it Today
design fast globle

Footer

Microcontroller Tips

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips

Microcontroller Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy