Coursify

Microprocessor

Synchronous vs Asynchronous Communication

1 hour

Learning Goals

  • Understand asynchronous communication principles: recognizing data transmission without external clock signal, utilizing start and stop bits for frame synchronization, allowing variable timing between characters, and enabling independent timing at transmitter and receiver
  • Master asynchronous frame structure: analyzing start bit (always 0) initiating transmission, data bits (typically 7 or 8 bits) containing information, optional parity bit for error detection, and stop bit(s) (1 or 2 bits) terminating frame, calculating total frame length
  • Explain synchronous communication mechanisms: utilizing shared clock signal synchronizing transmitter and receiver, eliminating start/stop bit overhead for continuous data streams, recognizing both devices operating at identical clock frequency
  • Analyze synchronous vs asynchronous efficiency: calculating asynchronous overhead (start + stop + parity bits reducing payload percentage), recognizing synchronous efficiency advantage for long continuous transfers, and evaluating protocol selection based on data pattern
  • Understand baud rate in asynchronous communication: recognizing baud rate (bits per second) specification for both transmitter and receiver, ensuring identical baud rates for proper reception, and calculating frame transmission time from baud rate
  • Apply baud rate calculations: determining frame duration at standard rates (9600 baud typical for 8051), calculating timing requirements for character transmission with specific baud rate and frame format
  • Master timing constraints: recognizing maximum permissible clock frequency difference between devices (typically ±3% tolerance), understanding margin requirements for robust reception, and managing timing in multi-device systems
  • Compare protocol selection: choosing asynchronous for intermittent communication with timing flexibility, selecting synchronous for high-speed continuous transfers, recognizing cost/complexity tradeoffs between protocol types

In the realm of microprocessor external communication, data is typically transferred serially to minimize pin count. This transfer can be categorized into two fundamental methodologies: Synchronous and Asynchronous communication. The choice between these methods dictates how the receiver identifies the beginning and end of data bits and how it compensates for timing differences between the two devices .

Footnotes

  1. Comparison of Synchronous and Asynchronous Signalling - Wikipedia overview of synchronization methods.

Synchronous Vs Asynchronous Serial Data Transmission

Asynchronous Communication Principles

Asynchronous communication is characterized by the absence of a shared external clock signal. Instead, the transmitter and receiver operate at a pre-agreed Baud Rate, maintaining their own internal timing .

To ensure the receiver can "catch" the data, the transmission is broken into small units called frames. Each frame uses specific bits to signal the start and end of transmission, allowing for variable timing gaps between characters.

The Asynchronous Frame Structure

A standard asynchronous frame consists of:

  1. Start Bit: Always a logic '0' (Space). It alerts the receiver that data is coming .
  2. Data Bits: Typically 7 or 8 bits of actual information (e.g., an ASCII character).
  3. Parity Bit (Optional): Used for simple error detection (Even or Odd).
  4. Stop Bit(s): Logic '1' (Mark) for 1 or 2 bit durations to signal the frame end and return the line to an idle state.

Footnotes

  1. Synchronous vs Asynchronous Communication - Principles of system interaction and timing.

  2. Using an EconOscillator to Clock an 8051 - Technical details on the 3% error limit and 8051 timing.

Calculating Transmission Metrics

  1. 1
    Step 1

    Add all bits in the frame: TotalBits=Start+Data+Parity+StopTotal Bits = Start + Data + Parity + Stop. For example, an '8N1' format (8 data bits, no parity, 1 stop bit) has 1+8+0+1=101 + 8 + 0 + 1 = 10 bits.

  2. 2
    Step 2

    Use the formula: Overhead=Start+Parity+StopTotalBits×100Overhead = \frac{Start + Parity + Stop}{Total Bits} \times 100. In an 8N1 frame, the overhead is 2/10=20%2/10 = 20\%.

  3. 3
    Step 3

    Frame time is calculated as Tframe=TotalBitsBaudRateT_{frame} = \frac{Total Bits}{Baud Rate}. At a standard 9600 baud for an 8051 microprocessor, a 10-bit frame takes 1096001.04\frac{10}{9600} \approx 1.04 ms .

    Footnotes

    1. Using an EconOscillator to Clock an 8051 - Technical details on the 3% error limit and 8051 timing.

Communication Efficiency Comparison

Payload percentage vs Overhead bits for different frame configurations

Synchronous Communication Mechanisms

In synchronous communication, the transmitter and receiver share a common clock signal. This clock ensures that both devices operate at the exact same frequency, eliminating the need for start and stop bits for every byte .

  • Continuous Streams: Data is sent as a continuous block or "packet."
  • High Efficiency: Because there are no start/stop bits per character, the overhead is significantly lower, typically consisting only of a sync pattern at the beginning of a large block.
  • Complexity: Requires an extra wire for the clock signal and more complex hardware to manage block-level synchronization.

Footnotes

  1. Comparison of Synchronous and Asynchronous Signalling - Wikipedia overview of synchronization methods.

  • Clock: Independent clocks at each end.
  • Overhead: High (20-30% due to start/stop bits).
  • Use Case: Intermittent data (keyboard, sensors).
  • Hardware: Simpler (only 1 data wire + ground).
  • Speed: Generally slower (up to 115.2 kbps typically).

The 8051 Standard

In 8051 microprocessor applications, 9600 baud is the most common standard for asynchronous communication. However, always ensure both devices are configured for the exact same baud rate, or the receiver will misinterpret the '0' and '1' levels as the wrong bits .

Footnotes

  1. Baud Rate Calculation for 8051 - Mathematical approach to setting baud rates in microprocessors.

Timing Constraints and Robustness

Clock Drift Danger

Temperature changes can cause internal oscillators to drift. In asynchronous systems, a device that works at room temperature might fail in extreme heat if its baud rate drifts beyond the ±3% tolerance threshold.

Knowledge Check

Question 1 of 4
Q1Single choice

What is the primary function of the Start Bit in asynchronous communication?

Synchronous vs Asynchronous Communication | Microprocessor | Coursify