13.07.2015 Views

Data Acquisition

Data Acquisition

Data Acquisition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

If the application’s software wants to send or receive some information from a device, itinitiates a transfer via the device driver. This device driver is supplied by either themanufacture of the device, or comes with the operating system. The USB driver softwarethen takes this request and places it in a memory location with other requests from otherdevice drivers. Working together, the USB driver, host hub driver and the host hubcontroller place the request, data and packets from the device drivers into a 1 ms wideframe. The host controller then transfers the data serially to the host hub ports. Since allthe devices are in parallel on the USB bus, all of the devices hear the information, (exceptlow-speed devices, unless it is a low-speed transfer. Low-speed devices are turned offwhen they are not being polled). The host then waits for a response (if necessary). Theremote USB device then responds with an appropriate packet of information. If a devicedoes not see any bus activity for 3 ms then it will go into the suspend mode.Figure 10.5Example of a USB packetThere are four types of IN packets (reading information from a device) and three typesof OUT packets (sending information out to a device). Certain devices like mice andkeyboards need to be polled (IN packets), but not too often. The USB software driverknows about these devices and schedules a regular poll for them. Included in the responseare three levels of error correction. This type of transfer is very reliable. These peripheralsare usually low-speed devices and therefore need a distinct low-speed packet to enablethem. This packet is called a preamble packet. The preamble packet is sent out beforeeach poll. The low-speed devices are disabled until they receive this preamble packet.Once they are enabled, they hear the poll and respond. Only one device can be polled at atime and therefore only one device will respond. USB has no provisions for multipleresponses from devices.On the other hand there are devices that need constant attention but polling is notpossible. These would be devices like microphones (IN packets), speakers (OUT packets)and CD-ROMs (both types of packets IN and OUT). The transfer rate is very important tothese devices. Obviously they would use the high-speed transfer rate. They would alsouse a large portion of the frame (up to 90%). The receiving device does NOT respond tothe data transfer. This transfer is a one-way data transfer or ‘simplex’. This means thaterror correction is effectively turned off for these types of transfers.10.3 The physical layerThe physical layer of the universal serial bus is based on a differential +/– 3 V DCcommunication system. It is in some ways very similar to the RS-485 voltage standard.Unfortunately it does not have the range of 485. This is not because of the type of wireused or because of the USB voltage standard itself. It is because of the timingrequirements of the USB protocol. In order to fit in all of the things the peripherals do ona USB bus, it was necessary to put very strict time requirements on the USB. The USBphysical standard has a lot of benefits to the user. It is fast, 12 MHz. It is very resistant tonoise and is very reliable, as long as the user follows the cabling rules. With standardizedcables and connectors it is very hard for the user to get things wrong when cabling theUSB system.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!