Troubleshooting

Revision:
8:e34e23edfc84
Parent:
7:0213c3702c99
Child:
9:f8c8f0b11893
--- a/LCD.cpp	Sun Nov 04 21:09:02 2018 +0000
+++ b/LCD.cpp	Sun Nov 04 21:42:38 2018 +0000
@@ -9,14 +9,13 @@
     
     //LCD Initialise
     wait_ms(45); //Wait for LCD startup
-    wait_us(3000);      //Wait whilst LCD busy
-    _LCD_RS = control;   
-    LCD_DDRAM = 0;  //Clear data line
-    LCD_DDRAM = DDRAM>>4;  //Put data on line
-    LCD_strobe();
+    /*Step 1*/
+        wait_us(3000);      //Wait whilst LCD busy
+        _LCD_RS = control;   
+        LCD_DDRAM = 0;  //Clear data line
+        LCD_DDRAM = DDRAM>>4;  //Put data on line
+        LCD_strobe();
     
-    
-    /*Step 1*/ //cmdLCD(DDRAM|0x08);
     /*Step 2*/ cmdLCD(DDRAM|lines2);  //Function Set 0x20|0x08 = 0x28
     /*Step 3*/ cmdLCD(DDRAM|lines2);  //Function Set 0x20|0x08 = 0x28
     /*Step 4*/ cmdLCD(DISPLAY|on);    //Display Control 0x08|0x0x04 = 0x0c
@@ -31,17 +30,17 @@
     cmdLCD(CLEAR);   
 }
 
-void LCD::display(BYTE* str, INT_32 line, INT_32 position)
+void LCD::display(U_BYTE* str, U_BYTE line, UINT_16 position)
 {
     UINT_32 length  = strlen(str);
-    UINT_32 line1 = length;
+    UINT_16 line1 = length;         //0 - 16, 00000 - 10000
     UINT_32 line2 = 0;
     
     //if((line != NULL)&&(position != NULL))
     //{
         cmdLCD(line|position);
     //}
-    UINT_32 p;
+    U_BYTE p;
     if(line == LINE1)
     {
         if(position + length > 16)
@@ -81,7 +80,7 @@
     }
 }
 
-void LCD::putt(BYTE c)
+void LCD::putt(U_BYTE c)
 {
     wait_us(3000);
     _LCD_RS = text;
@@ -117,7 +116,7 @@
     LCD_strobe();   
 }
 
-UINT_32 LCD::findSpace(BYTE* str)
+UINT_32 LCD::findSpace(U_BYTE* str)
 {
     UINT_32 space = 0;
     INT_32 n = 16;