Software LED with one USB port

I want to control the LED using C # using only the USB port. I do not want to connect any other device with USB. I just want to connect the LED directly to the connectors on the USB port and program it (blink, etc.). How can i do this? I am new to hardware programming and this will be my first program.

EDIT: I can do this already (flashing LED) using printer port, by connecting one LED output to data pin, and the other to ground. How can I do the same with a USB port? My motherboard does not have a printer port. USB is the only option.

+5
source share
6 answers

It's impossible.

4 usb pins

| | | |  
| | | |  
1 2 3 4

1: +5V
2: D-
3: D+
4: Ground

To trun on LED connect with 1 and 4

The current at the data pins is too low, so the LED never turns on if it is connected using 5Vany data pins. Therefore, the LED cannot be controlled directly using the data pins on the USB port

+5
source

Many motherboards will constantly supply USB ports with current.

You could theoretically put the USB controller in some kind of paused mode and vice versa, but that's bad.

You need some kind of controller to receive commands via USB, and then some discrete elements to open / close the current from a constant USB power source and bring it to your LED.

+4
source

. , . USB- , USB-. , , , , , , USB, .

-. .

+4

( ) ...

, USB USB

+3
source

You can use the PIC microcontroller. The 18f series can directly interface with USB. You can also use the C # code and use only the USB port to control the LED. I assume that you really want to control the leader, and not just make him glow.

+2
source

If you can clear the motive for controlling the LED using USB, then it will be very useful to answer question Q:

0
source

All Articles