This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LCD 20x04 I2C SetCursor function

Hi! I hope this is the right section of the forum otherwise redirect me to the correct one.

I just started programming, I am using a 20x04 LCD with STM32F407G and I need the classic function "lcd_i2c_setCursor (row, col);".

I have modified the one already in the 16x02 display library in this way, but it doesn't work properly:  

void lcd_put_cur(int row, int col)
{
    switch (row)
    {
        case 0:
            col |= 0x00;
            break;
        case 1:
            col |= 0x40;
            break;
        case 2:
            col |= 0x14;
            break;
        case 3:
            col |= 0x54;
            break;			
    }

    lcd_send_cmd (col);
}

I attach the entire .c library of the LCD:   (check out the 2 functions I marked with "THIS ONE")

6735.libreria.rtf

So I am asking if you can redirect/send me to a post OR link where this function is explained for 20x04 lcd OR if someone can attach the code so that I can implement it into my project.

Thanks!