Rod Coleman / I2CTextLCD
Revision:
6:bc76b6a20bfb
Parent:
5:4a4cea387d8e
Child:
7:dd2dcba75885
--- a/I2CTextLCD.cpp	Sat Aug 27 09:50:50 2011 +0000
+++ b/I2CTextLCD.cpp	Wed Nov 23 08:17:39 2011 +0000
@@ -45,34 +45,34 @@
     _backlight=backlight;
     //_i2c.frequency(70000);
  // Winstar 20x4 WH2004-NYG- needs 40ms after VDD> 4,5V
-     wait(0.05);
+     wait(0.5);
 // send "Display Settings" 3 times (Only top nibble of 0x30 as we've got 4-bit bus)
 for (int i=0; i<3; i++) {
 //     writeCommand(0x3); //send 3 times mode
       wait(0.00164);      // this command takes 1.64ms, so wait for it
     }
     writeCommand(0x2); // 4-bit mode
-    wait(0.01);
+    wait(0.05);
 //    writeCommand(0x2); // 4-bit mode
 
     writeCommand(0x28);    // Function set 001 BW N F - -
-    wait(0.01);
+    wait(0.05);
 //    writeCommand(0x28);    // Function set 001 BW N F
-    wait(0.01);
+    wait(0.05);
     writeCommand(0x0C); // ON-OFF ctrl: turns display ON, no cursor. Use 0x0E for cursor ON.
     /* 0x28 also works for Winstar WEH002004ALPP5N00000 OLED display. 0x29= westEuro fon table, 0x2A = UK/Russian
 */
     // Added RC 2011-8-11
-    writeCommand(0x01); // clear display RAM all to 00
+    writeCommand(0x05); // clear display RAM all to 00
     wait(0.05);        // 6.2ms specified for OLED display to recover from RAM clear
     
     writeCommand(0x06);  //  Entry mode Set. Cursor Direction and Display Shift : 0000 01 CD S (CD 0-left, 1-right S(hift) 0-no, 1-yes
-    wait(0.01); 
+    wait(0.05); 
    writeCommand(0x14);  // OLED display shift disable etc
-    wait(0.01);
+    wait(0.05);
     writeCommand(0x17);  // disable graphic mode, power ON
     //cls();
-    wait(0.01);
+    wait(0.05);
     writeCommand (0x01);  //clear entire display.
     wait(0.07);