Usb or not ?

Status
Not open for further replies.

WMXZ

Well-known member
I have the following question:
who does initiate the USB communication (enumeration?)?
does it the device as soon it gets 5V?
or is it the host as soon it sees load on 5V line?
I hunch is that it is the device, but I would like to have confirmation from someone knowledgeable.

Reason for question:
I have only 4 wires to allow the Device (T3.6) to receive power from 14V battery pack and comunicate with host (on different battery back)
T3.6 is powered with 6V (from DC/DC converter)

I could use Serial or USB for communication
Serial no issue
USB: convert 6V (VIN) to 5V (VUSB) (2 diodes ?) and have data-only (D+ , D-, GND) connection to host
USB solution only could work if device (T3.6) is initiation communication, as host will not see load on 5V.

@Paul, I know USB is complex, but ….
 
who does initiate the USB communication (enumeration?)?

The device initiates it.

Hosts and downstream ports on hubs have two 15K pulldown resistors, so both D+ and D- signals are held at 0 volts when no device is connected.

USB devices (and the upstream port of a hub) use a 1.5K pullup resistor to signal to the host (or hub) that it is present. The host provides 5V when the port is enabled. When the host detects voltage on either of its data signals, that causes it to being the enumeration process. The first 100 ms are supposed to be a "debounce" time to make sure the pullup voltage is stable, followed by a 10 ms "reset" signal (where the host pulls both data signals low), then the get descriptor queries begin...

On Teensy, this 1.5K resistor is built inside the chip and can be controlled by software. While the Teensyduino software support is designed around always leaving this resistor "on", except when uploading code, it is possible to directly access the hardware to control whether Teensy appears as a device. If you turn off the resistor, you've supposed to allow at least 10ms for the host to recognize you've disconnected. Some poorly designed hubs might need longer.
 
Status
Not open for further replies.
Back
Top