Well, we certainly seem to have opened the floodgates with our discussions on USB...
Good Grief Caruthers! My original musings on USB have spawned a wealth of discussions and folks are providing all sorts of arcane USB-related knowledge (see blogs #210200029, #210201213, and #210201262).
Continuing this turbulent tale, I just heard from Mike Kentley, a USB consultant and instructor with Mindshare Inc. Mike is presenting a hands-on USB workshop for Mindshare in October (bounce over to their website for more details). Anyway, Mike's message was as follows:
Hi Max. I don't know if this has been addressed yet, so here's my $0.02. I do USB for a living and this type of question comes up a lot.
With regard to the reader's comments in your previous blog, I don't think USB was ever planned as a "daisy-chained" system. It's certainly possible to do, but the thinking was really focused on "Desktop Peripherals". USB was designed to provide an "outside the box" interconnect where you could do the type of stuff you could do with ISA or PCI cards – without opening the box. It was designed to be as cheap as possible so consumers would buy lots of USB devices, and the end user experience was paramount (think of grandma plugging in stuff and "it just works"). The whole idea was to make a consumer friendly interconnect.
Daisy-chaining devices was one option for connecting things. You could put a hub in the keyboard to connect additional devices. You could put one in the monitor. You could even build one into your desk. The hot idea in 1998 was for something called "Device Bay" where you would have USB and/or firewire sticking out of a box built into your house or desk, and that would connect to your PC with either the USB or the firewire port, and you would stuff drives, NIC's or other peripherals into the
"Device Bay". All talk of that seems to have vanished by 2000.
Here's the problem with daisy-chaining USB peripherals – USB only allows hubs to be stacked 5 deep. It's not an arbitrary limit. USB is a half-duplex bus, and to manage sharing of the cable, the host and device need to be able to send a packet and give up after a while if there's no response. How long is "a while"? It's based on the round-trip flight time of bits on the wire to the furthest possible distance (5 hubs and 6 segments of cable). If you try to connect hubs more than 5 deep, the PC will not let you. It will give you an error message. If USB allowed longer delays for peripherals further down the line, then you leave a lot of dead-time on the bus which hurts performance.
If you had every USB peripheral include a hub, then it would be easy to string devices together more than 5 deep, which I guess creates a usability issue and a cost issue (about $2 worth of extra hardware and
firmware in the USB device) . There's nothing stopping you from embedding a hub into any device – they're called compound USB devices – but it's that darned usability issue. If you put your printer at the end of 5 hubs, and it includes a hub, how does Joe User know that he can't plug a flash drive into it because it's too far away? You can build it, but you have to deal with the usability issue.
Why is USB half-duplex? It's cheap. It's cheaper to have one pair of wires in the cable than two pairs. It's also a pain in the butt for a number of reasons, but it was the simplest way to meet the design goals for USB, which did not need to have hubs stacked N-deep. If you need a network to connect stuff all over the house, use a USB to network bridge. That's the correct way to solve a networking problem. If you need to connect "desktop peripherals", then use a USB peripheral. If you need high-performance, high-speed communication with peer-to-peer networking and peripherals scattered all over the place and so on and so forth, then you have to start looking at Firewire, Ethernet, PCI Express etc.
I hope this helps. Mike Kentley
Well, that's certainly sated my curiosity (grin). I await the next episode in this on-going USB mini-series in dread anticipation. Until next time, have a good one!
Questions? Comments? Feel free to email me – Clive "Max" Maxfield – at email@example.com). And, of course, if you haven't already done so, don't forget to Sign Up for our weekly Programmable Logic DesignLine Newsletter.