Hello guys.
I've got 192x64 lcd screen.
openGLCD library handles it well except contrast control.
This screen has V0, Vee inputs, related to contrast .
When I connect Vee to V0 it has max. contrast .
Right now I'm using pothentiometer with this scheme:
- Vee-----------------+
- |
- |
- V0----------------10K RV
- |
- |
- gnd-----------------+
It works fine. But I need to control it from programm.
Vee is not an input. It is an output. It is a negative voltage.
Vo is an input.
The pot is being used as an adjustable voltage divider that creates an adjustable voltage between the voltage on the two legs (Vee and GND in this case).
It is possible to create a variable voltage under s/w control, but you will have to create a low pass filter using a few extra parts like a cap and some resistors and possibly a transistor.
You will then use another Arduino pin with PWM to feed into it to adjust the charge on a capacitor which will in turn adjust the voltage between Vee and gnd or possible Vee and 5v.
You should be able to google around to find some examples of using a PWM pin to control contrast.
Here is one such link:
But this circuit will not work as is and will need some modification is it wont' work with needed the negative Vee voltage.
--- bill
Thanks to everyone. I decided not to change cotrast. I've made fixed contrast with 2 resistors.