1 2 Previous Next 15 Replies Latest reply on Oct 5, 2014 5:59 AM by ki.leung

    LCD Display bug

      Hi,

         

      Sorry for again post but i think image zip file was not uploaded so i will explain via text.

         

         

         

      I was wrote simple below code in main function.

         

          LCD_Start();
          LCD_ClearDisplay();
          LCD_Position(0,0);
          LCD_PrintString("ABCDEFGHIJKLMNPQRS");

         

      and output in LCD is ABCDEFGHIJKLNPQRS

         

      but when I wrote code in main function with adding 'O' character means

         

          LCD_Start();
          LCD_ClearDisplay();
          LCD_Position(0,0);
          LCD_PrintString("ABCDEFGHIJKLMNOPQRS");

         

      then output was ABCDEFGHIJKLMNO . and my controller does not work any more

         

      I don't know why O character enemy with me

         

      Please any one can give a solution for that.

        • 1. Re: LCD Display bug
          EvPa_264126

          It seems this problem has already been discussed:
          Character LCD not work!

          • 2. Re: LCD Display bug
            HeLi_263931

            The CharLCD component does not wrap at the endge of the display. Internally each line consists of more than just the 16 bytes needed for one line. The write function just writes one character after the other, but after the 16th they just will not be displayed. Only when you reach the limit of where the first line ends in memory, the characters are displayed again (in the second line then).

               

            You need to handle that wrapping in your code.

            1 of 1 people found this helpful
            • 3. Re: LCD Display bug

              But i am using 20x4 Lcd not a 16x2 and Lcd part no is JHD 204A

              • 4. Re: LCD Display bug

                Even I wrote "Config. Mode", Output is "Config. Mo".

                   

                In that condition only 11 character but facing same problem and if I remove 'O'  character and string is long not any issues.

                • 5. Re: LCD Display bug
                  DaKn_263916

                  Try using a for loop and write it character at a time with

                     

                  LCD_PutChar() and LCD_Char_Position(). Terminate loop

                     

                  when you detect NULL character, string termination.

                     

                   

                     

                  Regards, Dana.

                  1 of 1 people found this helpful
                  • 6. Re: LCD Display bug

                    I was already test it but same issue.

                       

                                        I was identify more hint about this issue. Whenever I was write ‘o’ or ‘O’ character at & after 8 position of first LCD line this problem is create and next c code is not execute.

                       

                    1) Input ->  LCD_PrintString("ABCODEFGHIJKLMNPQRST");

                       

                       Output-> ABCODEFGHIJKLMNPQRST

                       

                    2) Input ->  LCD_PrintString("ABCDEFOGHIJKLMNPQRST");
                       Output-> ABCDEFOGHIJKLMNPQRST

                       

                    3) Input ->  LCD_PrintString("ABCDEFGOHIJKLMNPQRST");
                       Output-> ABCDEFGO

                       

                    4) Input ->  LCD_PrintString("ABCDEFGHIJKLMNOPQRST");
                       Output-> ABCDEFGHIJKLMNO

                       

                    I am changing just position of character 'O'

                       

                    You can also check attached files. I was check this LCD with AT89C52 microcontroller and it's working fine. so i thing it's problem with PSoC LCD component.

                    • 7. Re: LCD Display bug

                       How about print multiple short strings. ie print "ABCDEF", then print "GHIJKL" then print "MNOPQ". add a little bit of delay between each print string.

                      1 of 1 people found this helpful
                      • 8. Re: LCD Display bug

                        same problem.

                           

                        I was write code without LCD component just directly place Digital Output pin and it working ok. but the problem is how i can check busy flag from LCD beacuse i was use Digital Output pin.

                        • 9. Re: LCD Display bug

                           Yes you can, but you need to copy the source file and modify it yourself, you may also need to modify the I/O mode with software  I did that for PSoC3 and Psoc5 but do not have the file on hand. Should be able to dig it out next week.

                          1 of 1 people found this helpful
                          • 10. Re: LCD Display bug

                            Sorry my mistake, the modifiction is to read the RAM content back from the LCD memeory which is not supplied by Cypress. 

                               

                            For checking the status of the LCD, you can use LCD_IsReady(). you can check the source code from the generated file

                            1 of 1 people found this helpful
                            • 11. Re: LCD Display bug
                              DaKn_263916

                              For what its worth I fired a 2 x 16 up on the -030 board and it works

                                 

                              fine. The "O" does not affect any writes.

                                 

                               

                                 

                                  LCD_Start( );
                                  LCD_Position( 0, 0 );
                                  LCD_PrintString( " ABCDEFGHIJKLMOPQRST" );

                                 

                               

                                 

                              Look in memory at your string. see if the ordinal value of "O" is

                                 

                              correct.

                                 

                               

                                 

                              Regards, Dana.

                              1 of 1 people found this helpful
                              • 12. Re: LCD Display bug
                                HeLi_263931

                                This looks like a hardware problem. Can you try the display with another controller (e.g. an Arduino)? Do the same with the connectors you use to connect it to the PSoC DevKit.

                                   

                                If you look at the discussion pavloven linked in, the behavior was the same, and the culprit was that the unused opins of the LCD were not connected to ground.

                                   

                                The LCD component is one of the most used ones I think, and so its probably nearly bug-free :)

                                1 of 1 people found this helpful
                                • 13. Re: LCD Display bug

                                  Thank to all

                                     

                                  It's my hardware connection problem so sorry for that

                                     

                                  It's work correctly.

                                  • 14. Re: LCD Display bug

                                     Glad you solve the problem, but you mentioned that it works if you drive it ditectly without using the LCD component, So what is the issue, so other people would check for that if they comes with the same problem as yours.

                                    1 of 1 people found this helpful
                                    1 2 Previous Next