Sunday, 1 July 2018

Serial communications

In Half Duplex mode, both sender and receiver are active but not at a time, i.e. if a sender transmits, the receiver can accept but cannot send and vice versa.


The Full Duplex mode is widely used communication in the world. Here both sender and receiver can transmit and receive at the same time.





Data communication in a network can happen in two ways. They are serial communication and parallel communication.
Serial communication is a technique used to send data bit by bit using a two-wires i.e. transmitter and receiver.
For example, if I want to send an 8-bit binary data 11001110 from the transmitter to the receiver.
But, which bit goes out first? Most Significant Bit – MSB (7th bit) or Least Significant Bit- LSB (0th Bit). We cannot say. Here I am considering LSB is moving first (for little Endian).
Serial Communication


For every clock pulse; transmitter sends a single bit of data to the receiver.
RS232 Parallel Communication


The main reason to use serial interface is, the cost of the entire embedded systembecomes cheap and transmits information over a long distance.
Unlike serial communication, the parallel communication has more input-output pins to connect multiple devices.
Serial CommunicationParallel Communication
Sends data bit by bit at one clock pulseTransfers a chunk of data at a time
Requires one wire to transmit the dataRequires ‘n’ number of lines for transmitting ‘n’ bits
Communication speed is slowCommunication speed is fast
Installation cost is lowInstallation cost is high
Preferred for long distance communicationUsed for short distance communication
Example: Computer to ComputerComputer to multi function printer
Synchronous serial interface
All the devices on Synchronous serial interface use the single CPU bus to share both clock and data. Due to this fact, data transfer is faster. The advantage is there will be no mismatch in baud rate.
Example: I2c, SPI etc.
Asynchronous serial interface
The asynchronous interface does not have an external clock signal, and it relies on four parameters namely
  1. Baud rate control
  2. Data flow control
  3. Transmission and reception control
  4. Error control.
Rules of Serial Communication
Baud rate is the speed of transferring data from the transmitter to a receiver in the form of bits per second. 

Synchronization

Transmitter appends synchronization bits (1Start bit and 1 or 2 Stop bit) to the original data frame. Synchronization bits help the receiver to identify the start and end of the data transfer. This process is known as asynchronous data transfer.

Asynchronous Serial Protocols

when you start working on the embedded system is why to use Asynchronous protocols?
  • To move around the information at a longer distance and
  • For more reliable data transfer.
Some of them are:

RS-232 protocol

  • RS-232 is the first serial protocol used for connecting modems for telephony. 
  • RS232 supports full duplex communication and allows baud rate up to 1Mbps.
  • Cable length is limited to 50 feet.
As you know, the data stored in the memory are in the form of bytes. You may have a doubt How is the byte-wise data converted to binary bits? The answer is a Serial port.
The serial port has an internal chip called UART. UART is an acronym for Universal Asynchronous Receiver Transmitter which converts the parallel data (byte) into the bitwise serial form.
RS232 Serial Port

No comments:

Post a Comment