• AVR Freaks

USB DEVICE AS HOST

Author
kittu
Starting Member
  • Total Posts : 37
  • Reward points : 0
  • Joined: 2009/11/24 02:14:32
  • Location: INDIA
  • Status: offline
2010/06/28 01:56:53 (permalink)
0

USB DEVICE AS HOST

HI..
 
I AM WORKING WITH MULTIPLE USB DEVICES
 
I HAVE QUARY ABOUT THE USB
 
1. ACCORDING TO THEORY OF USB WE CONNECT 127 DEVICE TO ONE USB PORT THROUGH HUBS
     NOW THE QUESTION IS THAT HOW THE 2ND DEVICE SHOULD BE IDENTIFYED BY HOST
      BCAUSE D+/D- LINE IS ALREADY PULLED HIGH (HIGH SPEED/LOW SPEED USB) WITHEN ENUMRATION WITH 1ST DEVICE,
      THEN HOW HOST CAN IDETIFY THE 2 ND DEVICE AS D+/D- LINE IS ALREADY HIGH
 
2. WHEN WE USE ANY MICROCOTROLLER AS HOST THEN HOW WE ATTACHED MULTIPLE DEVICE
     TO THAT HOST MICROCONTROLLER IF HOST CONTROLLER HAVE SINGLE CHANNEL USB(127 DEVICE TO ONE USB PORT)
 
HOW THIS COMMUNICATION SHOULD TAKE PLACE?
 
THANK YOU
 
#1

2 Replies Related Threads

    crosland
    Super Member
    • Total Posts : 1575
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Bucks, UK
    • Status: offline
    Re:USB DEVICE AS HOST 2010/06/28 07:16:24 (permalink)
    0
    kittu
    1. ACCORDING TO THEORY OF USB WE CONNECT 127 DEVICE TO ONE USB PORT THROUGH HUBS
         NOW THE QUESTION IS THAT HOW THE 2ND DEVICE SHOULD BE IDENTIFYED BY HOST
          BCAUSE D+/D- LINE IS ALREADY PULLED HIGH (HIGH SPEED/LOW SPEED USB) WITHEN ENUMRATION WITH 1ST DEVICE,
          THEN HOW HOST CAN IDETIFY THE 2 ND DEVICE AS D+/D- LINE IS ALREADY HIGH

    You answered your own question: use hubs. Each device has it's own cable to the hub. Each device is connected to a unique D=/D- pair.

     
    2. WHEN WE USE ANY MICROCOTROLLER AS HOST THEN HOW WE ATTACHED MULTIPLE DEVICE
         TO THAT HOST MICROCONTROLLER IF HOST CONTROLLER HAVE SINGLE CHANNEL USB(127 DEVICE TO ONE USB PORT)
     
    HOW THIS COMMUNICATION SHOULD TAKE PLACE?


    Again, via hub(s).

    Andrew Crosland


    #2
    chinzei
    Super Member
    • Total Posts : 2250
    • Reward points : 0
    • Joined: 2003/11/07 12:39:02
    • Location: Tokyo, Japan
    • Status: offline
    Re:USB DEVICE AS HOST 2010/06/28 13:57:32 (permalink)
    0
    kittu
      1. ACCORDING TO THEORY OF USB WE CONNECT 127 DEVICE TO ONE USB PORT THROUGH HUBS
         NOW THE QUESTION IS THAT HOW THE 2ND DEVICE SHOULD BE IDENTIFYED BY HOST
          BCAUSE D+/D- LINE IS ALREADY PULLED HIGH (HIGH SPEED/LOW SPEED USB) WITHEN ENUMRATION WITH 1ST DEVICE,
          THEN HOW HOST CAN IDETIFY THE 2 ND DEVICE AS D+/D- LINE IS ALREADY HIGH

    Hub is not just a wired connection of ports. Each downstream port is equipped a bi-directional buffer for D+/D-, to isolate each port. Also, hub is a USB device to co-operate with host.
    1) Just when a device is plugged in to a hub port, the bi-directional buffer is disabled. The device is isolated from the bus.

    2) Hub detects D+ (or D-) voltage change on the port. It notifies the change to the host over hub's interrupt IN endpoint. (or host polls status change periodically using Get_Port_Status request to the hub, depending on the host stack implementation.) Host confirms the port connection by Get_Port_Status request (C_PORT_CONNECTION), and drops the flag using Clear_Port_Feature(C_PORT_CONNECTION)

    3) Host waits for 100 ms or more, to give the device connection delay, defined in the USB 2.0 spec (Figure 7-29, delta T3).

    4) Host sends Set_Port_Feature( PORT_RESET ) to the hub for the target port. The hub starts bus reset on the port. With this bus reset, the device sets its address to 0.

    5) At the end of bus reset period, the hub enables the bi-directional buffer of the port. The device connects to the bus at this point. Hub notifies the end of bus reset over the hub's interrupt IN endpoint, or host polls it using repeated Get_Port_Status request (C_PORT_RESET). Host drops this flag by Clear_Port_Feature( C_PORT_RESET )

    6) Host continues enumeration of the device (Get_Descriptor( DEVICE ), Set_Address, ...), as if the device directly connects to the host port.

    Above sequence is based on MacOS X. Windows sequence is more unrefined.

    Tsuneo

    post edited by chinzei - 2010/06/28 16:10:23
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5