Asynchronous versus
Synchronous Serial Transmission
|
In serial
communications, the transmitting and receiving device must be synchronized to
one another and use a common data rate and protocol. Synchronization allows
both the transmitter and receiver to be expecting data transmission/reception
at the same time.
There are
two basic methods of maintaining ‘‘sync’’ between the transmitter and
receiver: asynchronous and synchronous.
In an
asynchronous serial communication system, such as the USART aboard
theATmega16, framing bits are used at the beginning and end of a data byte.
These framing bits alert the receiver that an incoming data byte has arrived
and also signals the completion of the data byte reception. The data rate for
an asynchronous serial system is typically much slower than the synchronous
system, but it only requires a single wire between the transmitter and
receiver.
A
synchronous serial communication system maintains ‘‘sync’’ between the
transmitter and receiver by employing a common clock between the two
devices.Data bits are sent and received on the edge of the clock. This allows
data transfer rates higher than with asynchronous techniques but requires two
lines, data and clock, to connect the receiver and transmitter.
|
Baud Rate
|
Data
transmission rates are typically specified as a baud or bits per second rate.
For example, 9600 baud indicates data are being transferred at 9600 bits per
second.
|
Full Duplex
|
Often,
serial communication systemsmust both transmit and receive data. To do both
transmission
and
reception simultaneously requires separate hardware for transmission and
reception. A single
duplex
system has a single complement of hardware that must be switched from
transmission
to reception
configuration. A full duplex serial communication system has separate
hardware for
transmission
and reception.
|
Nonreturn to Zero Coding Format
|
There aremany different coding standards used within
serial communications. The important point is the transmitter and receiver
must use a common coding standard so data may be interpreted correctly at the
receiving end. The Atmel ATmega16 uses a nonreturn to zero coding standard.
In nonreturn to zero, coding a logic 1 is signaled
by a logic high during the entire time slot allocated for a single bit,
whereas a logic 0 is signaled by a logic low during the entire time slot
allocated for a single bit.
|
The RS-232Communication Protocol
|
When serial
transmission occurs over a long distance, additional techniques may be used to
ensure data integrity. Over long distances, logic levels degrade and may be
corrupted by noise. At the receiving end, it is difficult to discern a logic
high from a logic low. The RS-232 standard has been around for some time.
With the RS-232 standard (EIA-232), a logic 1 is represented with a −12-VDC
level, whereas a logic 0 is represented by a +12-VDC level. Chips are
commonly available (e.g., MAX232) that convert the 5- and 0-V output levels
from a transmitter to RS-232- compatible levels and convert back to 5- and
0-V levels at the receiver. The RS-232 standard also specifies other features
for this communication protocol.
|
Parity
|
To further
enhance data integrity during transmission, parity techniques may be used.
Parity is an additional bit (or bits) that may be transmitted with the data byte.
The ATmega16 uses a single parity bit. With a single parity bit, a single-bit
error may be detected. Parity may be even or odd.
In even
parity, the parity bit is set to 1 or 0, such that the number of 1’s in the
data byte including the parity bit is even. Meaning number of 1’s in 8 data
bit + that in parity bit must be even.
In odd
parity, the parity bit is set to 1 or 0, such that the number of 1’s in the
data byte including the parity bit is odd. Meaning number of 1’s in 8 data
bits + that in parity bit must be odd.
At the
receiver, the number of bits within a data byte including the parity bit are
counted to ensure that parity has not changed, indicating an error, during
transmission.
|
The blog talks about variety of topics on Embedded System, 8085 microprocessor, 8051 microcontroller, ARM Architecture, C2000 Architecture, C28x, AVR and many many more. Also includes some projects that have been worked upon and also episodes to Embedded System Podcast.
Search This Blog
Saturday, August 4, 2012
Serial Communication Terminology
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment