hi everyone,
I have a TFT LCD 2.4inch that i guess is from a brand called SPI-Flash (or not) this is the only thing written on the back, i have tried everything on any forums, first of all this just works with the libraries named <LCDWIKI_GUI.h> and <LCDWIKI_KBV.h>, not adafruit. second and my only problem is that the texts and everything is sort of mirrored (flipped). i used Set_Rotation(0); and no luck. here is my code and also the display reginfo:
reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 E3 00 00 Manufacturer ID
reg(0x0009) 00 00 61 00 00 Status Register
reg(0x000A) 00 08 Get Power Mode
reg(0x000C) 00 06 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 00 00 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 00 00 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 00 00 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 80 Inversion Control
reg(0x00B6) 00 0A 82 27 04 Display Control
reg(0x00B7) 00 77 Entry Mode Set
reg(0x00BF) 00 02 02 02 02 02 ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control
reg(0x00C8) 00 00 20 31 42 13 04 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 06 Panel Control
reg(0x00D0) 00 A4 B2 Power Control
reg(0x00D2) 00 00 00 00 00 NVM Read
reg(0x00D3) 00 00 00 00 ILI9341, ILI9488
reg(0x00D4) 00 00 00 00 Novatek ID
reg(0x00DA) 00 E3 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) 00 00 RDID3
reg(0x00E0) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-P
reg(0x00E1) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control
/***********************************************************************************
*This program is a demo of displaying string
*This demo was made for LCD modules with 8bit or 16bit data port.
*This program requires the the LCDKIWI library.
* File : display_string.ino
* Hardware Environment: Arduino UNO&Mega2560
* Build Environment : Arduino
*Set the pins to the correct ones for your development shield or breakout board.
*This demo use the BREAKOUT BOARD only and use these 8bit data lines to the LCD,
*pin usage as follow:
* LCD_CS LCD_CD LCD_WR LCD_RD LCD_RST SD_SS SD_DI SD_DO SD_SCK
* Arduino Uno A3 A2 A1 A0 A4 10 11 12 13
*Arduino Mega2560 A3 A2 A1 A0 A4 10 11 12 13
* LCD_D0 LCD_D1 LCD_D2 LCD_D3 LCD_D4 LCD_D5 LCD_D6 LCD_D7
* Arduino Uno 8 9 2 3 4 5 6 7
*Arduino Mega2560 8 9 2 3 4 5 6 7
*Remember to set the pins to suit your display module!
*
* @attention
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, QD electronic SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
**********************************************************************************/
#include <LCDWIKI_GUI.h> //Core graphics library
#include <LCDWIKI_KBV.h> //Hardware-specific library
//if the IC model is known or the modules is unreadable,you can use this constructed function
LCDWIKI_KBV mylcd(ILI9341,A3,A2,A1,A0,A4); //model,cs,cd,wr,rd,reset
//if the IC model is not known and the modules is readable,you can use this constructed function
//LCDWIKI_KBV mylcd(240,320,A3,A2,A1,A0,A4);//width,height,cs,cd,wr,rd,reset
//define some colour values
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
int testME = 11111;
void setup()
{
Serial.begin(9600);
mylcd.Init_LCD();
mylcd.Set_Rotation(0);
Serial.println(mylcd.Read_ID(), HEX);
mylcd.Fill_Screen(BLACK);
}
void loop()
{
mylcd.Set_Text_Mode(0);
mylcd.Fill_Screen(0x0000);
mylcd.Set_Text_Back_colour(BLACK);
//display 1 times string
mylcd.Set_Text_colour(RED);
mylcd.Set_Text_Size(1);
mylcd.Print_String("Hello World!", 0, 0);
mylcd.Print_Number_Float(01234.56789, 2, 0, 8, '.', 0, ' ');
mylcd.Print_Number_Int(0xDEADBEF, 0, 16, 0, ' ',16);
//mylcd.Print_String("DEADBEF", 0, 16);
//display 2 times string
mylcd.Set_Text_colour(GREEN);
mylcd.Set_Text_Size(2);
mylcd.Print_String("Hello World!", 0, 40);
mylcd.Print_Number_Float(01234.56789, 2, 0, 56, '.', 0, ' ');
mylcd.Print_Number_Int(0xDEADBEF, 0, 72, 0, ' ',16);
//mylcd.Print_String("DEADBEEF", 0, 72);
//display 3 times string
mylcd.Set_Text_colour(BLUE);
mylcd.Set_Text_Size(3);
mylcd.Print_String("Hello World!", 0, 104);
mylcd.Print_Number_Float(01234.56789, 2, 0, 128, '.', 0, ' ');
mylcd.Print_Number_Int(0xDEADBEF, 0, 152, 0, ' ',16);
// mylcd.Print_String("DEADBEEF", 0, 152);
//display 4 times string
mylcd.Set_Text_colour(WHITE);
mylcd.Set_Text_Size(4);
mylcd.Print_String("Hello!", 0, 192);
//display 5 times string
mylcd.Set_Text_colour(YELLOW);
mylcd.Set_Text_Size(5);
mylcd.Print_String("Hello!", 0, 224);
//display 6 times string
mylcd.Set_Text_colour(RED);
mylcd.Set_Text_Size(6);
mylcd.Print_String("Hello!", 0, 266);
delay(3000);
}
