1 / 16

ITEC 352

ITEC 352. Lecture 33 USB (2). Review. Intro to USB History Rationale Competitors Serial versus parallel Topology. Objectives. Types of transfer modes Pins Encoding electricity into 0’s and 1’s Packets. Transfer modes. Isochronous transfers Guaranteed rate but possible data loss

cade
Télécharger la présentation

ITEC 352

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. ITEC 352 Lecture 33 USB (2)

  2. Review • Intro to USB • History • Rationale • Competitors • Serial versus parallel • Topology

  3. Objectives • Types of transfer modes • Pins • Encoding electricity into 0’s and 1’s • Packets

  4. Transfer modes • Isochronous transfers • Guaranteed rate but possible data loss • Interrupt transfers • Quick response transfer • Bulk transfers • Uses all available bandwidth • No guarantee on timing or latency • Control transfers • Tell the device what to do

  5. Connector • Pin Layout (1-4) • Vcc +5V (Why is this important?) • Data- • Data+ • Ground • Why so simple?

  6. Why 2 wires? • Why do you think 2 data wires is important? • Twice the capacity (parallel)? • Error detection? • Host to Client, Client to Host? • Others?

  7. Electricity • Sends a signal across a wire Note: How clean is this signal? What can we do to with this level of signal strength?

  8. Brainstorm • Develop a system for sending 0s and 1s across an electrical wire in a safe manner • Tools • Clock pulses

  9. NRZI Encoding • Start at 1 or 0 • At the next clock edge • If value changes it is a 1 • If it stays the same it is a 0 • Or vice versa (USB uses same as 1, change is 0)

  10. Circuitry thought • Have to have some way to accumulate the bits • Start with 32 bits of 0 • Shift bits right • Insert bit from wire into accumulator • Sound familiar to P1? • Binary adders + Flip flops • 5 bits of memory (2^5 = 32) • Add 1 to it each time • When overflow happens, data is ready Note: not exactly what is used, but close

  11. Process • A protocol (what is it in your own words?) • Which ones do you know of? • Handshaking • Series of known 0s and 1s • Timing • Devices run at different speeds • Have to figure out their transmission speed • Handshake allows you to figure out the timing

  12. Packets • Group of 0’s and 1’s put together • Agreed upon method of communication • Preamble (timing) = 1100 0011 1100 • Ping = 0100 0010 1101 • Response • ACK = 0010 0100 1011 • NAK… • Stall…

  13. How it works • Once you identify yourself • Certain number of bits read in based on command • Data transfer basics • Send data command from computer • Data sent from device • Ack from computer saying it got data • If Ack not there, data resent • Also have to verify data is ok and not corrupt

  14. Data safety • How can you verify that a series of 0’s and 1’s are transferred correctly? • Ideas?

  15. Software • Read X bits into an array == Packet! • Handling each bit… • Not very desirable • Libraries to handle this for us • Next time!

  16. Summary • USB • Electrical and • Next time • Code / libraries

More Related