ITEAD 320*240 SSD1289 LCD ... too dark

The ITEAD 320*240 LCD with SSD1289 works great with 16 bit parallel interface however it's way too dark.

I have tried it with initialization code from everywhere but nothing makes any difference. The datasheet makes no mention anywhere of a backlight so cant even PMW a LED for brightness.

I wrote a driver for it from scratch using their small example so would really like to find out if my display is stuffed or it's a problem with the initialization code. It uses a shield and everything else works so I doubt it's wiring.

I have tested the startup code from at least 5 sources and they all display 565 pure white as 30% grey at the most. I even hard coded in the write pixel command 2x 0xFF to make sure my set color was not truncating bits or something and I still get the same result.

One thing I have noticed... when turned on the display is all white and brighter but after initialization the brightness is at least halved.

Given this is the code about everyone is using I'd find it hard to believe this may have been overlooked and the error propagated to all resultant code.

Just wondering if anyone else has similar problems with the SSD1289 chip.

The guts of the startup code is as follows :-

uint16_t arr_init[] = { // progmem later!

  0x0000, 0x0001, // R00h Oscillation Start 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OSCEN
  
  0x0003, 0xAAAC, // R03h Power control(1) 0 1 DCT3 DCT2 DCT1 DCT0 BT2 BT1 BT0 0 DC3 DC2 DC1 DC0 AP2 AP1 AP0 0

  0x000C, 0x0002, // R0Ch Power control (2) 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 VRC2 VRC1 VRC0
  0x000D, 0x000A, // R0Dh Power control (3) 0 1 0 0 0 0 0 0 0 0 0 0 0 0 VRH3 VRH2 VRH1 VRH0
  0x000E, 0x2D00, // R0Eh Power control (4) 0 1 0 0 VCOMG VDV4 VDV3 VDV2 VDV1 VDV0 0 0 0 0 0 0 0 0 
  0x001E, 0x00BC, // R1Eh Power control (5) 0 1 0 0 0 0 0 0 0 0 nOTP 0 VCM5 VCM4 VCM3 VCM2 VCM1 VCM0	  

  0x0001, 0x2A00 | 319, // R01h Driver output control 0 1 0 RL REV CAD BGR SM TB MUX8 MUX7 MUX6 MUX5 MUX4 MUX3 MUX2 MUX1 MUX0



  0x0002, 0x0600, // R02h LCD drive AC control 0 1 0 0 0 FLD ENWS B / C EOR WSMD NW7 NW6 NW5 NW4 NW3 NW2 NW1 NW0

  0x0010, 0x0000, // R10h Sleep mode 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SLP
	  
  0x0011, 0x6000, // R11h Entry mode 0 1 VS mode DFM1 DFM0 TRANS OEDef WMode DMode1 DMode0 TY1 TY0 ID1 ID0 AM LG2 LG1 LG0
  0x0005, 0x0000, // R05h Compare register (1) 0 1 CPR5 CPR4 CPR3 CPR2 CPR1 CPR0 0 0 CPG5 CPG4 CPG3 CPG2 CPG1 CPG0 0 0
  0x0006, 0x0000, // R06h Compare register(2) 0 1 0 0 0 0 0 0 0 0 CPB5 CPB4 CPB3 CPB2 CPB1 CPB0 0 0
  0x0016, 0xEF1C, // Horizontal Porch 0 1 XL7 XL6 XL5 XL4 XL3 XL2 XL1 XL0 HBP7 HBP6 HBP5 HBP4 HBP3 HBP2 HBP1 HBP0
  0x0017, 0x0003, // R17h Vertical Porch 0 1 VFP7 VFP6 VFP5 VFP4 VFP3 VFP2 VFP1 VFP0 VBP7 VBP6 VBP5 VBP4 VBP3 VBP2 VBP1 VBP0
  0x0007, 0x0233, // R07h Display control 0 1 0 0 0 PT1 PT0 VLE2 VLE1 SPT 0 0 GON DTE CM 0 D1 D0 
  0x000B, 0x0000, // R0Bh Frame cycle control 0 1 NO1 NO0 SDT1 SDT0 0 EQ2 EQ1 EQ0 DIV1 DIV0 SDIV SRTN RTN3 RTN2 RTN1 RTN0
  0x000F, 0x0000, // ROFh Gate scan start position 0 1 0 0 0 0 0 0 0 SCN8 SCN7 SCN6 SCN5 SCN4 SCN3 SCN2 SCN1 SCN0
  0x0041, 0x0000, // R41h Vertical scroll control(1) 0 1 0 0 0 0 0 0 0 VL18 VL17 VL16 VL15 VL14 VL13 VL12 VL11 VL10
  0x0042, 0x0000, // R42h Vertical scroll control (2) 0 1 0 0 0 0 0 0 0 VL28 VL27 VL26 VL25 VL24 VL23 VL22 VL21 VL20
  0x0048, 0x0000, // R48h First window start 0 1 0 0 0 0 0 0 0 SS18 SS17 SS16 SS15 SS14 SS13 SS12 SS11 SS10
  0x0049, 0x0000 | 319, // R49h First window end 0 1 0 0 0 0 0 0 0 SE18 SE17 SE16 SE15 SE14 SE13 SE12 SE11 SE10
  0x004A, 0x0000, // R4Ah Second window start 0 1 0 0 0 0 0 0 0 SS28 SS27 SS26 SS25 SS24 SS23 SS22 SS21 SS20
  0x004B, 0x0000, // R4Bh Second window end 0 1 0 0 0 0 0 0 0 SE28 SE27 SE26 SE25 SE24 SE23 SE22 SE21 SE20
  0x0044, 0xEF00, // R44h Horizontal RAM address position 0 1 HEA7 HEA6 HEA5 HEA4 HEA3 HEA2 HEA1 HEA0 HSA7 HSA6 HSA5 HSA4 HSA3 HSA2 HSA1 HSA0
  0x0045, 0x0000, // R45hVertical RAM address start  position 0 1 0 0 0 0 0 0 0 VSA8 VSA7 VSA6 VSA5 VSA4 VSA3 VSA2 VSA1 VSA0
  0x0046, 0x0000 | 319, // Vertical RAM address end position 0 1 0 0 0 0 0 0 0 VEA8 VEA7 VEA6 VEA5 VEA4 VEA3 VEA2 VEA1 VEA0

  0x0030, 0x0707, // R30h ? control (1)
  0x0031, 0x0204, // R30h ? control (1)
  0x0032, 0x0204, // R30h ? control (1)
  0x0033, 0x0502, // R30h ? control (1)
  0x0034, 0x0507, // R30h ? control (1)
  0x0035, 0x0204, // R30h ? control (1)
  0x0036, 0x0204, // R30h ? control (1)
  0x0037, 0x0502, // R30h ? control (1)
  0x003A, 0x0302, // R30h ? control (1)
  0x003B, 0x0302, // R30h ? control (1)

  0x0023, 0x0000, // R23h RAM write data mask (1) 0 1 WMR5 WMR4 WMR3 WMR2 WMR1 WMR0 0 0 WMG5 WMG4 WMG3 WMG2 WMG1 WMG0 0 0
  0x0024, 0x0000, // R24h RAM write data mask (2) 0 1 0 0 0 0 0 0 0 0 WMB5 WMB4 WMB3 WMB2 WMB1 WMB0 0 0
  0x0025, 0x8000, // ???? - WAS SET BUT NOT DOCUMENTED ... 65Hz
  0x004f, 0x0000, // R4Fh Set GDDRAM Y address counter 0 1 0 0 0 0 0 0 0 YAD8 YAD7 YAD6 YAD5 YAD4 YAD3 YAD2 YAD1 YAD0
  0x004e, 0x0000, // R4Eh Set GDDRAM X address counter 0 1 0 0 0 0 0 0 0 0 XAD7 XAD6 XAD5 XAD4 XAD3 XAD2 XAD1 XAD0
  0xffff, 0xffff };

    
  for (int i = 0; arr_init[i] != 0xffff; i += 2)
  {
	  _Write_Command_Data(arr_init[i], arr_init[i + 1]);
	 // Serial.println(arr_init[i], HEX);
	 

	  if (arr_init[i] == 0x0001)
	  {
		  delay(15);
	  }
	  else if (arr_init[i] == 0x0011) // entry
	  {
		  m_entry_mode = arr_init[i + 1];
		  delay(15);
	  }
	  else if (arr_init[i] == 0x0010) // wake up
	  {
		  delay(3000);
	  }
  }

  _Write_Command(0x0022); // finished

First of all, a silly question, have you tried the UTFT library by Henning Karlsen? My SSD1289 display works fine and correct brightness with that library. The Backlight is on pin 37 of the TFT's 40 way connector. Also worth checking is that pin 35 is at 5V and pin 11 is 3.3V.

It will depend on what shield you are using to whether the backlight is wired for PWM or permanently fully on.

Regards,

Graham

Hoek:
Given this is the code about everyone is using I'd find it hard to believe this may have been overlooked and the error propagated to all resultant code.

Erm, not true, there are some significant differences to the init code used by UTFT.

Regards,

Graham

I tried utft startup code and got the same results. I have a TFT with a shield that just clicks onto my mega2560.

What I hate about this card is ... underneath nothing is marked.

I have ordered another and made sure all pins underneath are marked and it has a pin for a backlight controller.