Site hosted by Angelfire.com: Build your free website today!

DATA COMMUNICATIONS
© Copyright Brian Brown, 1995-2000. All rights reserved.

Part 11: Asynchronous and Synchronous Protocols

Protocols | Asynchronous | Synchronous | Summary


Introduction
This section briefly discusses the differences between two different methods of Serial transmission, namely, asynchronous and synchronous. A protocol establishes a means of communicating between two systems. As long as the sender and receiver each use the same protocol, information can be reliably exchanged between them. We shall look at two common protocols used in Serial data communications, the first is known as Asynchronous, the second as Synchronous.

Objectives
At the end of this section you should be able to

 

PROTOCOLS
A protocol is a set of rules which governs how data is sent from one point to another. In data communications, there are widely accepted protocols for sending data. Both the sender and receiver must use the same protocol when communicating. One such rule is . . . .

BY CONVENTION, THE LEAST SIGNIFICANT BIT IS TRANSMITTED FIRST


Asynchronous Transmission
The asynchronous protocol evolved early in the history of telecommunications. It became popular with the invention of the early tele-typewriters that were used to send telegrams around the world.

Asynchronous systems send data bytes between the sender and receiver by packaging the data in an envelope. This envelope helps transport the character across the transmission link that separates the sender and receiver. The transmitter creates the envelope, and the receiver uses the envelope to extract the data. Each character (data byte) the sender transmits is preceded with a start bit, and suffixed with a stop bit. These extra bits serve to synchronize the receiver with the sender.

In asynchronous serial transmission, each character is packaged in an envelope, and sent across a single wire, bit by bit, to a receiver. Because no signal lines are used to convey clock (timing) information, this method groups data together into a sequence of bits (five - eight), then prefixes them with a start bit and appends the data with a stop bit.

The purpose of the start and stop bits was introduced for the old electromechanical Tele-typewriters. These used motors driving cams that actuated solenoids that sampled the signal at specific time intervals. The motors took a while to get up to speed, thus by prefixing the first data bit with a start bit, this gave time for the motors to get up to speed. The cams generate a reference point for the start of the first data bit.

At the end of the character sequence, a stop bit was used to allow the motors/cams etc to get back to normal. In addition, it was needed to fill in time in case the character was an end of line, when the Tele-typewriter would need to go to the beginning of a new-line. Without the stop character, the machine could not complete this before the next character arrived.

It's important to realize that the receiver and sender are re-synchronized each time a character arrives. What that means is that the motors/cams are restarted each time a start bit arrives at the receiver.

Nowadays, electronic clocks that provide the timing sequences necessary to decode the incoming signal have replaced the electromechanical motors.

This method of transmission is suitable for slow speeds less than about 32000 bits per second. In addition, notice that the signal that is sent does not contain any information that can be used to validate if it was received without modification. This means that this method does not contain error detection information, and is susceptible to errors.

In addition, for every character that is sent, an additional two bits is also sent. Consider the sending of a text document which contains 1000 characters. Each character is eight bits, thus the total number of bits sent are 10000 (8 bits per character plus a start and stop bit for each character). This 10000 bits is actually 1250 characters, meaning that an additional 250 equivalent characters are sent due to the start and stop bits. This represents a large overhead in sending data, clearly making this method an inefficient means of sending large amounts of data.

 

Summary for Asynchronous
Transmission of these extra bits (2 per byte) reduce data throughput. Synchronization is achieved for each character only. When the sender has no data to transmit, the line is idle and the sender and receiver are NOT in synchronization. Asynchronous protocols are suited for low speed data communications, and there is no method of error checking inherent in this protocol.


Synchronous Transmission
One of the problems associated with asynchronous transmission is the high overhead associated with transmitting data. For instance, for every character of 8 bits transmitted, at least an additional overhead of 2 bits is required. For large amounts of data, this quickly adds up. For example, to transmit 1000 characters, this requires 12000 bits, an extra 2000 bits for the start and stops. This is equivalent to an overhead of 250 characters. Another problem is the complete lack of any form of error detection. This means the sender has no method of knowing whether the receiver is correctly recognizing the data being transmitted.

In synchronous transmission, greater efficiency is achieved by grouping characters together, and doing away with the start and stop bits for each character. We still envelop the information in a similar way as before, but this time we send more characters between the start and end sequences. In addition, the start and stop bits are replaced with a new format that permits greater flexibility. An extra ending sequence is added to perform error checking.

A start type sequence, called a header, prefixes each block of characters, and a stop type sequence, called a tail, suffixes each block of characters. The tail is expanded to include a check code, inserted by the transmitter, and used by the receiver to determine if the data block of characters was received without errors. In this way, synchronous transmission overcomes the two main deficiencies of the asynchronous method, that of inefficiency and lack of error detection.

There are variations of synchronous transmission, which are split into two groups, namely character orientated and bit orientated. In character orientated, information is encoded as characters. In bit orientated, information is encoded using bits or combinations of bits, and is thus more complex than the character orientated version. Binary synchronous is an example of character orientated, and High Level Data Link Control (HDLC) is an example of bit orientated.

In asynchronous transmission, if there was no data to transmit, nothing was sent. We relied on the start bit to start the motor and thus begin the preparation to decode the incoming character. However, in synchronous transmission, because the start bit has been dropped, the receiver must be kept in a state of readiness. This is achieved by sending a special code by the transmitter whenever it has no data to send.

Synchronous serial data In bit orientated protocols, the line idle state is changed to 7E, which synchronizes the receiver to the sender. The start and stop bits are removed, and each character is combined with others into a data packet.

User data is prefixed with a header field, and suffixed with a trailer field which includes a checksum value (used by the receiver to check for errors in sending).

The header field is used to convey address information (sender and receiver), packet type and control data. The data field contains the users data (if it can't fit in a single packet, then use multiple packets and number them). Generally, it has a fixed size. The tail field contains checksum information which the receiver uses to check whether the packet was corrupted during transmission.

 


Summary
Asynchronous transmission is suited for low speed serial transmission and does not include error checking as part of the protocol. Each character is contained in an envelope of a start and stop bit. It is inefficient.

Synchronous transmission can achieve higher speeds than asynchronous. In addition, it is an error checking protocol, and much more efficient because i t groups characters together into blocks.


test5 Test 5 [JavaScript]
Now it is time to review this section and discover how much you have absorbed. Click on the hyperlink above to begin the test.


© Copyright B Brown. 1995-2000. All rights reserved.