Synchronous versus Asynchronous

The two methods of serial data transmission are synchronous and asynchronous. The most common devices are asynchronous, which is the type we will look at here.

Synchronous transmissions use an accurate clock signal synchronized between the two ends. Data is sent or expected on every clock pulse, with errors being raised if either no data is received on a pulse or data is received between the pulses (Figure 14.1). The important feature about this method is that the clock signal must be accurate and synchronized between the two ends.

Figure 14.1. Synchronous serial transmission.


Asynchronous transmissions, on the other hand, use a local timer at each end, which only needs to be approximately correct. This is because the timer is reset whenever a piece of data is received, which means that it will not be subject to large time-slew errors. This is achieved by following the steps below:

1.
Both ends agree to transmit data at a specific rate.

2.
A start bit is sent to mark the beginning of the data.

3.
The timer is reset and the receiving end starts to sample the data.

4.
The data (7 or 8 bits) is sent.

5.
Optional parity data is sent.

6.
One or two stop bits are sent.

We can see from this that for one 7-bit character, we could actually be transmitting 11 bits of data (1 start, 7 data, 1 parity, 2 stop). This is quite an overhead compared to synchronous transmission. A typical asynchronous data frame is shown in Figure 14.2.

Figure 14.2. Asynchronous serial transmission.


We can see the additional data bits that are sent, so let's now look at what tasks they perform.

Start Bit

This is used to mark the start of the data frame. It is 1 bit in length and will always be transmitted.

Data Bit

This is the actual data itself. It can be either 7-bits or 8-bits long. The difference is that 7 bits allow the standard ASCII character set to be sent, whereas 8 bits allow binary characters to be used in addition to ASCII. Programs such as Point-to-Point Protocol (PPP) should always use 8-bit data, and, in fact, many people configure all their modem connections to use this value.

Parity

Parity data is a form of error detection. When a character is transmitted, a parity bit can be added to make the total number of ones in the character odd or even. Parity checking can also be disabled, in which case the parity bit is not sent at all, which removes 1 bit of the transmission overhead.

Parity may also be disabled when more efficient methods of error checking, such as X-modem and Automatic Request to Repeat (ARQ), are being used.

Each end of the line must agree on the data format that will be used—for example, 8 data bits, 1 stop bit, and no parity. This is often expressed in several ways, such as 8N1 or 8,n,1. So 7E2 would represent 7 data bits, even parity, and 2 stop bits.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset