1 2 3 Previous Next 31 Replies Latest reply on May 11, 2015 5:04 PM by abdurrachman.mappuji

    PSoC 4 with Character LCD

    user_444739275

      Hello,

         

      I am working with psoc 4. I am Interfacing LCD with PSOC 4. I tried with the example project given in Creator. But I am getting error. I am attaching my workspace 

         

      anyone can tell me why I am getting error ?

        • 1. Re: PSoC 4 with Character LCD
          user_14586677

          What is the part number of the display, and a schematic of your

             

          connections to power, contrast,ground, PSOC.

             

           

             

          Regards, Dana.

          • 2. Re: PSoC 4 with Character LCD
            user_1377889

            Rename your "LCD_Char_1" to "LCD" and compilation will have less errors.

               

             

               

            Bob

            • 3. Re: PSoC 4 with Character LCD
              user_14586677

              Of course you know you can replace this -

                 

               

                 

                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_0);        /* Puts "C" at 2nd column on first row */
                pos += 2u;

                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_1);        /* Puts "Y" at 4th column on first row */
                pos += 2u;
                     
                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_2);        /* Puts "P" at 6th column on first row */
                pos += 2u;

                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_3);        /* Puts "R" at 8th column on first row */
                pos += 2u;    
               
                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_4);        /* Puts "E" at 10th column on first row */
                pos += 2u;
                     
                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_5);        /* Puts "S" at 12th column on first row */
                pos += 2u;
                     
                LCD_Position(row, pos);
                LCD_PutChar(LCD_CUSTOM_6);        /* Puts "S" at 14th column on first row */
                pos += 2u;
               

                 

              with this -

                 

               

                 

                LCD_Position( row, pos );
                LCD_PrintString(  "Cypress" );                               // Print out string

                 

               

                 

              or -

                 

               

                 

                   strbuff[ 17 ] = "Cypress";                                    // LCD 16 char + 1 for nul character

                 

                  LCD_Position( row, pos );
                  LCD_PrintString(  &strbuff[ 0 ] );                           // Print out string

                 

               

                 

              Regards, Dana.

              • 4. Re: PSoC 4 with Character LCD
                user_242978793

                Here is an LCD program that you can use on any pin on the PSOC unlike the original library that has to start at Port 0 and then increase from there.  Such as P1(0) or P2(0) or P3(0). This is an easier part to use if you design has a lot of resources. Also in your LCD component you did not click the User defined setting that would have been necessary in your design. The example I am sending is a bar graph but you can convert it to ASCII characters.

                • 5. Re: PSoC 4 with Character LCD
                  user_444739275

                  I did not see any attachment in your post

                     

                   when I write   LCD_start(); function   I am getting 2  Error. I don't understand why I am getting error 

                     

                   

                     

                  Build error: undefined reference to `LCD_start'

                     

                  Address the error(s) specified in this message and rebuild the project.

                     

                   

                     

                   

                     

                  /* ========================================
                   *
                   * Copyright YOUR COMPANY, THE YEAR
                   * All Rights Reserved
                   * UNPUBLISHED, LICENSED SOFTWARE.
                   *
                   * CONFIDENTIAL AND PROPRIETARY INFORMATION
                   * WHICH IS THE PROPERTY OF your company.
                   *
                   * ========================================
                  */
                  #include <project.h>

                  int main()
                  {
                      LCD_start();
                      /* Place your initialization/startup code here (e.g. MyInst_Start()) */

                      /* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
                      for(;;)
                      {
                          /* Place your application code here. */
                      }
                  }

                  /* [] END OF FILE */

                     

                   

                     

                  look at this two statement

                     

                      

                     

                            LCD_Position(row, pos);
                    LCD_PutChar(LCD_CUSTOM_0);        /* Puts "C" at 2nd column on first row */
                    pos += 2u;

                   

                     

                  which is column 2nd clumn and  first row ?    

                     

                      

                     

                            

                     


                    LCD_Position(row, pos);
                    LCD_PutChar(LCD_CUSTOM_1);        /* Puts "Y" at 4th column on first row */
                    pos += 2u;

                     

                   

                     

                      

                     

                            

                     


                  which is column 4th  clumn and  first row ?

                     

                   

                     

                           

                  • 6. Re: PSoC 4 with Character LCD
                    user_14586677

                    This LCD_start( ); should be typed as LCD_Start( );

                       

                     

                       

                    Regards, Dana

                    • 7. Re: PSoC 4 with Character LCD
                      user_14586677

                      From the LCD datasheet -

                         

                       

                         

                       

                         

                       

                         

                       

                         

                      Vee is a contrast adjustment, from LCD datasheet -

                         

                       

                         

                       

                      • 8. Re: PSoC 4 with Character LCD
                        user_242978793

                        Sorry about the down load here it is!

                        • 9. Re: PSoC 4 with Character LCD
                          user_1377889

                          @bobgoar

                             

                          ...everyone has got three tries ....  ;-))

                             

                           

                             

                          Bob

                          • 10. Re: PSoC 4 with Character LCD
                            user_242978793

                            I do not know what is wrong with my file attachments I tried yesterday and today and it is not posted.  I am going to move the fike to another computer and try it again.

                            • 11. Re: PSoC 4 with Character LCD
                              net.eyal

                               What happen with reward store??

                              • 12. Re: PSoC 4 with Character LCD
                                user_1377889

                                @vead

                                   

                                You can name a port as you like. For your better understanding it was named "LCDPort" from which - as you can see - 7 pins are needed. The usual writing is "portmame" an underscore "_" and the pin number, so

                                   

                                LCDPort_3 is talking about pin 3 of the LCDPort. Remember that pin counting always start with zero (0). Stick to the connection tables Dana posted. On the LCD-module the pins for DB0 to DB3 are not connected and left floating.

                                   

                                 

                                   

                                Bob

                                • 13. Re: PSoC 4 with Character LCD
                                  user_242978793

                                  There we go one more time for the download.

                                  • 14. Re: PSoC 4 with Character LCD
                                    user_444739275

                                    Which pin is enable pin of MCU (psoc 4 kit )?

                                       

                                    Which pin is RS pin of MCU (psoc 4 kit )?

                                       

                                    Which pin is R/W pin of MCU (psoc 4 kit )?

                                       

                                     

                                       

                                    Pin 1 should be connecte with ground

                                       

                                    Pin 2 should be connected with VDD

                                       

                                    Pin 3 should be connecte

                                       

                                    Pin 4 should be connecte

                                       

                                    Pin 5 should be connecte

                                       

                                    Pin 6 should be connecte

                                       

                                    Pin 7 should be connecte with data pin of microcontroller

                                       

                                    Pin 8 should be connecte with data pin of microcontroller

                                       

                                    Pin 9 should be connecte with data pin of microcontroller

                                       

                                    Pin 10 should be connecte with data pin of microcontroller

                                       

                                    Pin 11 should be connecte with data pin of microcontroller

                                       

                                    Pin 12 should be connecte with data pin of microcontroller

                                       

                                    Pin 13 should be connecte with data pin of microcontroller

                                       

                                    Pin 14 should be connecte with data pin of microcontroller

                                       

                                    Pin 15 X

                                       

                                    Pin 16 X

                                       

                                     I tried to open your workspace. But when I try I get error

                                    1 2 3 Previous Next