University of Kufa: How Error Detection and Its Possible Elimination Is Done in USB?
University of Kufa: How Error Detection and Its Possible Elimination Is Done in USB?
University of Kufa: How Error Detection and Its Possible Elimination Is Done in USB?
College of Engineering
Department of Electrical Engineering
Microprocessors and Microcontrollers
How error detection and its possible elimination is done in USB?
1|PAGE
Abstract
We are as computer users always transfer data between our Pc or Laptop to an external
storage device (Flash, HDD, etc.) or vise verse through USB, When bits (our data) are
transmitted over the USB, they are subject to get corrupted our error out due to
interference and noise, etc. We will discuss errors types the methods that’s being used to
detect these errors and the deference between them how those methods work and the
methods that used to correct those errors.
Introduction
USB is a communication protocol that supports serial data transfer between a USB host
computer and wide range of simultaneously accessible peripherals. The host serves as the
master of the bus. Devices are divided into two speeds: 1.5Mbps or 12Mbps. Data
transfer rate of 1.5Mbps supports low speed devices such as keyboard, mice, printer etc.
Data transfer rate of 12Mbps supports wide variety of desktop peripherals such as
MODEM, audio, video devices, telephones.
USB employs two error checking methods to ensure that data is sent correctly. The first
method is cyclic redundancy check (CRC) is sent with all data transmissions to validate
data integrity within a packet. And the second one is Checksum (sometimes we use third
which is Parity Check)
2|PAGE
Types of Errors
1. Single bit error − in the received frame, only one bit has been
corrupted, i.e. either changed from 0 to 1 or from 1 to 0.
2. Multiple bits error − in the received frame, more than one bits are
corrupted.
3. Burst error − in the received frame, more than one consecutive bits
are corrupted.
3|PAGE
Error Detection Techniques.
Checksum method
Will calculate the total bits in a packet of data and include that total
checksum amount when the data is sent over communication lines.
The receiver will then look at the packet, read the checksum value and
then perform the same calculation to make sure everything adds up. If
the calculation on the receiver’s end matches the value passed in the
packet, all is good. The problem is a high probability that somewhere
between the sender and receiver the bits of data are changed,
corrupted or swapped yet still turn a correct checksum value after
calculation on the receiving end.
4|PAGE
3. The receiver adds the incoming segments along with the checksum
using 1’s complement arithmetic to get the sum and then
complements it.
4. If the result is zero, the received frames are accepted; otherwise,
they are discarded.
1|PAGE
Cyclical Redundancy Checking(CRC)
Is about as straight forward as addition but using long division. The
advantage with this approach is looking throughout the entire packet
to verify if all the information arrived correctly, rather than depending
on one lump sum number as verification. As with traditional long
division, binary division works through the dividend number from the
divisor number.
5|PAGE
Deference between CRC and Checksum.
CHECKSUM CRC
Uses addition in its math CRC uses long division in its math
calculations to check data calculations to check data
6|PAGE
Error Correction Techniques
Error correction techniques find out the exact number of bits that have
been corrupted and as well as their locations. There are two principle
ways
7|PAGE
Conclusion
8|PAGE
References