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?

up vote 3 down vote accepted

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.

  • Brilliant! This is exactly what I needed to get started. As you mentioned a delay loop is probably the simplest solution. Thanks – davidlgj Dec 13 '11 at 13:28

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

  • There is no harm in teaching something about the VGA spec or giving a link to a good source. – Kortuk Dec 12 '11 at 22:47
  • Thanks! I've found a couple of projects using a Arduino for VGA listed in this question – davidlgj Dec 12 '11 at 23:01
  • @kortuk I would have done if I'd had time. – Majenko Dec 13 '11 at 0:05
  • @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" – Kortuk Dec 13 '11 at 0:31

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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