Define and differentiate synchronous and asynchronous communication with example.
Define and differentiate synchronous and asynchronous communication with example.
Quick answer
Serial communication sends the bits of data one after another over a single line. For the receiver to understand the bits, it must know where each bit and character starts and ends. There are two ways to do this.
Synchronous communication
The sender and the receiver work with the same clock. Either the clock is sent on a separate line, or it is recovered from the data signal. Data is sent in large blocks (frames), which start with one or more synchronising characters (SYN) and end with an end marker. There are no start and stop bits for each character. Examples are the HDLC and SDLC protocols, SPI and Ethernet.
Asynchronous communication
The sender and the receiver have no common clock. Each character is sent in its own frame, with a start bit (0) in front and one or two stop bits (1) at the end. A parity bit may be added. The receiver synchronises on the falling edge of each start bit and reads the following bits at the agreed baud rate. Examples are the RS-232 serial port, a UART and a keyboard link.
Idle Start D0 D1 D2 D3 D4 D5 D6 D7 Parity Stop Idle
‾‾‾‾|_____| data bits (8) |‾‾‾‾‾|‾‾‾
For example, to send the character "A" (ASCII 01000001) with one start bit, 8 data bits and one stop bit, the frame is 10 bits long. Only 8 of these carry data.
Differences
| Point | Synchronous | Asynchronous |
|---|---|---|
| Clock | Common clock, shared | Separate clocks, no sharing |
| Unit of transmission | Block of many characters | One character at a time |
| Extra bits | Few (frame header and trailer) | Start, stop and parity bits for each character |
| Efficiency | High | Lower, as the overhead is large |
| Speed | Fast | Slow |
| Gaps between data | Not allowed inside a block | Allowed at any time |
| Cost and complexity | Higher | Lower and simple |
| Typical use | Network links, disk interfaces | Keyboard, modem, serial terminal |
In short, synchronous communication is better for fast, steady transfer of large amounts of data, and asynchronous communication is better for slow, irregular transfers such as typing on a keyboard.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.
Up nextExplain the concept of interrupts. Describe interrupt hardware and explain different types