Simple libary for AQM1602XA I2C Character LCD.

Files at this revision

API Documentation at this revision

Comitter:
takashiyamanoue
Date:
Tue Jun 02 01:39:26 2020 +0000
Parent:
0:933748ca1307
Commit message:
20200602 aqm1602xa

Changed in this revision

AQM1602XA.cpp Show annotated file Show diff for this revision Revisions of this file
AQM1602XA.h Show annotated file Show diff for this revision Revisions of this file
--- a/AQM1602XA.cpp	Sun Apr 24 11:50:38 2016 +0000
+++ b/AQM1602XA.cpp	Tue Jun 02 01:39:26 2020 +0000
@@ -35,6 +35,9 @@
     int len = strlen(str);
     if(len > 16)
         len = 16;
+    if(row == 0) {
+        writeCommand(0x80);
+    }
     if(row == 1) {
         writeCommand(0x40 + 0x80);
     }
--- a/AQM1602XA.h	Sun Apr 24 11:50:38 2016 +0000
+++ b/AQM1602XA.h	Tue Jun 02 01:39:26 2020 +0000
@@ -22,8 +22,8 @@
         char        address;
         
         void initialize(void);
-        void writeCommand(char cmd);
-        void writeData(char data);
+//        void writeCommand(char cmd);
+//        void writeData(char data);
     public:
         /**
          * Constructor - default device address is 0x3E
@@ -35,6 +35,10 @@
          *         str - string to show on the LCD. The length is up to 16 characters
          **/
         void printString(int row, char *str);
+        
+        //
+        void writeCommand(char cmd);
+        void writeData(char data);       
 };
 
 #endif