Analog Monitor Calibration
Many of you probably already are aware that LCD Monitors typically will come with an analog VGA port[1] but the typical way that LCD Monitors work is that they reference individual pixels to draw something where CRT's use a scanning electron beam to illuminate pixels. Because of the way this works LCD Monitors usually come with an "Auto" button or "Auto-calibrate" which will align the analog image to the displayable area of the monitor. But doing this with just any image won't always give you the sharpest alignment and calibration.
The method I've used for quite some time is a program that generates a black and white cross-hatch that basically makes a checkerboard of every single pixel on the screen. This makes it very easy for the auto-calibration feature of the monitor to almost exactly align the image to exact pixels. The program i use to do this is called lcdtest[2]. There are even windows binaries[3] that can be found by digging through the page, I've provided a link in the footnotes to the page I usually get them from.
The program starts and immediately draws the test pattern on the entire screen. You'll want to press w to change the color to white on black. Then you'll want to press x to change the pattern to crosshatch. Then using the - key to zoom out until it looks nearly grey. This is a good point at which you can see how well your monitor is calibrated already. If it looks very grey this is a sign that the scanning frequencies may not be exact, you might also see waves where it's clear and areas where it is blurry, these will likely go away once we're done. At this point you should use the auto-calibration feature of your monitor to calibrate the display using the crosshatch being displayed.
For those of you running more than one monitor at a time, this program will only display the pattern on the primary monitor. But never fear, there is an easy fix. Using paint or paint.net or your favorite image editing program you can create an image of the test pattern and set it as the wallpaper for the other monitors and calibrate them as well. Using Alt+PrtScn to capture only the current application's area of the screen (the test pattern) and pasting into a new image you can then save the image as a png[4] preferably as it will compress it losslessly.
Once you've saved the image simply set it as the wallpaper of your system and use tiling in the case that your other monitor is not the same dimensions as your primary monitor and then run the auto-calibration process on the remaining monitors. You'll find that this will significantly improve the quality of the image displayed on your monitors if they were improperly calibrated to begin with. But of course you could completely avoid this by switching to DVI[5]
- [W: VGA_connector] [↩]
- http://www.brouhaha.com/~eric/software/lcdtest/ [↩]
- http://code.google.com/p/lcdtest-win32/ [↩]
- [W: Portable_Network_Graphics] [↩]
- [W: Digital_Visual_Interface] [↩]
LCD Hello World!
I finally got impatient with my progress on the LCD Shield I'm designing and decided to solder the headers onto the LCD and give it a try on the breadboard, which has turned out to be a good idea. The original pin-mapping I setup in the design wouldn't have worked and I would have been very frustrated at my wasting ~$20 on getting a PCB printed. I got a lot of great help from http://www.alfonsomartone.itb.it/kwztcq.html which almost problem-for-problem outlined the same order of issues I had excluding problems #2, #4 and #8.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #define RS 11 #define RW 2 #define E 3 #define D0 4 #define D1 5 #define D2 6 #define D3 7 #define D4 14 #define D5 15 #define D6 16 #define D7 17 LiquidCrystal lcd(RS,RW,E,D0,D1,D2,D3,D4,D5,D6,D7); |
Above is what the pin-mapping ended up being. I also discovered I had no pots to use for the contrast pin on the LCD at all so that's going to have to be fixed in the future. So for the time being the contrast is a little out of whack. But I was able to get it to print the traditional "Hello World!" string as you can see in the photo. Also you'll note that I used pins 14 through 17 and you're probably scratching your head as to which pins those are. They're actually the row of pins marked as analog in, analog in 0 is 14 and can actually be used as a digital IO pin as well.
Something else that I've also noticed that I'll need to fix is that the rows seem to be written to out of order. Writing order is as follows: Row 1, Row 3, Row 2, Row 4. Which I'm sure I can fix somehow but I don't know exactly why it's doing that just yet.
I should have looked at the dimensions…
Over the weekend I ordered a 20x4 character LCD for my arduino... I should have looked a little more closely in the datasheet at the section about it's dimensions. Needless to say it's a bit larger than I had originally pictured. So the LCD Shield I've been designing has been thrown off a little bit by the size of this beast.
Looking at the picture the LCD is on the left and my arduino + battery backpack is on the right. I wasn't really planning on it being that huge, but anyway it looks like I'm going to have to heavily modify the PCB layout I've already done for it.



