3.5 Inch TFT mirror inverted output


hello,

i have cheap 3.5 inch tft.

wirering ok. have right output mirror inverted (horizontally).

i use arduino due. tft powered ili9481.

i found post told myglcd.switch_lcd_tb_bit(1).


is there fixed library?


searched via google , github.

all libs same.

thanks help.

welcome

i attached source code ili9481 driver ver : 2.0

it fixes version 1.x problem

editing original file f : \ arduino \ libraries \ utft \ tft_drivers \ ili9481 \ initlcd.h


initlcd.h ili9481 ver:2.0

code: [select]


case ili9481:
lcd_write_com(0x11); //0x11
delay(20);
lcd_write_com(0xd0);   //(0xd0)
lcd_write_data(0x07);  //(0x07)
lcd_write_data(0x41);  //(0x42)
lcd_write_data(0x1d);  //(0x1b)

lcd_write_com(0xd1);   //(0xd1)
lcd_write_data(0x00);  //(0x00)
lcd_write_data(0x2b);  //(0x07)
lcd_write_data(0x1f);  //(0x10)

lcd_write_com(0xd2);   //(0xd2)
lcd_write_data(0x01);  //(0x01)
lcd_write_data(0x11);  //(0x02)

lcd_write_com(0xc0);   //(0xc0) //panel driving setting / set default gamma
lcd_write_data(0x00);  //(0x10)
lcd_write_data(0x3b);  //(0x3b)
lcd_write_data(0x00);  //(0x00)
lcd_write_data(0x02);  //(0x02)
lcd_write_data(0x11);  //(0x11)

//display_timing_setting normal mode
        lcd_write_com(0xc1); //
lcd_write_data(0x10); //line inversion,div1[1:0]
lcd_write_data(0x10); //rtn1[4:0]
lcd_write_data(0x88); //bp , fp


lcd_write_com(0xc5);   //(0xc5) //frame rate control / set frame rate
lcd_write_data(0x03);  //(0x03)

  lcd_write_com(0xb6); // display function control
lcd_write_data(0x00);
lcd_write_data(0x22); // 0x42 = rotate display 180 deg.
lcd_write_data(0x3b);


lcd_write_com(0xc8);   //(0xc8) //gamma setting / set gamma
lcd_write_data(0x00);  //(0x18)
lcd_write_data(0x14);  //(0x32)
lcd_write_data(0x33);  //(0x36)
lcd_write_data(0x10);  //(0x45)
lcd_write_data(0x00);  //(0x06)
lcd_write_data(0x16);  //(0x18)
lcd_write_data(0x44);  //(0x37)
lcd_write_data(0x36);  //(0x75)
lcd_write_data(0x77);  //(0x77)
lcd_write_data(0x00);  //(0x54)
lcd_write_data(0x0f);  //(0x0c)
lcd_write_data(0x00);  //(0x00)

        lcd_write_com(0x21);   // display inversion on 0x21
lcd_write_data(0xc8);  // c8

        lcd_write_com(0xe4);   //
lcd_write_data(0xa0);  //

        lcd_write_com(0xf0);   //
lcd_write_data(0x01);  //

//======rgb if setting========
//rgb or sys interface
        lcd_write_com(0xb4);
lcd_write_data(0x10);//rgb

        lcd_write_com(0xc6);
lcd_write_data(0x1b);
//============================


lcd_write_com(0x36);   //(0x36) //set_address_mode miror image lendscape
lcd_write_data(0x0d);  //(0x0d) miror , orientation image
//page address order:top bottom,column address order:right left,page/column order:normal mode,line address order:lcd refresh top bottom

lcd_write_com(0x3a);   //(0x3a) //set_pixel_format
lcd_write_data(0x55);  //(0x55) //dbi:16bit/pixel (65,536 colors)

lcd_write_com(0x2a);   //(0x2a) //set_column_address
lcd_write_data(0x00);  //(0x18)
lcd_write_data(0x00);  //(0x18)
lcd_write_data(0x01);  //(0x18)
lcd_write_data(0x3f);  //(0x18)

lcd_write_com(0x2b);   //(0x2b) //set_page_address
lcd_write_data(0x00);  //(0x18)
lcd_write_data(0x00);  //(0x00)
lcd_write_data(0x01);  //(0x01)
lcd_write_data(0xe0);  //(0xe0)

lcd_write_com(0x13); //normal display

        delay(120);
lcd_write_com(0x29);   //(0x29) //set_display_on / display on
break;


Arduino Forum > Using Arduino > Displays > 3.5 Inch TFT mirror inverted output


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code