Permalink
Browse files

My screen stopped working correctly without setting the Electronic Vo…

…lume.
  • Loading branch information...
lgeek committed Feb 8, 2011
1 parent 0bfe389 commit 09981c550cd03ba8d45adb1c75828fc2714c9333
Showing with 10 additions and 1 deletion.
  1. +10 −1 Hardware.cpp
View
@@ -80,7 +80,7 @@ void ColorLCD::LCDInit()
sendData(0b00011); // 2 divisions, Field swithcing period (no idea)
sendData(32); // 132 lines to be display
sendData(12); // Inversely hightlighted lines - 1 (no idea)
- sendData(1); // Dispersion (again, no idea what's that)
+ sendData(2); // Dispersion (again, no idea what's that)
// Set common output scan direction
sendCommand(COMSCN);
@@ -106,6 +106,15 @@ void ColorLCD::LCDInit()
sendData(0b00000000); // RGB mode for the LCD panel
sendData(0b00000001); // Grayscale mode
+ // Got voltage control values from http://www.sparkfun.com/tutorial/Nokia%206100%20LCD%20Display%20Driver.pdf
+ // Voltage control (contrast setting)
+ sendCommand(VOLCTR);
+ sendData(36);
+ // P1 = 32 volume value (adjust this setting for your display 0 .. 63)
+ sendData(3);
+ // P2 = 3 resistance ratio (determined by experiment)
+
+
// Set color lookup table for 256 grayscale mode
sendCommand(RGBSET8);
// Red

1 comment on commit 09981c5

Owner

lgeek commented on 09981c5 Feb 8, 2011

To be honest, I'm slightly confused about how could this happen but well... it works now.

Please sign in to comment.