cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

AnKr_1499391
New Contributor II

I have a very strange problem with a LCD-Display and I need some help.

   

My setup is a CY8CKIT-049-42xx with PSoC 4, a HD44780-LCD display with 2x16-characters.

   

I used the bootloadable-example and added the LCD-Component 2.10 (name LCD) and mapped the output to Port P2.0-6, connected to the display as described in the datasheet.

   

I checked several times all the cables and tried several options but the strange behaviour stayed.

   

Here is my code in main, with comments what happens on the display:

   
    int main()    
{    
    LCD_Start();    
    LCD_PrintString("Test");  // only "t" is displayed.    
    CyDelay(500);    
    
    uint8 i=0;    
    for(i=0;i<80;i++)    
    {    
               LCD_PrintInt8(i);  // This prints 0-F in the upper left corner of the LCD. but only one digit    
              CyDelay(333);    
    }    
    j++;    
    LCD_PrintString("Hallo");  // only "o" is printed    
    CyDelay(500);       
}   
   

What puzzles me is the fact, that it prinzipally seems to work. The character 0-F are printed fine.

   

But neither PrintString nor PutChar or any other functions seem to work.

   

Can anybody help? Did I forget so set anything?

   

Thanks

   

Andreas

0 Likes
6 Replies
Bob_Marlowe
Expert II

Welcome in the forum, Andreas!

   

Your issue "smells" like mis-connection. Can you please post your complete project Creator->File->Create workspace Bundle and upload the resulting file here? So we can check the pins you used...

   

You need to connect only the lower 4 data lines at the LCD and two (or were it three) control-lines.

   

 

   

Bob

0 Likes
rola_264706
Honored Contributor II

 Andreas: I like to use the Cypress library that lets you use any pins on any ports for the LCD.  I am sending you a program for the CY8CKIT-049-42xx. I added the bootloader component and you will have to set the correct .h and elf for your computer. This program is very well documented to help you.  Follow the instructions on the topdesign page.  I happen to have an LCD that would plug into the PSOC 4 Pioneer board and the wiring call outs are for that setup.  You will need to change the pins to agree with your 42XX setup.

0 Likes
AnKr_1499391
New Contributor II

Hello and thanks for the help!

   

I found the problem now: I used the LCD-Component, but didn't connect the P2.6 to the "R/W"-Pin of the display. I grounded the pin on the LCD, but didn't connect anything on the PSoC. And this was the problem!

   

I was just preparing everything to upload a nice picture of my setup and thought, o.k., maybe I connect this pin, just to make it complete... And, the result was: It is working. Gaaah! Another case of stupidity solved.

   

Thanks a lot
Andreas

   

   

0 Likes
Bob_Marlowe
Expert II

Fine that you got it running! You are not the first and I can assure you, you will not be the last getting desperate over external wiring. Now, before you start to use sprintf() set the heap-size (.cydwr view->system tab) to 0x200, in build settings: use newlib nano and float formatting and all will be fine.

   

 

   

Bob

   

PS: Where are you located? I live near Bremen

0 Likes
AnKr_1499391
New Contributor II

Thanks for the hints!

   

I live in Mannheim.

0 Likes
Bob_Marlowe
Expert II

I had a friend in K3 17

   

 

   

Bob

0 Likes