Friday, February 12, 2010

How to control the output of electricity to a usb using c++ java or other language?

Im setting up a fiber optics light show in my room and have written a program in c++ with buttons etc to turn on off dim etc but i am wondering how i can control how much electricity is given to the usb by the computer to power the led's. Any ideas? or is this just unfeasible?How to control the output of electricity to a usb using c++ java or other language?
The USB port has a fixed power output. There is no way to change the voltage.





Next problem is the USB port is a serial I/O port. You can't directly manipulate the on or off time. This is controlled by the USB interface controller.





Go here for the USB specifications:


http://www.usb.org/home





If you really want to connect something to the USB port, you'll need a USB interface chip to handle the communications in addition to any other electronics that you may need to drive the electronics you want to use.





In the middle of all this, you'll need to develop a USB device driver for your USB device. The last time I tried to do this, I spent a lot of time just chasing down SDK's and other related software and compilers that I didn't have. I ended up modifying the USB device rather than make my own software because I couldn't find some of the software I needed without paying for it. It was much cheaper to just modify the hardware. You'll spend a lot of time searching Microsoft for various tools and SDK's unless you go with Linux. Linux would be the easier route and all the tools and source code will be available.





If you go to Win98/95 and boot to DOS or get an old copy of DOS, you could directly manipulate the printer port. For a PC, this might be the better solution. You'd still have to build the hardware for storage registers and actually control your stuff.





Another alternative would be to buy a special interface board. I'm sure they make something like this or you can find something that would work. I have no idea what the cost might be.





Good luck on your project. As another answerer has already noted, you don't appear to have the technical skills needed to even understand what you are asking.





Shadow WolfHow to control the output of electricity to a usb using c++ java or other language?
How much electricity is given to USB? As a person that took a university Physics course, I can say that it doesn't make any sense.
I don't think you can vary the power, I think you can only turn it on and off.
  • natural hair
  • No comments:

    Post a Comment