Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

USB: Why 127 devises?

Status
Not open for further replies.

crazymonkey

New Member
I've been doing some research on USB and have found out, many times, that, with hubs, a single host can support up to 127 devises. Does any body know how they came up with this number or if they made it up and it is possible to connect more devises to a host?


Thanks.

P.S. I am not a toatly freak that has 127 USB devises, I am just thirsty for knowledge. :twisted:
 
Hey your from sydney too!

Well this is a total guess but it seems very logical to me. Everytime you boot up your computer, it would assign that device with a 7-bit device address. each device will store its own 7-digit number for reference everytime it wants to communicate with the computer.

So before the device sends the information to the computer it sends its own 7-bit address, so the computer knows which device wants to transfer data...from there the computer verifies the device and sends out a"ready" dignal that it is ready to accept the data.

A "device adress would have seven digits to it (7-bits), each diget can either be a "1" or a "0", and therefore the number of different possible adresses that can be distributed is 127.
If it was an 8-bit address number, in theory you could have 255 devices hooked up with the usb host.
 
Yes, USB function address is represented using 7-bits, giving a total of 128 possible addresses. Address 0 is reserved for enumeration, so that leaves 127.

Cheers!
 
pike said:
If it was an 8-bit address number, in theory you could have 255 devices hooked up with the usb host.
ethernet networks use 8-bit addresses, and you can have a max of 253 devices connected to one hub (if it had that many sockets) - I assume one is reserved for this 'enumeration', and one is reserved for the hub itself, and one reserved for somthing else...leaving 253

its going off topic slightly I know, but you can't have too much knowledge!

Something I just though of is that in many computers, the USB ports are all connected to the same host, so you could have a maximum of 127 devices in total connected to all your usb ports, not 127 connected to each port.

Tim
 
grrr_arrghh said:
pike said:
If it was an 8-bit address number, in theory you could have 255 devices hooked up with the usb host.
ethernet networks use 8-bit addresses, and you can have a max of 253 devices connected to one hub (if it had that many sockets) - I assume one is reserved for this 'enumeration', and one is reserved for the hub itself, and one reserved for somthing else...leaving 253

its going off topic slightly I know, but you can't have too much knowledge!

Something I just though of is that in many computers, the USB ports are all connected to the same host, so you could have a maximum of 127 devices in total connected to all your usb ports, not 127 connected to each port.

Tim

No, you can have 127 devices connected to 1 usb controller, typically 1 controller controls 2 ports.
So if you have 4 usb ports, then it's likely you have 2 controllers and you can connect 254 devices...

special exceptions excluded...
 
No, you can have 127 devices connected to 1 usb controller, typically 1 controller controls 2 ports.
ah, yes, that makes more sense. I looked it up in my mobo manual, and it seems ports one and two are on controller 1, but ports 3,4,5 and 6 (5 and 6 are extra 'plug-in' ones) are all on controller 2.
 
Ethernet uses 8-bit addressing. One address is reserved for multicast(*.*.*.0). One is reserved for broadcast(*.*.*.255). That leaves 253 address possible, depending on how you subnet, the class it is (A, B or C) and if it is or not a private IP.

--mindctrl
 
After hearing/reading some of the responses on this subject, my geuss seems very inadequate...but here it is anyway. Have you ever noticed that with IP addresse their maximum number goes up to 255, this number is seen everywhere: some games have a maximum stat/character level of 255, and recurrs throughout the digital world.
I read somewhere a long time ago that this number is based on things called 'octets', i don't know what these are but common knowledge would suggest that the 'oct' part suggests eight...duh. I had always assumed that the muli-plexing circuitry used to serialise a USB port operates with eight channels, and each channel has a 32 bit time share of the 255 amount/bit time that the USB ports communicate at before the process repeats. So in conclusion, i think that the amount of peripherals hooked up to a USB port/hub at any one time is determined by the standard 255 bit time cycle.
 
After hearing/reading some of the responses on this subject, my geuss seems very inadequate...but here it is anyway. Have you ever noticed that with IP addresse their maximum number goes up to 255, this number is seen everywhere: some games have a maximum stat/character level of 255, and recurrs throughout the digital world.
I read somewhere a long time ago that this number is based on things called 'octets', i don't know what these are but common knowledge would suggest that the 'oct' part suggests eight...duh. I had always assumed that the muli-plexing circuitry used to serialise a USB port operates with eight channels, and each channel has a 32 bit time share of the 255 amount/bit time that the USB ports communicate at before the process repeats. So in conclusion, i think that the amount of peripherals hooked up to a USB port/hub at any one time is determined by the standard 255 bit time cycle.
 
After hearing/reading some of the responses on this subject, my geuss seems very inadequate...but here it is anyway. Have you ever noticed that with IP addresse their maximum number goes up to 255, this number is seen everywhere: some games have a maximum stat/character level of 255, and recurrs throughout the digital world.
I read somewhere a long time ago that this number is based on things called 'octets', i don't know what these are but common knowledge would suggest that the 'oct' part suggests eight...duh. I had always assumed that the muli-plexing circuitry used to serialise a USB port operates with eight channels, and each channel has a 32 bit time share of the 255 amount/bit time that the USB ports communicate at before the process repeats. So in conclusion, i think that the amount of peripherals hooked up to a USB port/hub at any one time is determined by the standard 255 bit time cycle.
 
After hearing/reading some of the responses on this subject, my geuss seems very inadequate...but here it is anyway. Have you ever noticed that with IP addresse their maximum number goes up to 255, this number is seen everywhere: some games have a maximum stat/character level of 255, and recurrs throughout the digital world.
I read somewhere a long time ago that this number is based on things called 'octets', i don't know what these are but common knowledge would suggest that the 'oct' part suggests eight...duh. I had always assumed that the muli-plexing circuitry used to serialise a USB port operates with eight channels, and each channel has a 32 bit time share of the 255 amount/bit time that the USB ports communicate at before the process repeats. So in conclusion, i think that the amount of peripherals hooked up to a USB port/hub at any one time is determined by the standard 255 bit time cycle.
 
The number 255 always pops up because it is the highest value that can be represented by an 8-bit (or byte). In the digital world, everything is base-2 instead of base-10. If 10-bits can represent 1024 numbers, then it would be a waste to use only the first 1000 numbers.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top