"I2C_LCD_1 _ SetContrast (50);" Function not found

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

cross mob
Anonymous
Not applicable

Hi.All

I want to use I2C_LCD with PSoC4 CY8CKIT-049 Prototyping Kit.

In "I2C_LCD.C" or "I2C_LCD.h" of "PSoC CREATER 4.1"
"I2C_LCD_1 _ SetContrast (50);" Function not found.

I coded the following samples.

#include <device.h>
#define LCD_MODULE_ADDRESS (0x50u)

int main (void)
{
    CyGlobalIntEnable;
    I2C_Start ();
    I2C_LCD_Start ();
    I2C_LCD_SetContrast (50);
    CyDelay (1000 u);
    I2C_LCD_Position (0 u, 19 u);
    I2C_LCD_PrintString ("s");
    I2C_LCD_Position (0 u, 0 u);
    I2C_LCD_PrintString ("a");
    I2C_LCD_WriteControl (I2C_LCD_CURSOR_WINK);
   
   
    I2C_LCD_Position (1 u, 0 u);
    I2C_LCD_PrintString ("Cypress");
    I2C_LCD_PrintString ("Cypress");
    I2C_LCD_WriteControl (I2C_LCD_CURSOR_WINK);
    I2C_LCD_PrintNumber (2015);
    I2C_LCD_PrintNumber (015);
    I2C_LCD_Position (3u, 10u);
    I2C_LCD_PutChar ('$');
   
}

please tell me.

0 Likes
1 Solution

Probably a typo? It is "I2C_LCD _ SetContrast (50);"

Each API is prepended by the instance name of the component.

Bob

View solution in original post

0 Likes
6 Replies
SrikanthD_56
Employee
Employee
25 sign-ins First question asked First comment on blog

Hi,

As per I2C LCD component datasheet, there is no such API called I2C_LCD_SetContrast() available for this component.

Where did you find reference to that function? It could be a user defined function to parse some custom I2C commands. Please check.

Anonymous
Not applicable
Dear srds
In case Thank you for answering.

The attached sample program is "Cypress Communtey"
It is "Main.c" of the file attached to the title "I2C LCD NEWHAVEN".
An example is also introduced in the website in Japan using
the function (I2C_LCD_1 _ SetContrast (50);).
Please have additional information.
If it is unknown, try to create it yourself.

0 Likes

So I downloaded the project from I2C LCD NEWHAVEN and observed that (as I told) it's a custom command. To use it in your project, update the I2C LCD Component Configuration parameters as shown in below image (same as I2C LCD NEWHEAVEN project) and that should resolve the build error.

Parameters.png

Probably a typo? It is "I2C_LCD _ SetContrast (50);"

Each API is prepended by the instance name of the component.

Bob

0 Likes
Anonymous
Not applicable

Dear Bob.

It was necessary to create custom command for LCD.
The problem was solved.
Thank you.

Ichirou.T

0 Likes
Anonymous
Not applicable

Dear srds.

I understood well with this answer.

The problem was solved.

Thank you.

0 Likes