Sitronix ST7032 controlled AQM1602A character LCD module to I2C adapter http://mbed.org/users/okini3939/notebook/i2c-lcd-library/

Files at this revision

API Documentation at this revision

Comitter:
stoma
Date:
Thu Feb 28 09:25:18 2019 +0000
Parent:
2:bc4583ce560e
Commit message:
change for ST7032, Sitronix LCD controller.

Changed in this revision

I2CLCD.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bc4583ce560e -r c136b753b83c I2CLCD.cpp
--- a/I2CLCD.cpp	Sun Feb 27 14:28:40 2011 +0000
+++ b/I2CLCD.cpp	Thu Feb 28 09:25:18 2019 +0000
@@ -84,17 +84,25 @@
     lcd_cfg(p_config);
 
     wait_ms(500);
-    lcd_out(0x30, 0);
+    lcd_out(0x38, 0); // 8bit bus mode, 2-line display mode 
     wait_ms(5);
-    lcd_out(0x30, 0);
+    lcd_out(0x39, 0); // extention instruction selected.
+    wait_ms(2);
+    lcd_out(0x14, 0); // int. OSC freq. set
     wait_ms(2);
-    lcd_out(0x30, 0);
+    lcd_out(0x73, 0); // Contrast set 
+    wait_ms(2);
+    lcd_out(0x56, 0); // Power/ICON/Contrast control
+    wait_ms(2);
+    lcd_out(0x6c, 0); // Follower control
+    wait_ms(300);
 
-    lcd_out(0x38, 0); // func 
-    lcd_out(0x10, 0); // shift
-    lcd_out(0x0c, 0); // display
-    lcd_out(0x06, 0); // entry mode
-    cls();
+    lcd_out(0x38, 0); // 8bit bus mode, 2-line display mode 
+    wait_ms(5);
+    lcd_out(0x01, 0); // clear display
+    wait_ms(1);
+    lcd_out(0x0c, 0); // Display on/off control
+
 }
 
 void I2CLCD::cls() {