Presentation is loading. Please wait.

Presentation is loading. Please wait.

ITEC 352 Lecture 33 USB (2). Review Intro to USB –History –Rationale –Competitors –Serial versus parallel –Topology.

Similar presentations


Presentation on theme: "ITEC 352 Lecture 33 USB (2). Review Intro to USB –History –Rationale –Competitors –Serial versus parallel –Topology."— Presentation transcript:

1 ITEC 352 Lecture 33 USB (2)

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

3 USB (2) Objectives Types of transfer modes Pins Encoding electricity into 0’s and 1’s Packets

4 USB (2) 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 USB (2) Connector Pin Layout (1-4) –Vcc +5V (Why is this important?) –Data- –Data+ –Ground Why so simple?

6 USB (2) 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 USB (2) 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 USB (2) Brainstorm Develop a system for sending 0s and 1s across an electrical wire in a safe manner Tools –Clock pulses

9 USB (2) 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 USB (2) 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 USB (2) 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 USB (2) 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 USB (2) 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 USB (2) Data safety How can you verify that a series of 0’s and 1’s are transferred correctly? Ideas?

15 USB (2) Software Read X bits into an array == Packet! Handling each bit… –Not very desirable Libraries to handle this for us –Next time!

16 USB (2) Summary USB Electrical and Next time –Code / libraries


Download ppt "ITEC 352 Lecture 33 USB (2). Review Intro to USB –History –Rationale –Competitors –Serial versus parallel –Topology."

Similar presentations


Ads by Google