08-06-2013, 11:35 AM
Universal Serial Bus
usb.pdf (Size: 399.43 KB / Downloads: 187)
• Universal Serial Bus is a new synchronous serial
protocol for low to medium speed data
transmission
• Full speed signaling 12 Mbs
• Low Speed signaling 1.5 Mbs
• Intended devices are keyboards, mice, joysticks,
speakers; other low to medium speed IO devices
Data Formatting
• Data sent in packets
• Packets will have:
– Start of Packet Sync Pattern ( 8 bits, 7 zeros + 1 one)
– Packet ID (PID) – identifies type of packet. 8 bits total, but only 4
unique bits
– Address field - 11 bits. 7 bits for USB device (so 128 possible
USB devices on bus, host is always address 0), 4 bits for internal
use by USB device .
– Frame number field (11 bits) – incremented by host
– Data Payload (up to 1023 bytes for high-speed connection)
– CRC bits - 5 bits for address field, and 16 bits for data field
– EOP strobe – single ended 0 (160ns-175 ns for high speed, 1.25 us
to 1.75 us for high speed)
• Not all packets sent over USB bus have all of these fields
(always have SOP, EOP and PID). Packet without data
field is a token packet.
Transactions
• A transaction is transfer of data between host and
USB device (function) - either Host to Function
(OUT) or Function to Host (IN)
• For IN transaction: Host transmits IN packet
– Function responds with data packet, or with NAK
packet if can’t return data, or with STALL packet if
permanently stalled
– If host receives valid DATA packet, then host returns
an ACK packet to complete transaction.
• OUT transaction is handled similarly.
More on HUBs
A HUB simply allows multiple connection point. A HUB acts as repeater (max
delay 70 ns) for all data coming from host to all connection points. Any data
coming from a connection port is sent to the ‘host’ port.
Even though the physical topology is a ‘tree’, the logic topology has the host
directly connected to all of the ‘functions’. Any packet from the host is sent to
ALL functions. Any packet from a function is sent up the tree to the host. Max
# of hops between host/function is 5.
usb.pdf (Size: 399.43 KB / Downloads: 187)
• Universal Serial Bus is a new synchronous serial
protocol for low to medium speed data
transmission
• Full speed signaling 12 Mbs
• Low Speed signaling 1.5 Mbs
• Intended devices are keyboards, mice, joysticks,
speakers; other low to medium speed IO devices
Data Formatting
• Data sent in packets
• Packets will have:
– Start of Packet Sync Pattern ( 8 bits, 7 zeros + 1 one)
– Packet ID (PID) – identifies type of packet. 8 bits total, but only 4
unique bits
– Address field - 11 bits. 7 bits for USB device (so 128 possible
USB devices on bus, host is always address 0), 4 bits for internal
use by USB device .
– Frame number field (11 bits) – incremented by host
– Data Payload (up to 1023 bytes for high-speed connection)
– CRC bits - 5 bits for address field, and 16 bits for data field
– EOP strobe – single ended 0 (160ns-175 ns for high speed, 1.25 us
to 1.75 us for high speed)
• Not all packets sent over USB bus have all of these fields
(always have SOP, EOP and PID). Packet without data
field is a token packet.
Transactions
• A transaction is transfer of data between host and
USB device (function) - either Host to Function
(OUT) or Function to Host (IN)
• For IN transaction: Host transmits IN packet
– Function responds with data packet, or with NAK
packet if can’t return data, or with STALL packet if
permanently stalled
– If host receives valid DATA packet, then host returns
an ACK packet to complete transaction.
• OUT transaction is handled similarly.
More on HUBs
A HUB simply allows multiple connection point. A HUB acts as repeater (max
delay 70 ns) for all data coming from host to all connection points. Any data
coming from a connection port is sent to the ‘host’ port.
Even though the physical topology is a ‘tree’, the logic topology has the host
directly connected to all of the ‘functions’. Any packet from the host is sent to
ALL functions. Any packet from a function is sent up the tree to the host. Max
# of hops between host/function is 5.