I'm creating a project with lcd.

I create a control for my wife's yogurt incubator, nothing fancy, basic dallas temp prob + lcd + relay.
I already had a working version that was my first Arduino project ...and electronic project
I found this great post ....

And had it all wired up and working well on both my arduino duemilanove and on my home made arduino duemilanove.
Since I wanted to have only the Tmega328 omn aboard (with the few extra parts) I soldered it all on a pcb (diy) and when I tried to get it to work for the first time it went CRAZY ... flickering and so on .. to the level it lost the bootloader ...
So I started to de-bug and since I'm new to all of this it took me a while,
Making a long story short I found this post back at the end of the above post
"This will eventually damage the Arduino. You need a resistor on the contrast circuit otherwise every time the Arduino drives the pin low, it is shorting that cap to ground. Inrush current into the AVR will be large (but brief). Eventually that port pin will likely die"
So I ended up cutting the capacitor out and soldering a 4.7k resistor the ground, placing the background at nice readable but not to bright state.
So my Q' is

  1. is the resistor is the right answer ?
  2. if so can some one (pretty please) show me in a drawing how it should be connected (I'm new .. but I learn fast from examples ..) and what should be the value of that resistor.

Once I get the project done (maybe be even with the contrast feature) I will post it on the exhibition part of the forum.

thanks in advance.
Tal.

Making a long story short I found this post back at the end of the above post
"This will eventually damage the Arduino. You need a resistor on the contrast circuit otherwise every time the Arduino drives the pin low, it is shorting that cap to ground. Inrush current into the AVR will be large (but brief). Eventually that port pin will likely die"

It seems to me that the the author should have corrected the material in the article rather than just acknowledging the error.

So I ended up cutting the capacitor out and soldering a 4.7k resistor the ground, placing the background at nice readable but not to bright state.
So my Q' is

  1. is the resistor is the right answer ?
  2. if so can some one (pretty please) show me in a drawing how it should be connected (I'm new .. but I learn fast from examples ..) and what should be the value of that resistor.

If you don't need or want the adjustable contrast feature then the 'correct' way to deal with the contrast is to use a potentiometer. The end terminals are connected to +5 and GND and the variable center connector goes to pin 3.

Many LCDs work acceptably with pin 3 connected to GND which is essentially what you are doing with your 4.7K resistor (as a pull-down resistor).

Don

Thank for your reply Don,

I know that using a potentiometer is an option. this is how must of the examples are drawns.
Just wondered if there IS a way to do it in code, rather then a potentiometer.. that was my Q :slight_smile: