Questions? Call us: +1 760-918-6722

Display Contrast

I have the S128240C working quite nicely now. However the characters and logo are a washed out gray and the logo is mottled. When I adjust VOLCTRL the characters fade out or if going the other direction the characters get darker but so dies the background. The background becomes streaked vertically and gets worse as the VOL is increased.
I have made changes on ANASET, modifying the osc. frequency, efficiency and the bias, followed with adjusting VOLCTRL for the best result.
I have also made changes in DISCTRL and adjusted VOLCTRL.
Nothing I have tried has improved the contrast without degrading the background.
Is there some combination of settings I have missed? Is there a change in the charge pump that will improve contrast?


Guest's picture
July 14, 2009

I think I can see a few issues that would cause the symptom you're seeing.
Could you try them out, and let me know if they are successful or not?
If this does not cure the issue, I have several other suggestions.
The following comments are based on the 1.0 lcd_example.c from a previous post of yours.
I couldn't see any *.h files, or initialization, so I've made a few educated guesses.
You may want to try the following:
1) Line 126 third parameter of DISCTRL is set to 0x10 - try 0x00 //one line per frame - I think the LCD is too large for the built-in charge-pumps to supply more than this.
2) Line 154 first parameter of the ANASET is 0x00 - try 0x01 //17.3KHz (This is probably not the issue, but it will help the refresh rate when the line rate has been reduced as above)
Please let me know how this goes!

Guest's picture
July 14, 2009

Thank you for the reply.
Sometimes it seems I am almost a jump ahead of replies. I have already made the changes you mentioned and they did help the situation, when I say it helped I mean there was a just perceptible improvement for each change. At least I was on the right track...
My *.h file contains declarations, defines, global variables, prototypes and no code. If it would help I'll upload it.
I have considered making changes to the charge pump capacitor configuration, to see if doing so makes a difference, but this is not well documented, in my eyes, even in the Sitronix data sheet. So I am trending toward the cowardly. Although, if there is a possibility this will help I will have no reluctance to modifying the circuit.
If you think of anything let me know. I appreciate the recommendations and comments.

Guest's picture
July 15, 2009

I'd suggest a four -pronged approach
1) Could you make a few voltage measurements to give a hint at where the contrast issue is located?
a) What was the pram->LCD_CONT setting you used for 'the best contrast'
b) Could you confirm that Vdd is 3.3V (i.e. the supply voltage to the LCD)
c) At 'best contrast' what is the voltage at V0in/V0out?
d) At 'best contrast' what is the voltage at VLCD?
e) What is the waveform on V0in (Vmax / Vmin / Vavg)
2) If you post the new *.c, *.h and config you're using I'll have a go at compile and link against my target
(I'd need sufficient to recreate the erroneous test image you're seeing).
3) I have a few hardware suggestions to reconcile the schematic with the Sitronix recommendations
a) Sitronix recommend a 1M bleed resistor connected from VLCD (pin 21) to Vdd
b) The 1uF boost caps (c9..c14) appear to be 7x boost configuration with a Vdd of 3.3V.
The Sitronix indicates that 7x boost can only be used for voltages up to to 2.8V (else the booster may be over voltaged).
You could try connecting C14 at C6P to Vlcd to give you the x6 boost configuration (see page 31 of the Sitronix ST529 V1.8 manual).
c) LCD pins 2..11 are N/C, Sitronix suggests connecting them to pin 20 (Vdd)
4) If you disconnect V0out from V0in you can feed a voltage directly into V0in for the contrast (15.5V is a good starting point for room temperature).
This of course removes the internal contrast adjustment (i.e. VOLCTRL will no longer work), and removes the build-in temperature compensation.
At this stage of the game you don't need to change your firmware for this change (there are a few things you can do later on to save current if you go down this path).
There are also a few other minor firmware tweaks (such as clearing all the display ram to 0x00 - even the unused areas.

Guest's picture
July 15, 2009

Again thanks for the reply. What you are suggesting makes sense. It may take me a couple days to get this testing done. I am currently attempting, along with everything else, to get one of my units to the boss, for him to start functional tests. Before I can do that I must get some additional code written and working.

I will post the results of my testing.

I am uploading the LCD code with this reply. I am unsure as to what configuration data you might need, let me know if it is missing from these files.

Guest's picture
July 15, 2009

I was able to recreate and overcome a similar problem.
Here is a quick test to see what happens
In the Put_Logo() function, replace the data written for an 'on' pixel (was 0x9f, replace with 0xff):
Charge pump x6
My functions for
Your original functions for
Logo was faint and streaked
for(j = 0 ; j < 8 ; ++j) // step through byte looking for set bits
if((l & mask) == 0x00)
TData = 0x00; // send zero
// TData = 0x80; // send bit and gray value
// TData |= 0x1F;
TData = 0xff; //***try this value - the pel data is located in bits 7..3.
l <<= 1; // shift data for next test
This gives a very crisp 100% black logo.
When I next get some time, I'll try it with more of your functions, but I thought I'd get these results to you quickly.

Guest's picture
July 15, 2009

Well I changed my charge pump to 6x and it made some improvement. The voltage on VLCD is currently 18.5V. I do not know where it was before but I imagine it was ~ 19.8V.
I changed the code to or the LCD data with 0xFF. This had a very positive effect, positive. The overall result is pleasing. I also changed the value for driving text data.
I will continue with your suggestions but things are much better.

Guest's picture
July 15, 2009

I'm glad to hear that your getting pleasing results from the LCD.
I just finished work, and took a look at the rest of the lcd-example_2:
* the Init_LCD() looks fine.
* you may want to consider two further modification to the init:
1) effectively tacking clear-lcd() to the end of Init_LCD with change to clear_lcd endingLine from 150 to 160. // ensures that all of the 255 x 160 RAM is cleared on init
2) modify the regular clear_lcd to just hit the 240 x 128 pels (rather than 255 x 160). // is a 33% saving in the CLS time when the LCD is running. ((255 x 160) - (240 x 128)) / (240 x 128)

Guest's picture
July 16, 2009

I will see if this helps. A little speed increase might help.
Thanks again.