Docsity

Understanding Data Communication: Parallel & Serial Transmission, Protocols, Modems, Slides of Computer Science

Partial preview of the text

Download Understanding Data Communication: Parallel & Serial Transmission, Protocols, Modems and more Slides Computer Science in PDF only on Docsity!

Data Communication

CT101 - Computing Systems

Contents

  • Data Transmission Circuits
  • Parallel and Serial Data Transmission
  • Asynchronous Serial Transmission
  • Synchronous Serial Transmission
  • Data Communication Terminology
    • Channel, baud rate, bits per second, bandwidth
  • Protocols
    • Asynchronous and synchronous protocols
  • Data Multiplexing
    • Time division multiplexing and frequency division multiplexing
  • Modems
  • Summary

Data Communication Channels

  • The following is a discussion on the THREE main types of transmission circuits (channels), simplex, half duplex and full duplex.
  • Simplex
    • Data in a simplex channel is always one way. Simplex channels are not often used because it is not possible to send back error or control signals to the transmit end. An example of a simplex channel in a computer system is the interface between the keyboard and the computer, in that key codes need only be sent one way from the keyboard to the computer system.
  • Half Duplex
    • A half duplex channel can send and receive, but not at the same time. Its like a one-lane bridge where two way traffic must give way in order to cross. Only one end transmits at a time, the other end receives.
  • Full Duplex
    • Data can travel in both directions simultaneously. There is no need to switch from transmit to receive mode like in half duplex. Its like a two lane bridge on a two-lane highway.

Parallel and Serial Data

  • Data may be transmitted between two points in two different ways.

Lets consider sending 8 bits of digital data (1 byte)

  • Parallel transmission
    • Each bit uses a separate wire
    • To transfer data on a parallel link, a separate line is used as a clock signal. This

serves to inform the receiver when data is available. In addition, another line

may be used by the receiver to inform the sender that the data has been used,

and its ready for the next data.

Asynchronous Serial Transmission

(RS232 Example)

  • Because no signal lines are used to convey clock (timing) information, this method groups data together into a sequence of bits (five to eight), then prefixes them with a start bit and a stop bit. This is the method most widely used for PC or simple terminal serial 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%.
  • It is relatively simple , and therefore inexpensive. However, it has a high overhead , in that each byte carries at least two extra bits: a 20% loss of line bandwidth.

Synchronous Serial Transmission

(PS2 Example)

  • The PS/2 mouse and keyboard implement a bidirectional synchronous serial protocol.
  • The bus is " idle " when both lines are high (open-collector). This is the only state where the

keyboard/mouse is allowed begin transmitting data. The host has ultimate control over the bus and may inhibit communication at any time by pulling the Clock line low.

  • The device (slave) always generates the clock signal. If the host wants to send data, it must

first inhibit communication from the device by pulling Clock low. The host then pulls Data low and releases Clock. This is the "Request-to-Send" state and signals the device to start generating clock pulses.

  • Summary: Bus States Data = high, Clock = high: Idle state. Data = high, Clock = low: Communication Inhibited. Data = low, Clock = high: Host Request-to-Send

Data is transmited 1 byte at a time:

  • 1 start bit. This is always 0.
  • 8 data bits, least significant bit first.
  • 1 parity bit (odd parity - The number of 1's in the data bits plus the parity bit always add up to an odd number. This is used for error detection.).
  • 1 stop bit. This is always 1.
  • 1 acknowledge bit (host-to-device communication only)

Data Communication Terminology

  • Channel
    • A channel is a portion of the communications medium allocated to the sender

and receiver for conveying information between them. The communications

medium is often subdivided into a number of separate paths, each of which is

used by a sender and receiver for communication purposes.

  • Baud Rate
    • Baud rate is the same as symbol rate and is a measure of the number of line

changes which occur every second. Each symbol can represent or convey one

(binary encoded signal) or several bits of data. For a binary signal of 20Hz, this

is equivalent to 20 baud (there are 20 changes per second).

  • Bits Per Second
    • This is an expression of the number of data bits per second. Where a binary

signal is being used, this is the same as the baud rate. When the signal is

changed to another form, it will not be equal to the baud rate, as each line

change can represent more than one bit (either two or four bits).

  • Bandwidth
    • Bandwidth is the frequency range of a channel, measured as the difference

between the highest and lowest frequencies that the channel supports. The

maximum transmission speed is dependant upon the available bandwidth. The

larger the bandwidth, the higher the transmission speed. Docsity.com

Protocols and Synchronization

  • Protocols
    • A protocol is a set of rules which governs how data is sent from one point to another. In data communications, there are widely accepted protocols for sending data. Both the sender and receiver must use the same protocol when communicating.
    • BY CONVENTION, THE LEAST SIGNIFICANT BIT IS TRANSMITTED FIRST (Network order)
  • ASYNCHRONOUS PROTOCOLS
    • Asynchronous systems send data bytes between the sender and receiver. Each data byte is preceded with a start bit, and suffixed with a stop bit. These extra bits serve to synchronize the receiver with the sender.
    • Transmission of these extra bits (2 per byte) reduce data throughput. Synchronization is achieved for each character only. When the sender has no data to transmit, the line is idle and the sender and receiver are NOT in synchronization. Asynchronous protocols are suited for low speed data communications.
  • SYNCHRONOUS PROTOCOLS
    • Synchronous protocols involve sending timing information along with the data bytes, so that the receiver can remain in synchronization with the sender. When the sender has no data to transmit, the sender transmits idle flags (a sequence of alternating 0's and 1's) to maintain sender/receiver synchronization. Data bytes are packaged into chunks called packets, with address fields being added at the front (header) and checksums at the rear of the packet.

Time Division Multiplexing

  • In time division, the communications link is subdivided in terms of

time.

  • Each sub-circuit is given the channel for a limited amount of time,

before it is switched over to the next user, and so on

  • In the picture bellow it can be seen that each sub-channel occupies the

entire bandwidth of the channel, but only for a portion of the time

Frequency Division Multiplexing

• In frequency division multiplexing, each sub-channel is

separated by frequency (each sub-channel is allocated part

of the bandwidth of the main channel)

• The speed or bandwidth of the main link is the sum of the

individual sub-channel speeds or bandwidth.

Modulation Techniques

• Modulation techniques are methods used to encode digital

information in an analogue world.

• There are three basic modulation techniques

  • AM (amplitude modulation)
  • FM (frequency modulation)
  • PM (phase modulation)

• All 3 modulation techniques employ a carrier signal. A

carrier signal is a single frequency that is used to carry the

intelligence (data).

  • For digital, the intelligence is either a 1 or 0.
  • When we modulate the carrier , we are changing its characteristics

to correspond to either a 1 or 0.

Amplitude Modulation

  • Modifies the amplitude of the carrier to represent 1s or 0s
    • a 1 is represented by the presence of the carrier for a predefined period of 3 cycles of carrier.
    • Absence or no carrier indicates a 0
  • Pros
    • Simple to design and implement
  • Cons
    • Noise spikes on transmission medium interfere with the carrier signal.
    • Loss of connection is read as 0s.

Phase Modulation

  • Phase Modulation modifies the phase of the carrier to represent a 1 or 0.
    • The carrier phase is switched at every occurrence of a 1 bit but remains unaffected for a 0 bit.
    • The phase of the signal is measured relative to the phase of the preceding bit. The bits are timed to coincide with a specific number of carrier cycles (3 in this example = 1 bit)
  • Pros
    • Only 1 frequency used
    • Easy to detect loss of carrier
  • Cons
    • Complex circuitry required to generate and detect phase changes

Summary

  • In simplex circuits, data only travels one way. In half-duplex circuits,

data travels in both directions but not at the same time. In full-duplex

circuits, data can travel in both directions at the same time.

  • Parallel circuits use a separate wire for each bit of data, and also use

wires to convey timing information. Serial circuits use the same wire

for all data bits, and timing information is sent along with the data.

Parallel transmission is faster. Examples of parallel circuits in

computers are the address, data and control bus.

  • In asynchronous communication, each data element like a character is

prefixed with a start and stop bit. In synchronous communication the

data is accompanied (either explicitly or implicitly) by a clock signal.

  • A modem is a device which allows computer data to be sent over the

telephone (dial-up) networks