Can we attach LED to VGA port and make it light up, the same way we do in Parallel Port?

This is probably a better pinout

The video and sync signals are 0-1V and not under software control; they're connected to the video hardware output of your card. You might be able to put the card into "power saving" mode and turn them off altogether, but you don't have the fine-grained control that is possible with the parallel port.

There's also a 5V signal, and the I2C signalling used for "EDID" monitor detection (this allows the computer to know which resolutions are acceptable). It might be possible to access that more directly from software, and likewise it might be possible to turn the 5V off by disabling the card or putting it into power saving mode.

Anything that you do discover will depend on the model and drivers for your video card.

Note that, given the ability to toggle a pin at a high enough rate, you can do the reverse: generate video from something that is not a video output.

It's also possible to use the video card to output an RF signal: http://bellard.org/dvbt/


If I remember correctly, the VGA sync outputs switch polarity to instruct antiquated monitors to switch their vertical refresh rates. Thus, each sync wire will be high most of the time in some modes and low most of the time in others. When using a newer monitor with a vintage VGA card, it would probably be possible to change the sync polarity as a means of controlling an LED; newer monitors probably wouldn't care about the sync polarity, though switching it might cause a momentary display glitch.

Alternatively, one could probably construct a circuit using a 556 or similar dual timer, a fast analog comparator, and a 74HC74 or similar dual flip-flop, to latch the state of a particular region of the screen. One of the timers should be set for a delay of around 2-12ms triggered by vertical sync, and one should be set for a delay of 20us or so triggered by the horizontal sync. The second timer should trigger one latch to capture the state of the first timer, and output of that latch should trigger the second latch, which should capture the state of the comparator, which should check the voltage on the R, G, or B pins.

The net effect of the circuit would be to have the state of the LED indicate whether the brightness of a particular "pixel" was higher or lower than a certain threshold. By adjusting the timers, one could control which pixel was output. For reliability, one would probably have to display a rather large rectangle rather than a single pixel, but this approach could easily be extended to work with dozens or hundreds of LEDs.

Tags:

Led

Vga