Hi,
I bought a second 2.8 TFT touch screen that does not display correctly. I have one from the same vendor that is working correctly but this second one is not working with the exact same code. It looks like it may have a different screen on it, i have got the following output to try to identify it as examples keep coming back with 0xd3d3
Its a blue PCB and the following info from the LCD ID example
reg(0x0000) 03 03 | ID: ILI9320, ILI9325, ILI9335, ... |
---|---|
reg(0x0004) 07 07 07 07 | Manufacturer ID |
reg(0x0009) 0B 0B 0B 0B 0B | Status Register |
reg(0x000A) 0B 0B | Get Power Mode |
reg(0x000C) 0F 0F | Get Pixel Format |
reg(0x0030) 33 33 33 33 33 | PTLAR |
reg(0x0033) 33 33 33 33 33 33 33 | VSCRLDEF |
reg(0x0061) 63 63 | RDID1 HX8347-G |
reg(0x0062) 63 63 | RDID2 HX8347-G |
reg(0x0063) 63 63 | RDID3 HX8347-G |
reg(0x0064) 67 67 | RDID1 HX8347-A |
reg(0x0065) 67 67 | RDID2 HX8347-A |
reg(0x0066) 67 67 | RDID3 HX8347-A |
reg(0x0067) 67 67 | RDID Himax HX8347-A |
reg(0x0070) 73 73 | Panel Himax HX8347-A |
reg(0x00A1) A3 A3 A3 A3 A3 | RD_DDB SSD1963 |
reg(0x00B0) B3 B3 | RGB Interface Signal Control |
reg(0x00B3) B3 B3 B3 B3 B3 | Frame Memory |
reg(0x00B4) B7 B7 | Frame Mode |
reg(0x00B6) B7 B7 B7 B7 B7 | Display Control |
reg(0x00B7) B7 B7 | Entry Mode Set |
reg(0x00BF) BF BF BF BF BF BF | ILI9481, HX8357-B |
reg(0x00C0) C3 C3 C3 C3 C3 C3 C3 C3 C3 | Panel Control |
reg(0x00C1) C3 C3 C3 C3 | Display Timing |
reg(0x00C5) C7 C7 | Frame Rate |
reg(0x00C8) CB CB CB CB CB CB CB CB CB CB CB CB CB | GAMMA |
reg(0x00CC) CF CF | Panel Control |
reg(0x00D0) D3 D3 D3 D3 | Power Control |
reg(0x00D1) D3 D3 D3 D3 | VCOM Control |
reg(0x00D2) D3 D3 D3 | Power Normal |
reg(0x00D3) D3 D3 D3 D3 | ILI9341, ILI9488 |
reg(0x00D4) D7 D7 D7 D7 | Novatek |
reg(0x00DA) DB DB | RDID1 |
reg(0x00DB) DB DB | RDID2 |
reg(0x00DC) DF DF | RDID3 |
reg(0x00E0) E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 | GAMMA-P |
reg(0x00E1) E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 E3 | GAMMA-N |
reg(0x00EF) EF EF EF EF EF EF | ILI9327 |
reg(0x00F2) F3 F3 F3 F3 F3 F3 F3 F3 F3 F3 F3 F3 | Adjust Control 2 |
reg(0x00F6) F7 F7 F7 F7 | Interface Control |
for reference i have the pins moved as per the below
#elif defined(AVR_ATmega2560) && defined(USE_MEGA_8BIT_SHIELD_CUSTOM)
#warning USE_MEGA_8BIT_SHIELD for vagos21
#define RD_PORT PORTL
#define RD_PIN 6 //PL6 (D43). Graham has PA15 (D24) on Due Shield
#define WR_PORT PORTG
#define WR_PIN 2 //D39 CTE
#define CD_PORT PORTK
#define CD_PIN 6 //A14 CTE a14
#define CS_PORT PORTK
#define CS_PIN 7 //A15 CTE a15
#define RESET_PORT PORTG
#define RESET_PIN 0 //D41 CTE
#define write_8(x) { PORTA = x;}
#define read_8() ( PINA )
#define setWriteDir() { DDRA = 0xFF; }
#define setReadDir() { DDRA = 0x00; }
#define write8(x) { write_8(x); WR_ACTIVE; WR_STROBE; } // HX8357-D is slower
#define write16(x) { uint8_t h = (x)>>8, l = x; write8(h); write8(l); }
#define READ_8(dst) { RD_STROBE; dst = read_8(); RD_IDLE; }
#define READ_16(dst) { RD_STROBE; dst = read_8(); RD_IDLE; RD_STROBE; dst = (dst<<8) | read_8(); RD_IDLE; }
#define PIN_LOW(p, b) (p) &= ~(1<<(b))
#define PIN_HIGH(p, b) (p) |= (1<<(b))
#define PIN_OUTPUT(p, b) *(&p-1) |= (1<<(b))