SO1602A_i2c_oled

Fork of I2CLCD by Suga koubou

Revision:
3:61518c45ea07
Parent:
2:bc4583ce560e
--- a/I2CLCD.cpp	Sun Feb 27 14:28:40 2011 +0000
+++ b/I2CLCD.cpp	Wed Jan 07 00:55:10 2015 +0000
@@ -80,6 +80,7 @@
 
     i2caddr = p_i2caddr;
     type = p_type;
+    
 
     lcd_cfg(p_config);
 
@@ -109,6 +110,8 @@
     x = col;
     y = row;
     lcd_out(address(x, y), 0);
+    //oled_out(0x00+x+y*0x20+0x80,0);  
+    //lcd_out(0x00+x+y*0x20+0x80,0);
 }
 
 int I2CLCD::address(int col, int row) {
@@ -129,8 +132,11 @@
             }
         case LCD16x2B:
             return 0x80 + (row * 40) + col;
+            
         case LCD8x2:
         case LCD16x2:
+            return 0x00+col+row*0x20+0x80;  //typeはLCD16x2になるのでここにSO1602A用に「return 0x00+col+row*0x20+0x80;」を追加する。
+                                            //ここを記入しないと「i2clcd.locate(6,1);」2行目が表示されない。
         case LCD20x2:
         default:
             return 0x80 + (row * 0x40) + col;