9 Replies Latest reply on Aug 29, 2015 5:33 AM by user_342122993

    PSoC 5LP + ILI9341 240x320 TFT LCD

    hxinyu_1446496

      Has anyone been able to get ILI9341 240x320 TFT LCD working with the PSoC 5LP? I have tried everything but can only get a white screen on the TFT. The only command that does anything is clear screen and even that isn't working properly. I have scoured the internet but have been unable to find any working source code for the PSoC 5LP, and the PSoC 4 source code which I have tried to port over just isn't happy with the PSoC creator compiler stating bootloader errors. The only resource I've found is a Japanese blog (which I have already contacted to not much avail). If anyone has been able to get these two devices working together if you could post your connections or project I would greatly appreciate it. - Frustrated Tom

        • 1. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
          user_14586677

          There are several projects using other vendors at element14.com, maybe their

             

          coding could give you some clues.

             

           

             

          Regards, Dana.

          • 2. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
            user_242978793

            What kind of interface are you using? SPI or parallel interface.  I am sending you a ILI9340 interface program it is set up for the PSOC 4 but it could be modified for PSOC 5. I have seen an interface program from Russia and I am going to look for it and will send it also. I spent some time translating it to English. Also the Element 14 PSOC 100 projects in 100 days has two programs.  These are missing some code however. 

            • 3. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
              user_242978793

              Also if you want to use the PSOC 4 code for your PSOC 5 just right  click on the Bootloadable component on the topdesign.cysch and select disable from the list.  That will gray out that component and then go to Project header in Psoc creator and click on it and goto device selector and find you psoc 5 device in the list and click OK and your program is set to work on your new PSOC device.  you may have to move some wires but not always. Then do a clean build from the PSOC Creator Build heading. That should take care of the program. Then you have to debug it from there.  You will also need the data sheet for the ILI9340 and ILI9341 to see what differences there is between the parts. 

              • 4. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
                jim.gilmartin

                Im kind of curious why you want to use this device?  For training? It is not a really easy to use device and there is not much use for it any more. But it is cheap. If you are getting a white screen and it is not caused by your backlight washing everything out, verify your screen location first. A white screen is caused by there being no data in the page buffer or you are setting the wrong page buffer. So make  sure you are initializing the device only once and not every time you are sending data to the buffer (common mistake). But it could be almost anything.

                   

                It is not hard to write your own code for these. Most display controllers can be run with just a few functions and the graphics you want to display in a simple array. Usually it is just set resolution, set the 4 corners of your screen location then stream the data. Of course it gets more complicated if you use multiple buffers for animation or transparency but it is not really very difficult.

                • 5. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
                  hxinyu_1446496

                  Thank you,

                     

                  I have checked these out quite extensively previously without much help. I don't think coding is the issue anymore as I created an entirely new project which now has no errors but still white screens.

                  • 6. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
                    hxinyu_1446496

                    I am using SPIM, I believe I have the exact same copy of this project unless you have modified it personally some how. Let me know if you've modified it somehow. Appreciate it.

                    • 7. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
                      hxinyu_1446496

                      Yea, thanks, I have built an entirely new project without a bootloadable for the TFT which works and displays on a 2ndary LCD for debugging as I step through the code but the TFT still white screens.

                      • 8. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
                        hxinyu_1446496

                        Where/how do I verify that I am setting the page buffer correctly? I believe I have the code running smoothly now but I guess it is in fact either a settings issue or a hardware setup issue that I am troubleshooting.

                        • 9. Re: PSoC 5LP + ILI9341 240x320 TFT LCD
                          user_342122993
                                  hxinyu, One issue I had with ILI9341 is cable length and SPI frequency. The LCD didn't work with ribbon cable. Wires had to be short (4"), not twisted or bundled. SPI frequency had to be in about 1-4 MHz range, most stable at about 2-2.4 MHz. After playing with it for some time I found that best display for PSoC is your smartphone, connected by BlueTooth. Coding graphical interphace on PSoC is time-consuming, LCD screen refresh rate is slow and there are no font libraries for larger fonts. odissey1