cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

ShAb_4059181
New Contributor II

I have a Adafruit 1.54" 240x240 TFT (W7923-A).

I want to use the above display instead of the CY8CKIT-028-TFT and I want to use EmWin Graphic Library and SPI (not Quad SPI FRAM as Display Buffer).

Any help is appreciated.

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator

Yes, in the component catalog, the GraphicsLCDCtrl macro is nothing but the component along with default settings to interface an LCD. But I checked the datasheet for your LCD and don't think it supports a parallel interface, so you can't use the GraphicsLCD component.

You need to use the SPI component solely to interface the LCD. Now for this you will need the Adafruit driver library to make it easier. You will find their libraries on Github, but they are mostly written in C++. Since Creator doesn't support C++ you need to translate the code to C.

Please find the C library written for ST7735 here: ucglib/ucg_dev_tft_128x160_st7735.c at master · olikraus/ucglib · GitHub ​. Your driver is ST7789, which should be fairly similar. So modify the SPI transaction code to use the SPI APIs written by Cypress.

Right click on the SPI component > Open PDL Documentation to find the required APIs.

Regards,

Dheeraj

View solution in original post

3 Replies
DheerajK_81
Moderator
Moderator

Use the GraphLCDCtrl component as the interface between the PSoC and your display. Use the SPI component to initialize the LCD by following the steps mentioned in the datasheet.

To integrate EmWin Graphics Library, enable emWin support under Peripheral Driver Library in the Build Settings. Then follow the instructions specified in the manual attached to configure EmWin correctly.

Regards,

Dheeraj

0 Likes
ShAb_4059181
New Contributor II

Dheeraj

Thank you for your reply.

Would you kindly provide more clarifying details. For example, in the component catalog, I find the following components:

Graphic LCD 8-bit parallel Interface Macro[V1.80]

Graphic LCD 16-bit parallel Interface Macro[V1.80]

Graphic LCD parallel Interface

And I do not find GraphLCDCtrl.

I find the GraphLCDCtrl under project/build setting/PDL/LCD Driver as an option in the dropdown menu.

Which Datasheet do I use? That of the SPI component?

Thanks

Shukri

0 Likes
DheerajK_81
Moderator
Moderator

Yes, in the component catalog, the GraphicsLCDCtrl macro is nothing but the component along with default settings to interface an LCD. But I checked the datasheet for your LCD and don't think it supports a parallel interface, so you can't use the GraphicsLCD component.

You need to use the SPI component solely to interface the LCD. Now for this you will need the Adafruit driver library to make it easier. You will find their libraries on Github, but they are mostly written in C++. Since Creator doesn't support C++ you need to translate the code to C.

Please find the C library written for ST7735 here: ucglib/ucg_dev_tft_128x160_st7735.c at master · olikraus/ucglib · GitHub ​. Your driver is ST7789, which should be fairly similar. So modify the SPI transaction code to use the SPI APIs written by Cypress.

Right click on the SPI component > Open PDL Documentation to find the required APIs.

Regards,

Dheeraj

View solution in original post

Top labels