1 / 23

Data Communication

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

patia
Download Presentation

Data Communication

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Communication CT101 - Computing Systems

  2. 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

  3. Data Transmission • Data transmission is the transfer of data from point-to-point often represented as an electromagnetic signal over a physical point-to-point or point-to-multipoint communication channel • A communication channel refers to the medium used to convey information from a sender (or transmitter) to a receiver, and it can use fully or partially the medium. • Examples of channels: copper wires, optical fibbers or wireless communication channels.

  4. 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.

  5. 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.

  6. Parallel and Serial Data • Serial • Each bit is sent over a single wire, one after the other • Usually no signal lines are used to convey clock (timing information) • There are two types of serial transmission, essentially having to do with how the clock is embedded into the serial data • Asynchronous serial transmission • Synchronous serial transmission • If no clock information was sent, the receiver would misinterpret the arriving data (due to bits being lost, going too slow). • Parallel transmission is obviously faster, in that all bits are sent at the same time, whereas serial transmission is slower, because only one bit can be sent at a time. Parallel transmission is very costly for anything except short links.

  7. 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.

  8. 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 StatesData = 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)

  9. Serial Communication

  10. 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.

  11. 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.

  12. Data Multiplexing • A multiplexer is a device which shares a communication link between a number of devices (users). • Rather than provide a separate circuit for each device, the multiplexer combines each low speed circuit onto a single high speed link. The cost of the single high speed link is less than the required number of low speed links. • It does this by time or frequency division.

  13. 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

  14. 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.

  15. Modems • Modems are devices which allow digital data signals to be transmitted across an analogue link. • Modem stands for modulator/demodulator. A modem changes the digital signal to an analogue frequency, and sends this tone across the analogue link. At the other end, another modem receives the signal and converts it back to digital.

  16. 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.

  17. 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.

  18. Frequency Modulation • Modifies the frequency of the carrier to represent the 1s or 0s. • a 0 is represented by the original carrier frequency • a 1 by a much higher frequency ( the cycles are spaced closer together) • Pros • Immunity to noise on transmission medium. • Always a signal present. Loss of signal easily detected • Cons • Requires 2 frequencies • Detection circuit needs to recognize both frequencies when signal is lost.

  19. 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

  20. 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

  21. Additional slides about Synchronous Protocols

  22. Synchronous Serial Transmission • In fast speed synchronous communications, data is not sent in individual bytes, but as frames of large data blocks. Frame sizes vary from a few bytes through 1500 bytes for Ethernet. • The clock is embedded in the data stream encoding, or provided on separate clock lines such that the sender and receiver are always in synchronization during a frame transmission. Most modern WAN framing is built on the High-Level Data Link Control (HDLC) frame structure. An HDLC frame has the following general structure • The flag is a sequence 01111110 which delimits the start of the frame. A technique known as bit stuffing is used to insert additional zeros into the data so that a flag sequence never appears anywhere but at the start and end of a frame. These extra bits are "unstuffed" again by the receiver.

  23. Synchronous Serial Transmission • The address field is usually one byte, but may be more. It is used to indicate the sender or intended receiver of the frame. It is possible to have multiple stations connected to a single wire, and to design the system so that each receiver only "sees" frames with its own address. By this means multiple stations can communicate with each other using just one line (for instance on a Local Area Network). • The control field is one or more bytes. It contains information on the type of frame (for instance, whether this is a frame containing user data or a supervisory frame which performs some sort of link control function). It also often contains a rotating sequence number that allows the receiver to check that no frame has been lost. • The "payload" of the frame is the data field. The data in this field is completely transparent. In fact, it does not even have to be organized in 8 bit bytes, it is a purely arbitrary collection of bits. • Following the data field are two bytes comprising the Cyclic Redundancy Check(CRC). The value of these bytes is the result of an arithmetic calculation based on every bit of data between the flags. When the frame is received, the calculation is repeated and compared with the received CRC bytes. If the answers match then we are sure to a very high degree of certainty that the frame has been received exactly as transmitted. If there is a CRC error the received frame is usually discarded. • Finally, the frame is terminated by another flag character. • Synchronous communication is usually much more efficient in use of bandwidth than Asynch. The data field is usually large in comparison to the flag, control, address, and CRC fields, so there is very little overhead.

More Related