You are on page 1of 3

8.

SERIAL COMMUNICATION

Serial communication is the processing of sending a data sequentially one bit at a time.
Whereas, parallel communication is the process of communicating the data simultaneously
through parallel channels or wires. In serial communication only one wire or channel is
required while in parallel communication number of wires are required which makes it
unsuitable for long distance communication. In long distance communication where the cost
of cable and synchronization difficulties make parallel communication impractical. Today,
most microcontrollers have built in several different systems for serial communication as
standard equipment. Integrated circuits are more costly when they have more pins. To reduce
the number of pins in a package, many ICs use a serial bus to transfer data when speed is not
an issue. Some examples of such low-cost serial buses include SPI, I²C, UNI/O, and 1-Wire.
The parallel communication may found to be faster but serial communication can be clocked
faster. There are few factors that allow serial link to be clocked at a higher rate:

 Clock skew between different channels is not a problem.


 A serial link requires fewer interconnecting cables (e.g., wires/fibres) and hence
occupies less space. The isolation of the channel is better.
 Crosstalk is less of an issue, because there are fewer conductors in proximity.

BAUD RATE

Baud Rate of a communication is the number of symbols or bits transferred per second. The
bits normally takes two states, so baud rate sometimes called as bit rate. In the serial port,
"9600 baud" means that the serial port is capable of transferring a maximum of 9600 bits per
second. If the information unit is one baud (one bit), the bit rate and the baud rate are
identical. If one baud is given as 10 bits, the bit rate is still 9600 but the baud rate is 9600/10,
or 960.

The most commonly used serial communication systems are:

I2C (INTER INTEGRATED CIRCUIT)

I2Cis a multi-master, multi-slave, single-ended, serial computer bus invented by Philips


Semiconductor, known today as NXP Semiconductors. This system is normally used to
connect slow speed peripherals to computer. I²C uses only two bidirectional open-drain lines,
Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors.

The bus has two roles for nodes: master and slave:

 Master node — node that generates the clock and initiates communication with slaves
 Slave node — node that receives the clock and responds when addressed by the
master

The master will start the communication by sending the start bit and one acknowledgement is
received from slave, it either transmits or receives the data to slave. In this way one
microcontroller can communicate with 112 different devices. Baud rate is usually 100 Kb/sec
(standard mode) or 10 Kb/sec (slow baud rate mode). Systems with the baud rate of 3.4
Mb/sec have recently appeared. The distance between devices which communicate over an
I2C bus is limited to several meters. 

SPI (SERIAL PERIPHERAL INTERFACE BUS)

A serial peripheral interface (SPI) bus is a system for serial communication preferred for
short distance communication introduced by Motorola. It has four conductors, commonly
three. One conductor is used for data receiving, one for data sending, one for synchronization
and one alternatively for selecting a device to communicate with. It is a full duplex
connection, which means that data is sent and received simultaneously.

The maximum baud rate is higher than that in the I2C communication system.

UART (UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTER)

The communication is asynchronous, since there is no special line for clock synchronization
is used. In some applications, such as radio connection or infrared wave’s remote control, this
feature is crucial. Since only one communication line is used, both receiver and transmitter
operate at the same predefined rate in order to maintain necessary synchronization. The
universal asynchronous receiver/transmitter (UART) takes bytes of data (parallel data to
serial) and transmits the individual bits in a sequential fashion. At the destination, a second
UART re-assembles the bits into complete bytes (serial to parallel). Each UART contains a
shift register, which is the fundamental method of conversion between serial and parallel
forms. Serial transmission of digital information (bits) through a single wire or other medium
is less costly than parallel transmission through multiple wires. This is a very simple way of
transferring data since it basically represents the conversion of 8-bit data from parallel to
serial format. Baud rate is not high, up to 1 Mbit/sec.

OSCILLATOR

Any digital processor needs a clock. Even pulses generated by the oscillator enable harmonic
and synchronous operation of all circuits within the microcontroller. Faster the clock, the
more things your processor will do.

Modern microcontrollers all have built-in clocks. There are four types of clocks:

1. Silicon Oscillator
2. Resistor-Capacitor (RC) Oscillator
3. Ceramic Resonator
4. Crystal

. The silicon oscillator is the type built in to your microcontroller - free and easy, but not very
fast. Crystal and ceramic resonator based oscillators typically provide very high initial
accuracy and a moderately low temperature coefficient. RC oscillators provide fast start-up
and low cost but generally suffer from poor accuracy over temperature and supply voltage,
with variations of 5% to50% of nominal output frequency. It is important to say that
instructions are not executed at the rate imposed by the oscillator itself, but several times
slower. In some microcontrollers, the same number of cycles is needed to execute all
instructions, while in others; the number of cycles is different for different instructions.
Accordingly, if the system uses quartz crystal with a frequency of 20 MHz, the execution
time of an instruction is not 50ns, but 200, 400 or 800 ns, depending on the type of MCU.

You might also like