CY8CPROTO-062-4343W and i8080 interface

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

cross mob
SaKrst
Level 3
Level 3
5 likes given First like received First like given

Hello good people from the community,

I have CY8CPROTO-062-4343W board with me and some screen that has ILI9341 driver that is pre-configured on 16 bit i8080 interface.

I have no problems using this screen with FreeSoC2 board, that has PSoC5 CY8C5888AXI-LP096, and with CY8CPROTO-063-BLE board since I use PsoC Creator where I can find and use GraphicsLCDIntf component which has all the necessary API to send data and commands to the screen.

Since CY8CPROTO-062-4343W is programmed only via ModusToolbox because it has the PSoC62 MCU (CY8C624ABZI-D44) that isn't supported in PSoC Creator and, if I'm correct, it doesn't have UDB's that are used in GraphicsLCDIntf component on boards that I mentioned before, how can I send data or commands to the screen now since I can't find something similar to the GraphicsLCDIntf in Configure Device or Select Middleware dialog?

Thanks,

Sava

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Unlike PSoC Creator, ModusToolbox isn't component based and hence the GraphicsLCD component doesn't exist. When you enable the right middleware functionalities of Segger emWin based on your application as SanjeevG_16​ mentioned, then under Source directory you will see the emWin configuration files.

Since the component doesn't exist you need to write your own firmware to interface with the LCD. Click New Application > choose your kit > TFTemwin application. This starter example should offer you good guidance on how the firmware should be written and how the "design.modus" file should be configured.

Regards,

Dheeraj

View solution in original post

7 Replies
SanjeevG_16
Employee
Employee
10 likes received 10 likes given 5 likes given

Hi,

I am not sure about the GraphicsLCD component in PSoC Creator. In Modus Toolbox we have emWin Library. You have to choose the right middleware to support your function. There are multiple configurations to go by,

1) OS or No OS - In case if you want to use RTOS support

2) Touch or No Touch - If your LCD supports touch .

3) LCD Driver - It could be either Compact color, Flex Color, BitPlains.

Choose the right display driver to get your API's to send your commands or data.

0 Likes

Hi,

The GraphicsLCD is just the name of the component from which Creator generates API's for sending data and commands to the controller.

That is what I can't find in the Modus Toolbox, the API's for sending data or commands. If I had those I'd know what to do. Usually I'd edit LCDConf.c to set the pointers to functions to point to API functions, and then call some examples from main.c and that would work. I have managed to get it going with Flex Color and with Compact Color drivers with PSoC 5 and PSoC 63 MCU's, but now I don't have those API's or if they do exist I can't find them.

This is how one of those functions looks like

/*******************************************************************************

* Function Name: GraphicLCDIntf_Write16

********************************************************************************

*

* Summary:

*  Initiates a write transaction on the 16-bit parallel

*  interface.

*  The write is a posted write, so this function will return before the write

*  has actually completed on the interface. If the command queue is full, this

*  function will not return until space is available to queue this write request.

*

* Parameters:

*  d_c:  Data(1) or Command(0) indication. Passed to the d_c pin.

*

*  wrData: Data sent to the do_msb[7:0] (most significant byte)

*          and do_lsb[7:0] (least significant byte) pins. do_msb[7:0]

*          presents only for the 16-bit interface.

*

*******************************************************************************/

void GraphicLCDIntf_Write16(uint8 d_c, uint16 wrData)

{

    while((GraphicLCDIntf_STATUS_REG & GraphicLCDIntf_CMD_QUEUE_FULL) != 0u)

    {

        /* The command queue is full */

    }  

    GraphicLCDIntf_CMD_FIFO_REG = d_c;

    #if (GraphicLCDIntf_BUS_WIDTH == 16u)

        CY_SET_REG16(GraphicLCDIntf_DATA_FIFO_PTR, wrData);

    #else /* 8-bit interface */

        GraphicLCDIntf_DATA_FIFO_REG = wrData;

    #endif /* GraphicLCDIntf_BUS_WIDTH == 16u */

}

Truth be told I haven't looked if there are some examples for parallel driven ILI9341 driver with this MCU.

But the question is, do I have to write functions for sending data/commands, and if yes then some help or hints would be nice then

Thanks for the time and sorry if I wasn't clear with my question.

0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Unlike PSoC Creator, ModusToolbox isn't component based and hence the GraphicsLCD component doesn't exist. When you enable the right middleware functionalities of Segger emWin based on your application as SanjeevG_16​ mentioned, then under Source directory you will see the emWin configuration files.

Since the component doesn't exist you need to write your own firmware to interface with the LCD. Click New Application > choose your kit > TFTemwin application. This starter example should offer you good guidance on how the firmware should be written and how the "design.modus" file should be configured.

Regards,

Dheeraj

Thanks DheerajK_81​. From the example I can see it's written for 8 bit parallel interface, so I'll modify it for 16 bit using the same principle and as I can see I should have no problems with using ILI9341 driver as it has same timing characteristics as ST7789V that's on TFT Shield Board from Cypress. By changing the initialization sequence, and assigning new pins should make it work.By the way, is ncs pin from screen grounded? I can't find it in configuration.

I also have a question about how to set the write cycle timing since I also have a screen with ILI9325 driver which has different timing characteristics?

Maybe by using cycles delay function, or by changing the clock frequency in runtime?

But first things first, I'll try if it works with ILI9341, then I'll move on to ILI9325 and see how it goes.

0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Yes, in the code example from the looks of it, the ncs pin is grounded and hence always enabled. You can configure a pin to control this if needed.

In the i8080 interface, data write occurs when you pull the nwr pin low and set it to high. The data loaded on the parallel pins get transferred on the rising edge. So, I'm not quite sure which write cycle timing you are referring to, but you can add delays to your code using Cy_SysLib_Delay() API.

Regards,
Dheeraj

0 Likes

Everything seems to work with both screens that I have (ILI9341 and ILI9325) without resorting to usage of delays. Here are the timing characteristics for ILI9325.

ILI9325_timing1.JPG

    I.JPG

Since I configured device clocks on 150/75MHz I thought there could be a problem with MCU switching nwr pin too fast which I would then probably solve by adding delay cycles between low and high level pulse to match the timing specifications. Luckily that didn't happen, as the only thing changed was the initialization code for ILI9341 and ILI9325 and everything worked.

0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Glad to hear that everything works. Happy developing!

Regards,
Dheeraj

0 Likes