5
\$\begingroup\$

I'd like to make a simple board to plugin a LCD monitor and get a blank white screen. The idea is to use any monitor as a makeshift light table. I have a preference for 8-bit AVR micros since I have a couple laying around.

So what is the simplest way to generate a VGA signal for just a white screen?

\$\endgroup\$
1
  • \$\begingroup\$ For what it's worth, I discovered after replacing the backlight in a dead LCD monitor with an independent LED strip, that the LCD panel itself defaults to all-white when the monitor is turned off. (slowly drifts there over several seconds) Of course to make that work, you need a way to have the backlight on while the panel is off, which is probably not going to happen with an unmodified monitor. \$\endgroup\$
    – AaronD
    Commented May 4, 2021 at 17:04

3 Answers 3

3
\$\begingroup\$

In actuality, you will likely need to switch the R, G, and B lines as well as the HSYNC and VSYNC. Most monitors will not continue to display those colors if a steady DC voltage is present on their inputs. Instead, they usually respond to the difference between the voltage present when the scanning is "off screen" and that present when scanning the intended display area. You might find an odd monitor that would respond to DC, but it's atypical.

Since you want monochrome you can of course drive all three together. A resistive voltage divider is the usual way of creating the right voltage levels.

So basically, you will need to generate a sequence of pulses on HYSYNC, RGB, and VSYNC, with moderately precise delays in between. None of the events really overlap, so this is quite feasible. Your program will probably consist of a for loop producing the desired number of horizontal lines with a sequence of hysnc and RGB turn on-wait-turnoff actions, inside an infinite while loop that drives the vsync to produce full screens. Many monitor manuals would show timing diagrams; often even the manual for a different monitor than you are using would be applicable at least for a suitable resolution/vertical refresh rate.

You could use the hardware timers to generate timing, but since it doesn't sound like you need your micro to do anything else, you could also use a delay loop.

Traditionally a video card generates all it's timing as a multiple of a multi-MHz dot clock, using a programmable counter to count each state as some number of dot clocks and read through the frame buffer. But since you aren't trying to produce any narrow features, you can probably just use a delay loop for whatever the shortest event is (likely the hysnc pulse), and define all the longer events in multiples of that or with their own delay loops if they are not close to an integer multiple thereof.

Access to an oscilloscope would certain simplify the task of getting your implementation right, though it's not an absolute requirement. A monitor will likely generate "something" even with the timing rather off, and you can then "walk" it into position by changing the delays.

It's worth mentioning two things about monitor technologies; CRT's may not be real happy being driven at unusual scanning frequencies and the magnetics may audibly complain; theoretically they could even be damaged. LCD's are pretty tolerant, but go out of their way to adapt to whatever you feed them and make the most of it with their rescaling circuitry. You may find yourself hitting the re-adjust button frequently as you change your timings. I suppose it's also possible that they could fail to adapt to a signal that generates a big rectangle with no high frequency content that they could use to try to align their sampling rate with your non-existent dot-clock in order to sharply display fine text or graphics features that you aren't generating. If using a CRT with an all white display you will definitely want to get the vertical sync rate as high as you can with valid timings to avoid flicker (picking relatively few vertical lines may help with that, since the constraint is often the maximum horizontal frequency the monitor can handle); for an LCD it's not directly an issue so people usually time things to 60Hz.

\$\endgroup\$
1
  • \$\begingroup\$ Brilliant! This is exactly what I needed to get started. As you mentioned a delay loop is probably the simplest solution. Thanks \$\endgroup\$
    – davidlgj
    Commented Dec 13, 2011 at 13:28
4
\$\begingroup\$

Tie the R,G and B lines of a VGA socket to 0.7V (you can use the voltage drop of diodes for this).

Then connect the VSYNC and HSYNC to output lines of a microcontroller.

These two outputs need to be pulsed at the right speed to fake a VGA signal - they are standard TTL-esque signals.

I'll let you do some reading up of the VGA spec to find the right timings for these signals*

*I am out of time but I will add some more information later when I have time about the VGA spec

\$\endgroup\$
4
  • \$\begingroup\$ There is no harm in teaching something about the VGA spec or giving a link to a good source. \$\endgroup\$
    – Kortuk
    Commented Dec 12, 2011 at 22:47
  • \$\begingroup\$ Thanks! I've found a couple of projects using a Arduino for VGA listed in this question \$\endgroup\$
    – davidlgj
    Commented Dec 12, 2011 at 23:01
  • \$\begingroup\$ @kortuk I would have done if I'd had time. \$\endgroup\$
    – Majenko
    Commented Dec 13, 2011 at 0:05
  • \$\begingroup\$ @Majenko, I would suggest the line, "I am out of time but I will add some more information later when I have time about the VGA spec" \$\endgroup\$
    – Kortuk
    Commented Dec 13, 2011 at 0:31
0
\$\begingroup\$

Take a look at these projects:

http://www.serasidis.gr/circuits/AVR_VGA/avr_vga.htm
http://www.lucidscience.com/pro-vga%20video%20generator-1.aspx
http://www.thebackend.de/dokuwiki/doku.php?id=microcontroller:dmm_vga
http://tinyvga.com/avr-sdram-vga
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.