I?ve bought a 2x16 LCD with blue background and white characters.
I?ve done several LCD?s and non had any problem, but this LCD does. I used the following scheme as I always do:
When I sit in front of the LCD is see nothing, just 2 white lines with blocks, but when I look from an angle I see the text. Is this a contrast problem, and if, how can I fix this.
This is probably caused by the contrast being too high. The Ice Hardware circuit you posted does not have any control over the contrast - it just locks it to maximum. The circuit works fine for some LCDs, but the contrast is too dark on others. It's too dark on my LCD, which happens to be from Maplin like the Ice Hardware ones. As you've discovered, the contrast setting depends on the viewing angle.
You need to add a resistor (or variable resistor) in the circuit between pin 3 on the LCD and ground. Take a look at the circuits on the Smartie wiring page to see how it's done (the component marked "10K" is the variable resistor). This allows you to adjust the contrast between very faint and very dark (solid blocks).
thanks for the reply!
which resistor (value) do I need if I want to use a solid one?
How can I control the contrast with LCD smartie? which circuit do I need then?
The correct resistor value depends on the exact specs of the LCD, the supply voltage, viewing angle and temperature, so it's a bit of trial and error to find a fixed resistor value. At the moment, your circuit effectively has a zero ohm resistor (wire link between LCD pin 3 and ground). You can try values around 1000 ohms to start with. If that's too faint (low contrast), try a smaller value. If it's still too dark (high contrast), try a larger value. Small 0.25 watt resistors will be fine.
It's generally better to use a variable resistor as shown on the Smartie circuits page so you can set the contrast to whatever you need. Usually a 10k ohm (10000 ohms) variable resistor is shown, but any value between about 4700 ohms and 22k ohms will be fine. You may find that the useful adjustment range is all at one end of the resistor rotation. If so, disconnect the +5V end of the variable resistor. You can use any size variable resistor you can get - trimmer (preset) types are small and can be hidden inside the parallel port connector shell. Usually you don't need to change the contrast setting once you've got it adjusted.
It's much more difficult to make the contrast software-controlled. For this, you need to have a microcontroller-based LCD interface, like Matrix Orbital use. There is no easy way to directly control the contrast with a standard HD44780 type LCD module like you have. It's possible to switch the backlight on and off with the parallel port connection, but you will have to modify the circuit to be like the ones on the Smartie wiring page that have backlight control.