Graphic ST7565 Negative LCD (128x64) contrast help

by ageppert on Mon Jan 28, 2013 6:39 pm

Greetings! I recently purchased and got this display up and running:

https://www.adafruit.com/products/438

Two questions are embedded below and denoted (1), and (2):

I have the display connected to an Arduino Uno, using the level shiftter provided to get to 3.3V. All is well there, and the 3.3V is also driving the Blue backlight LED. The demo code runs fine!

I am struggling with the contrast setting. As it runs now, (Adafruit library being used with Arduino IDE), the contrast is set to 0x18, and I can follow the code to see that that value is pushed to the 7565 controller in the ST765.cpp as shown here:

void ST7565::st7565_set_brightness(uint8_t val) {
st7565_command(CMD_SET_VOLUME_FIRST);
st7565_command(CMD_SET_VOLUME_SECOND | (val & 0x3f));
}

I have tried 0 to 255 as the "brightness" (actually... contrast from what I read) and I just can't get an improvement. The display content is their, but the best I can get is a dim view of it with the default 0x18. (1) Why am I not able to land a better contrast as I run through all of the possibilities? From reading the datasheet for the controller, the value is selectable between 0 and 63, so my numbers definitely take me through and beyond that range.

But the value I'm sending is AND'd with 0x3f before it is written to the register. (2) Why is that? Can I remove the & 0x3f and just use a "val" between 0 and 63?

Thanks in advance for your help.

Andy

EDIT:
I should also mention that I tried using 3.3V from a bench supply to drive the LED backlight just to make sure the 3.2V the Arduino was supplying was sufficient. It appears sufficient in both cases. However, the red LED barely turns on, but the blue and green seem to work OK. Overall, I'm wondering if this is a backlight problem because the display just isn't nearly as bright as it appears in other peoples videos and pictures. The outer border should be fairly bright regardless of the contrast setting in the main area of the display, shouldn't it?
ageppert
 
Posts: 3
Joined: Mon Jan 28, 2013 6:30 pm

Re: Graphic ST7565 Negative LCD (128x64) contrast help

by adafruit_support_bill on Tue Jan 29, 2013 5:57 am

Hexadecimal Ox3F is decimal 63, so masking with that value simply strips off any higher order bits.

Typically the red led tends to be the strongest of the three. How do you have the backlight connected? Is it connected directly or via a series resistor?
User avatar
adafruit_support_bill
 
Posts: 25597
Joined: Sat Feb 07, 2009 9:11 am

Re: Graphic ST7565 Negative LCD (128x64) contrast help

by ageppert on Tue Jan 29, 2013 5:09 pm

Ah so. As I thought about it, I could see what is going on with that masking. Thanks for clarifying that.

Backlight LEDs are currently connected directly to the 3.3V of the Uno. I also tried them connected to 5V through a 240 ohm resistor and the result was similar.
ageppert
 
Posts: 3
Joined: Mon Jan 28, 2013 6:30 pm

Re: Graphic ST7565 Negative LCD (128x64) contrast help

by adafruit_support_bill on Wed Jan 30, 2013 5:51 am

Sounds like you have a bad red led in the backlight. Contact support@adafruit.com with a link to this thread and ask for a replacement display.
User avatar
adafruit_support_bill
 
Posts: 25597
Joined: Sat Feb 07, 2009 9:11 am

Re: Graphic ST7565 Negative LCD (128x64) contrast help

by ageppert on Tue Feb 19, 2013 11:26 am

I received the replacement display and I am still struggling to get adequate brightness and contrast out of it. All of the LEDs work, and I'm using all three at 3.3V.

I have tried the full range of contrast values, and can't seem to improve on the default which is 24.

I have experimented with a range RESISTOR_RATIOs from 0 to 7. The default 6 seems to be the best.

When you created the library and tested it with this display, did you have to experiment with any other parameters to get it working properly? Maybe my expectations with respect to brightness are just too high. I was expecting to see the display clearly across a well lit office room, but it is extremely dim. If I am up close, I can see the falling fruits in the last part of the demo, but the splash screen is extremely dim, and I have yet to see the line drawing part of the demo.

Thank you again for you assistance.

Andy
ageppert
 
Posts: 3
Joined: Mon Jan 28, 2013 6:30 pm

Re: Graphic ST7565 Negative LCD (128x64) contrast help

by adafruit on Wed Feb 20, 2013 12:01 pm

LCDs like these are inherently low-contrast. OLEDs and LEDs and TFTs tend to have higher contrast.
User avatar
adafruit
 
Posts: 11511
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc