1 2 Previous Next 20 Replies Latest reply on Apr 8, 2014 6:46 AM by RaAl_264636

    HD44780 on CY8CKIT-049






      has anyone got an original HD44780 display (4x20) on a PSoC4 up and running with the Cypress provided character LCD component? It seems that the initialisation is done, the LCD is blank after LCD_Char_Start(), so the bars in line 1 & 3 which are visible after power-up are removed. However, calling LCD_Char_PrintString() doesn't show anything, even with setting the display position explicitely to (0,0) by calling LCD_Char_Position().


      Currently I'm digging into it by using a logic analyzer, but it would be nice to know if anyone has been able to get an HD44780 on PSoC4 working.









        • 1. Re: HD44780 on CY8CKIT-049

          I have a pioneer board running a generic 44780 2 X 16 display with kees library. The display is


          an arduino pinned out display. Kees library allows you to span more than one port with library


          for the interface. A 4 x XX display should work as well.




          You might post your project for forum to look at code base.
















          “Create Workspace Bundle”


          Use Firefox or IE, not chrome to post.






          Regards, Dana.

          • 2. Re: HD44780 on CY8CKIT-049
                    Hi Dana, I'll try other components/solutions if I have figured out why the Cypress provided component won't work ;) Regards, Ralf   
            • 3. Re: HD44780 on CY8CKIT-049

              Make sure you are using the latest version of kees' multi-port-LCD library. It increased some delays, since some displays need higher ones.


              Maybe you can attach a logic analyzer and look what gets transmitted.


              Try to enable the blinking cursor, and see whether it moves when sending text.


              Check the R/S line - if its stuck only commands get transmitted, but no character data...

              • 4. Re: HD44780 on CY8CKIT-049

                btw: I too had success with connecting an LCD. See e.g. my blog: blog.hendriklipka.de/archives/2013/10/psoc_frequency_counter_1.html and blog.hendriklipka.de/archives/2013/10/psoc_frequency_counter_2.html


                There was already another thread regarding similar problems, maybe it can can help you: www.cypress.com/

                • 5. Re: HD44780 on CY8CKIT-049
                          Hi hli, yes, but first I want to figure out what's wrong with the Cypress provided component. Thank you for the links. One thing I have to verify: by going through the LCD code, I found that the most/least significant port bit (depends on the selected LCD port shift option) is cleared to zero!!! This disturbs other operations if the corresponding port bit is used for other purposes. Seems that the Cypress provided component has some bugs, but I've to verify this first. Regards, Ralf   
                  • 6. Re: HD44780 on CY8CKIT-049

                    Where did you find that? Is this in the standard component (v1.90) from Creator, or the multi-port one?




                    Btw: when looking for problem, start with the assumption that the components are fine (see http://blog.codinghorror.com/the-first-rule-of-programming-its-always-your-fault/ ). Yes, there are bugs sometimes in the PSoC components, but they are rare... Most likely something else is wrong.

                    • 7. Re: HD44780 on CY8CKIT-049

                      PSOC 4 has some a fair number of pins dedicated to fixed use, so


                      by using the standard component, where you are forced to use a whole port


                      except MSB, thats might be conflicting with dedicated pin. Maybe thats a


                      possible issue ?




                      Regards, Dana.

                      • 8. Re: HD44780 on CY8CKIT-049

                        I'm not familiar with the one Chris wrote for the kees library, but I have been using the one I wrote for some time now, you might give it a try.  It only uses 6 pins and make sure you connect the RW pin on the display to Vss.  You can find the latest one here.







                        • 9. Re: HD44780 on CY8CKIT-049



                          Yes, the Cypress provided component for a character LCD v1.90. I make this 'assumption' because the 8th pin in the corresponding port is connected to a LED, and the LED is activated when LCD_Char_Start() is called. I still have to verify if it's the component which influences this bit.






                          The port I used is port 2, bits 7-1. The LED mentioned above is connected active-low to P2.0. According to datasheet P2 is used for ADC muxer only, but I don't use any analog features. I created a empty project with only the LCD, nothing else. After calling LCD_Char_Start(), the LED is active, which shouldn't be the case.






                          I have to read from the LCD to check if the connection is well. I'll use the 6-pin components if there's no other way.









                          • 10. Re: HD44780 on CY8CKIT-049

                            Since you don't use P2[0], does it matter that it gets set to 0? It should not affect the operation of the LCD in your case. Looking at the code of the component (_WrDatNib / _WrCtrlNib), it looks OK to me. Are the port settings OK in the design wide resources?

                            • 11. Re: HD44780 on CY8CKIT-049

                              Hi Hli,




                              of course it matters. The end design will use P2.0 (that's why I connected a LED to it). And a component shouldn't influence pins that are not relevant for its function.




                              Currently I'm digging deeper into what happens, if my logic analyser doesn't lie to me it seems that LCD_Char_1_WriteControl() writes garbage to the LCD. The first command after switching to 4-bit mode is CURSOR_AUTO_INCR_ON -> 0x06, but according to the LA the LCD receives 0x8E. I assume that something's wrong with my hardware. I'll report back.









                              • 12. Re: HD44780 on CY8CKIT-049

                                Hmmm... the LA seems to lie. I modified the LCD_Char_WrCntrlNib() function to transmit the pin state register to UART prior to disabling the E signal - the first 4-bit command CURSOR_AUTO_INCR_ON seems to be ok, but after that the garbage begins. Strange...









                                • 13. Re: HD44780 on CY8CKIT-049
                                          Okay, figured two things out: 1) the LCD component doesn't allow to set font size -> it enables 5x10 size, where my display uses 5x7 -> Cypress, I think this should be fixed 2) If I use only LCD_Char_WrCntrlNib() / LCD_Char_WrDatNib() functions with proper delay, I get at least 'something' on the display. The effect is that the busy flag is not checked, which means that also the port direction is not modified. I'll have to dig deeper, anyway.... Regards, Ralf   
                                  • 14. Re: HD44780 on CY8CKIT-049
                                            And #3) at least the LCD_Char_PutString() function should take the offset between ASCII and LCD character into account... Regards, Ralf   
                                    1 2 Previous Next