Simple 2-port USB 2.0 Hub

Thread Starter

fkento

Joined Jul 9, 2012
5
I am trying to build a 2-port USB 2.0 Hub. I found a Cypress Chip that I think will do the trick.

Cypress TUSB2036VFR

Is it just as simple as connecting the Power, GND, D- and D+ lines to the upstream and downstream ports? Or do I need any resistors to connect to the other lines? This will be integrated into another project so the downstream devices will the hard wired in. The hub will be bus-powered. Any advice will be appreciated.

Thanks
Kent
 

Thread Starter

fkento

Joined Jul 9, 2012
5
Yes but I am a newbie. When it says a pin needs to be pulled high or low what does that mean? I assume pulled low means connected to ground? What does pulled high mean? Connected to +3.3v? Do I need pull-up or pull-down resistors? Is "pulled to logic 1" the same as pulled high?

I think I need to pull down pin 8 (BUSPWR) to enable bus-powered mode. Also, for 2 downstream ports, pin 24 (NP3) needs to be pulled high. Pins 22 & 23 (NPINT1-0) need to be pulled high to indicate permanently attached devices.

Now I am uncertain about what to do with the following pins

Pin 4 (RESET)
Pin 31 (MODE)
Pin 21 (OCPROT)

Thanks
Kent
 

agesome

Joined Jul 5, 2012
15
There is a typical application circuit on page 9 of the datasheet.
Your understanding of pulling up/down is correct, there is also the wikipedia article.

Datasheet is your friend.
RESET is an active low TTL input with hysteresis and must be asserted at power up. When RESET is asserted, all logic is initialized. Generally, a reset with a pulse width between 100 μs and 1 ms is recommended after 3.3-V
VCC reaches its 90%. Clock signal has to be active during the last 60 μs of the reset window.
Which means you have to pull it down for the specified amount of time after the supply voltage is stable. Power-on reset devices can be used for this. They are cheap, small and ensure your IC doesn't attempt to work under low voltage, which can be bad.

My understanding of the MODE pin is limited. I see it as this: when MODE is pulled low, a 6 MHz crystal is expected between XTAL1 and XTAL2 (see below typical application circuit); when MODE is high, a 48 MHz signal is expected on XTAL1.
Those with better understanding, correct me if I'm wrong.

Now to pin 21, OCPROT. Since you previously tied BUSPWR down, your hub is now bus-powered (drawing power from the host). The footnote under pin description table states that when OCPROT is pulled low, the host assumes that you have overcurrent protection; when OCPROT is high, that indicates no overcurrent protection on your device.

FYI, USB standard defines maximum current drawn from host; 500 mA for USB 2.0, for example. That is what one needs overcurrent protection for.
I have no idea what behavior is expected from the host and the device with present/absent protection, as in I didn't read the USB standard, sorry.

But, in my experience USB ports would get shut off by the OS when their VCC and GND got shorted (thus consuming too much current), and googling for "usb over current protection" turns up a lot of ICs for that.
So apparently you can either deal with it yourself or let the host handle it.
 
Top