|
|
|
|
ASYNCHRONOUS VS. SYNCHRONOUS The synchronization problem Asynchronous communications In asynchronous serial communication, the electrical interface is held in the mark position between characters. The start of transmission of a character is signaled by a drop in signal level to the space level. At this point, the receiver starts its clock. After one bit time (the start bit) come 8 bits of true data followed by one or more stop bits at the mark level. The receiver tries to sample the signal in the middle of each bit time. The byte will be read correctly if the line is still in the intended state when the last stop bit is read.
Thus the transmitter and receiver only have to have approximately the same clock rate. A little arithmetic will show that for a 10 bit sequence, the last bit will be interpreted correctly even if the sender and receiver clocks differ by as much as 5%. Asynchronous is relatively simple, and therefore inexpensive. However, it has a high overhead, in that each byte carries at least two extra bits: a 25% loss of line bandwidth. A 56kbps line can only carry 5600 bytes/second asynchronously, in ideal conditions. Synchronous communications
The address field is usually one byte, but may be more. It is used to indicate the sender or intended receiver of the frame. It is possible to have multiple stations connected to a single wire, and to design the system so that each receiver only "sees" frames with its own address. By this means multiple stations can communicate with each other using just one line (for instance on a Local Area Network). The control field is one or more bytes. It contains information on the type of frame (for instance, whether this is a frame containing user data or a supervisory frame which performs some sort of link control function). It also often contains a rotating sequence number that allows the receiver to check that no frame has been lost. The "payload" of the frame is the data field. The data in this field is completely transparent. In fact, it does not even have to be organized in 8 bit bytes, it is a purely arbitrary collection of bits. Following the data field are two bytes comprising the Cyclic Redundancy Check (CRC). The value of these bytes is the result of an arithmetic calculation based on every bit of data between the flags. When the frame is received, the calculation is repeated and compared with the received CRC bytes. If the answers match then we are sure to a very high degree of certainty that the frame has been received exactly as transmitted. If there is a CRC error the received frame is usually discarded. Finally, the frame is terminated by another flag character. Synchronous communication is usually much more efficient in use of bandwidth than Asynchronous. The data field is usually large in comparison to the flag, control, address, and CRC fields, so there is very little overhead. A 56kbps synchronous line can be expected to carry close to 7000 bytes per second (i.e. 56000/8, whereas the asynchronous. data rate would be 56000/10). Another advantage of synchronous communications is that the frame structure allows for easy handling of control information. There is a natural position (usually at the start of the frame) for any special codes that are needed by the communication protocol. |
|
Click below for more developments and tutorial articles:
Send mail to
webmaster@infomatek.com with
questions or comments about this web site.
|