heya- i have an application where i have two custom usb devices- a host and a device. i am self-taught, so apologies if my terminology is flawed.
the usb device attaches to the usb host via 3 pins (d+, d-, gnd) of an 8 pin connector, and works great. both devices are self-powered.
however- currently, in my usb device, i am using a resistor (from Vcc) to give 5v to the microcontroller's usb bus-detection pin, because i don't have access to the usb interface 5v line to truly detect bus, and i don't have the capability of adding an extra pin for the 5v.
my question is whether it is possible to generate a reference voltage from the two usb data lines?
i wondered whether i could create a parasitic voltage, for example a schottky diode from each usb data line, into a cap, then to the bus pin? would this work, since all it has to do is keep the microcontroller input capacitor full? is there a better way?
thanks!