How to use SPI with PSoC6 WiFi-BT Pioneer Kit?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ShAb_4059181
Level 2
Level 2

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

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
lock attach
Attachments are accessible only for community members.
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

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

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

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