LCD Protocol Hitachi HD44780 vs Newhaven ST7066U Timing Adjustment

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

cross mob
Anonymous
Not applicable

I have a Newhaven Display with an ST7066U controller that I want to use with the LCD API. The LCD API was designed to communicate with the HD44780 controller. I have confirmed that the instruction sets are the same, the only difference is the timing. Can anyone tell me where to change the timing settings to get this working with the PSoC3. I have looked in the LCD.c; LCD.h and LCD_PM.c, but did not find a specific CyDelay to alter the time of the setup of RS and R/W to E rising edge and the Data to E falling edge.

Thanks,

Dale.

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

Hello Dale,

You can find the timing delays for the setup of RS and R/W to E rising edge and the Data to E falling edge implemented using the CyDelayUs() API inside the function void LCD_IsReady(void) in a do-while condition in lcd.c file as shown below:

do

    {

        /* 40 ns delay required before rising Enable and 500ns between neighbour Enables */

        CyDelayUs(0u);   //Change this line with the required time

        /* Set E high */

        LCD_PORT_DR_REG |= LCD_E;

.../* And so on */

...

}

Regards,

Dheeraj

View solution in original post

2 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello Dale,

You can find the timing delays for the setup of RS and R/W to E rising edge and the Data to E falling edge implemented using the CyDelayUs() API inside the function void LCD_IsReady(void) in a do-while condition in lcd.c file as shown below:

do

    {

        /* 40 ns delay required before rising Enable and 500ns between neighbour Enables */

        CyDelayUs(0u);   //Change this line with the required time

        /* Set E high */

        LCD_PORT_DR_REG |= LCD_E;

.../* And so on */

...

}

Regards,

Dheeraj

Anonymous
Not applicable

Thank you Dheeraj!

This will be most helpful. I have the display working. I had resistors in the line that needed removing.

Dale.

0 Likes