SO1602A_i2c_oled

Fork of I2CLCD by Suga koubou

Files at this revision

API Documentation at this revision

Comitter:
okp_mh
Date:
Wed Jan 07 00:55:10 2015 +0000
Parent:
2:bc4583ce560e
Commit message:
SO1602A_i2c_oled

Changed in this revision

I2CLCD.cpp Show annotated file Show diff for this revision Revisions of this file
I2CLCD.h Show annotated file Show diff for this revision Revisions of this file
diff -r bc4583ce560e -r 61518c45ea07 I2CLCD.cpp
--- 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;
diff -r bc4583ce560e -r 61518c45ea07 I2CLCD.h
--- a/I2CLCD.h	Sun Feb 27 14:28:40 2011 +0000
+++ b/I2CLCD.h	Wed Jan 07 00:55:10 2015 +0000
@@ -20,7 +20,9 @@
 /**
  * @brief default I2C address
  */
-#define I2CLCD_ADDR 0x7c
+//#define I2CLCD_ADDR 0x7c
+
+#define I2CLCD_ADDR 0x78 //SO1602AWWB
 
 /**
  * @brief LCD type