LCD_Char_PrintString() doesn't show anything on 16x2

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
deda_294911
Level 4
Level 4
Welcome!

please help

   

project is attached. when i connect the programmer and program the chip or put in debug mode LCD_Char_PrintString() works.

   

if i removed the programmer and connected to power supply; LCD_Char_PrintString() doesn't show anything or if i put in debug without programming few LCD_Char_PrintString() doesn't show anything mostly first line.

   

working on 3.1 but my other program works which are using the same sub routines?

   

 

   

i found in lcd.c  char8) '\0' = 0x00

   

void LCD_Char_1_PrintString(char8 const string[]) 
{

   

    uint8 indexU8 = 1u;
    char8 current = *string;

   

    /* Until null is reached, print next character */
    while((char8) '\0' != current)
    {
        LCD_Char_1_WriteData((uint8)current);
        current = string[indexU8];
        indexU8++;
    }

   

}

   

 

   

** this problem may be similar as per page 58 HD44780 on CY8CKIT-049 of our forum.

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

As far as I remember there could be an issue with the LCD initialization.

   

Try to insert a CyDelay() before and after LCD_Start().

   

 

   

Bob

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Why are you using PSoc Creator 3.1?

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I'm using Creator 3.x for PC with WIN_XP
otherwise Creator 4.0 hangs when editing in WIN_XP

0 Likes
deda_294911
Level 4
Level 4
Welcome!

i tried that also. i tried extended delays in LCD_Char_1_Init(); also.

   

my other program works which are using the same sub routines?

   

as per my knowledge string address and content data gets mismatched. why?

   


   UNIT DISPLAY THIS

   


    CyDelay(500);
    LCD_Char_1_Start();
    LCD_Char_1_ClearDisplay();
    CyDelay(1000);
   LCD_Char_1_Position(0u,0u);
   LCD_Char_1_PrintString("" 10 e-3 "");  

   


  BUT UNABLE TO DISPLAY(display is blank)

   


    CyDelay(500);
    LCD_Char_1_Start();
    LCD_Char_1_ClearDisplay();
    CyDelay(1000);
   LCD_Char_1_Position(0u,0u); 
   LCD_Char_1_PrintString("VATS    ");   
   LCD_Char_1_Position(1u,0u);
   LCD_Char_1_PrintString("  WATER ");   
   CyDelay(1000);
   LCD_Char_1_Position(0u,0u);  
   LCD_Char_1_PrintString("  METER ");;   
   LCD_Char_1_Position(1u,0u); 
   LCD_Char_1_PrintString(" WDP 2.0");   
   CyDelay(250);
 

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

When I replaced  port 2  to port 0 for LCD, I see a flashing inscription SOLVE PROBLEM

0 Likes