Cropped 80x160 display (ST7735S, TFT_ESPI)

Hi, new here. I have used this display before (Green Tab), no problem. I just purchased 8 displays from AliExpress LINK which all crop the display, leaving maybe 26 pixels blank at one end. What does display is blurry as well. These displays have a Blue Tab FWIW.

I have played with the 7735S inits, different color tabs, different speeds etc but nothing works. Does anyone have some advice? I am about ready to open a dispute and send the displays back.

Sending them back is a good idea. Your link gives me this: " We did not find your page - But we still have millions of other articles for you to check out. Does it work with your previous displays? If so send them back. Good luck and I hope you are not in a hurry.

Thanks, I may do just that. When the price is too good to believe… it probably is :-). Anyway here is another link?

I have found that I can adjust the offsets in the driver but the default offset is correct, it’s the upper boundary of the display that seems to be wrong. None of the common libraries seem able to drive this display.

The link in #1 does not work.
The link in #3 shows a 160x80 display.

Please can you confirm that #3 is the actual vendor of your 8 displays.

It is very important to identify a problem display.
We can generally recognise different models from the pcb.

I have a 160x80 (with blue tab) that looks the same as #3. Same components in the same place. Similar printed legends. Slightly different copper tracks
I have run it fine with my own code.
Adafruit_ST7735 library does not work properly.
I can't remember whether I have tried it with TFT_eSPI.

If you can show or describe your pcb I will run my display with TFT_eSPI and post a suitable test sketch.
Don't send them back just yet.

David.

Edit. I found the pcb photos in #3.

Here is a diagnostic sketch. I get correct geometry on my 160x80 display with User_Setup:

#define ST7735_DRIVER
//#define ST7735_BLACKTAB  //my regular 128x160 screens
#define ST7735_GREENTAB160x80
#define TFT_RGB_ORDER TFT_BGR
#define TFT_WIDTH  80

diagnose_rot_eSPI.ino

#include <TFT_eSPI.h>
TFT_eSPI tft;

// Assign human-readable names to some common 16-bit color 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
#define GRAY    0x8410

void setup()
{
    tft.begin();
}

void loop()
{
    static uint8_t aspect = 0;
    const char *aspectname[] = {
        "PORTRAIT", "LANDSCAPE", "PORTRAIT_REV", "LANDSCAPE_REV"
    };
    const char *colorname[] = { "BLUE", "GREEN", "RED", "GRAY" };
    uint16_t colormask[] = { BLUE, GREEN, RED, GRAY };
    //uint16_t ID = tft.readID(); // MCUFRIEND_kbv style
    uint16_t ID = 0x7735;
    tft.setRotation(aspect);
    int width = tft.width();
    int height = tft.height();
    int sz = (width <= 130 || height <= 130) ? 1 : 2;
    int mgn = (sz < 2) ? 8 : 32;
    int x = mgn + 4 * sz, y = x;
    tft.fillScreen(colormask[aspect]);
    tft.drawRect(0, 0, width, height, WHITE);
    tft.drawRect(mgn, mgn, width - mgn * 2, height - mgn * 2, WHITE);
    tft.setTextSize(sz);
    tft.setTextColor(BLACK);
    tft.setCursor(x, y);
    tft.print("ID=0x");
    tft.print(ID, HEX);
    if (ID == 0xD3D3) tft.print(" w/o");
    tft.setCursor(x, y += 10 * sz);
    tft.print(aspectname[aspect]);
    tft.setCursor(x, y += 10 * sz);
    tft.print(width);
    tft.print(" x ");
    tft.print(height);
    tft.setTextColor(WHITE);
    tft.setCursor(x, y += 10 * sz);
    tft.setTextSize(sz * 2);
    tft.print(colorname[aspect]);
    if (++aspect > 3) aspect = 0;
    delay(5000);
}

Panels vary. I suggest that you try my setting. My 160x80 does look like your display.
Report back. e.g. if colours are wrong, directions are wrong, white rectangles are not aligned, ...

David.

David,
I hoped you would see my question, thanks for your help.

I tried the sketch (I had to add fonts and SPI pin spec to the user_setup...)
It made no difference to the offset (see pic below) and colors were wrong.
Selecting ST7735_REDTAB160x80 cured the color problems but no joy on offsets.
I am also attaching a pic of both sides of my display... I can do higher res if you wish.

one

I would be much happier if you photo showed the output from my sketch.

Does this show ST7735_REDTAB160x80 or ST7735_GREENTAB160x80 ?

The GRAY looks like CYAN or AZURE to me. Might be your camera.

The geometry is wrong.
The outer rectangle does not show any right edge.
The inner rectangle is too wide. You don't see the right edge.
I suspect the ribbon is covered by some black tape.

It is easier for me to help if you say:
ST7735_GREENTAB160x80. RED shows BLUE or GREEN shows MAGENTA
ST7735_GREENTAB160x80. rectangles wrong in Portrait and Landscape_Rev

My Panel was happier with ST7735_GREENTAB160x80.
But your Panel could be different. Panels vary from different manufacturers.

David.

Sorry I wasn't clear... but I don't know what your output SHOULD look like...

ST7735_GREENTAB160x80 distorts the colors so I can't read the text
ST7735_REDTAB160x80 shows color that matches the white text in every case

The GRAY example is GRAY in-person and other colors are correct too.
Rectangles look good to me EXCEPT for the blank (upper?) portion of the display obviously.

I understand the offset in TFT_eSPI for starting row/column but is there an adjustment for the
ending? To my inexperienced eye it looks like the display simply truncates rows/cols above 120.

Please just post a photo of the ST7735_GREENTAB160x80
Please let me diagnose colour, geometry etc.

If you look at my code you will see that every screen has an outer white rectangle. And an inner rectangle. I cope with many different geometries so it is not so easy for you to read.
It should be a 80x160 outer, 64x144 inner rectangle for Portrait.
It should be a 160x80 outer, 144x64 inner rectangle for Landscape.

Yes, you have a big offset on your Panel. Which is why I would like to see
ST7735_GREENTAB160x80

David.

Again, my apologies for misunderstanding, I appreciate you taking time to help.
In a previous test with GREENTAB I couldn't read the text, perhaps I had fonts messed up?

However, below are photos of my panel using ST7735_GREENTAB160x80




I would say:
BLUE looks yellow
GREEN looks magenta
GRAY look gray
RED looks cyan

The colours are cured by adding this to the ST7735_GREENTAB160x80 setup.

#define TFT_INVERSION_ON

But the geometry is skewed. The LANDSCAPE (GREEN) shows some smeary scan lines at the top. So your Panel is physically 160x80. But we just need to tell the ST7735 registers.

Have you ever seen any lit pixels in that "top smeary area" ?
It is a "scan feature" not a pixel-mapping problem.

What country are you in ?

David.

Hi David,
I'm in the US and would happily send you a panel (to add to your collection) if it helps.

I see the backlight bleed behind the unused area of the display but never anything else.

I asked the seller and they sent me some 8051 c code which means nothing to me.
Perhaps it does to you?

//////////////////////////////////////////////////////////////////////////////////
//±¾³ÌÐòÖ»¹©Ñ§Ï°Ê¹Óã¬Î´¾­×÷ÕßÐí¿É£¬²»µÃÓÃÓÚÆäËüÈκÎÓÃ;
//²âÊÔÓ²¼þ£ºSTC51
//0.96´çTFT_ST7735Òº¾§Çý¶¯
//°æ±¾£ºV1.0
//°æȨËùÓУ¬µÁ°æ±Ø¾¿¡£
//Copyright(C) ½ðÒݳ¿µç×Ó
//All rights reserved
//********************************************************************************
#include<reg51.h>
#include<absacc.h>
#include<intrins.h>
#include<string.h>
#include<font.h>
#define uchar unsigned char
#define uint unsigned int
#define Xoffset 24
#define Yoffset 0



//Ö÷Ƶ£º12MHZ
//µ¥Æ¬»úIOÍÆÍìÊä³öÉèÖö¨Òå
//#define USE_LANDSCAPE//²âÊÔ³ÌÐòºáÊúÆÁÇл»£¬ºáÆÁÇ뿪Æô´Ëºê£¬ÊúÆÁÇëÆÁ±Î
#define MCU_STC12//Èç¹ûÄúʹÓõĵ¥Æ¬»ú²»ÊÇSTC12ϵÁÐ(ÈçSTC89C52)ÇëÆÁ±Î´Ëºê¶¨Òå
#ifdef MCU_STC12
sfr P3M1  = 0xB1;	//P3M1.n,P3M0.n 	=00--->Standard,	01--->push-pull
sfr P3M0  = 0xB2;	//					=10--->pure input,	11--->open drain
#endif


//---------------------------Òº¾§ÆÁ½ÓÏß˵Ã÷-------------------------------------//
//½ÓÏßÇ°Çë²Î¿¼Òº¾§ÆÁ˵Ã÷ÊéµÚ10Ò³Òý½Å¶¨Òå
sbit bl        =P3^5;//½ÓÄ£¿éBLKÒý½Å£¬±³¹â¿ÉÒÔ²ÉÓÃIO¿ØÖÆ»òÕßPWM¿ØÖÆ£¬Ò²¿ÉÒÔÖ±½Ó½Óµ½¸ßµçƽ³£ÁÁ
sbit scl       =P3^0;//½ÓÄ£¿éSCLÒý½Å,½ÓÂãÆÁPin9_SCL
sbit sda       =P3^1;//½ÓÄ£¿éSDAÒý½Å£¬½ÓÂãÆÁPin8_SDA
sbit rs        =P3^3;//½ÓÄ£¿éDCÒý½Å£¬½ÓÂãÆÁPin7_A0
sbit cs        =P3^4;//½ÓÄ£¿éCSÒý½Å£¬½ÓÂãÆÁPin12_CS
sbit reset     =P3^2;//½ÓÄ£¿éRESÒý½Å£¬½ÓÂãÆÁPin6_RES
//---------------------------End ofÒº¾§ÆÁ½ÓÏß---------------------------------//

//¶¨Òå³£ÓÃÑÕÉ«
#define RED  		0xf800
#define GREEN		0x07e0
#define BLUE 		0x001f
#define WHITE		0xffff
#define BLACK		0x0000
#define YELLOW  0xFFE0
#define GRAY0   0xEF7D
#define GRAY1   0x8410
#define GRAY2   0x4208


void  Contrast_Adjust();

code  typFNT_GBK16 hz16[];

void Output_Pixel(uint x,uint y);




void delay_ms(uint time)
{
 uint i,j;
  for(i=0;i<time;i++)
   for(j=0;j<250;j++);
}


//ÏòSPI×ÜÏß´«ÊäÒ»¸ö8λÊý¾Ý
void  SPI_WriteData(uchar Data)
{
	unsigned char i=0;
	for(i=8;i>0;i--)
	{
		if(Data&0x80)
		sda=1; //Êä³öÊý¾Ý
		else sda=0;
		scl=0;
		scl=1;
		Data<<=1;
	}
}
//ÏòÒº¾§ÆÁдһ¸ö8λָÁî
void  Lcd_WriteIndex(uchar Data)
{

		cs=0;
		rs=0;
		SPI_WriteData(Data);
		cs=1;
}
//ÏòÒº¾§ÆÁдһ¸ö8λÊý¾Ý
void  Lcd_WriteData(uchar Data)
{
		unsigned char i=0;
		cs=0;
		rs=1;
		SPI_WriteData(Data);
		cs=1;
}
//ÏòÒº¾§ÆÁдһ¸ö16λÊý¾Ý
void  LCD_WriteData_16Bit(unsigned int Data)
{
	unsigned char i=0;
	cs=0;
	rs=1;
	SPI_WriteData(Data>>8); 	//дÈë¸ß8λÊý¾Ý
	SPI_WriteData(Data); 			//дÈëµÍ8λÊý¾Ý
	cs=1;

}

void Reset()
{
    reset=0;
    delay_ms(100);
    reset=1;
    delay_ms(100);
}

//////////////////////////////////////////////////////////////////////////////////////////////
//Òº¾§ÆÁ³õʼ»¯
void initial(void)
{

Lcd_WriteIndex(0xfe);
Lcd_WriteIndex(0xfe);
Lcd_WriteIndex(0xfe);
Lcd_WriteIndex(0xef);

Lcd_WriteIndex(0xb3);  
Lcd_WriteData(0x03);
	
Lcd_WriteIndex(0x36);  
Lcd_WriteData(0xd8);
	
Lcd_WriteIndex(0x3a);  
Lcd_WriteData(0x05);

Lcd_WriteIndex(0xb6);  
Lcd_WriteData(0x11);
Lcd_WriteIndex(0xac);  
Lcd_WriteData(0x0b);

Lcd_WriteIndex(0xb4);  
Lcd_WriteData(0x21);

Lcd_WriteIndex(0xb1);  
Lcd_WriteData(0xc0);

Lcd_WriteIndex(0xe6);
Lcd_WriteData(0x50);
Lcd_WriteData(0x43);	
Lcd_WriteIndex(0xe7);
Lcd_WriteData(0x56);
Lcd_WriteData(0x43);	

Lcd_WriteIndex(0xF0);
Lcd_WriteData(0x1f);
Lcd_WriteData(0x41);
Lcd_WriteData(0x1B);
Lcd_WriteData(0x55);
Lcd_WriteData(0x36);
Lcd_WriteData(0x3d);
Lcd_WriteData(0x3e);
Lcd_WriteData(0x0); 
Lcd_WriteData(0x16);
Lcd_WriteData(0x08);
Lcd_WriteData(0x09);
Lcd_WriteData(0x15);
Lcd_WriteData(0x14);
Lcd_WriteData(0xf); 

Lcd_WriteIndex(0xF1); 

Lcd_WriteData(0x1f);
Lcd_WriteData(0x41);
Lcd_WriteData(0x1B);
Lcd_WriteData(0x55);
Lcd_WriteData(0x36);
Lcd_WriteData(0x3d);
Lcd_WriteData(0x3e);
Lcd_WriteData(0x0); 
Lcd_WriteData(0x16);
Lcd_WriteData(0x08);
Lcd_WriteData(0x09);
Lcd_WriteData(0x15);
Lcd_WriteData(0x14);
Lcd_WriteData(0xf); 

Lcd_WriteIndex(0xfe);
Lcd_WriteIndex(0xff);

Lcd_WriteIndex(0x35);
Lcd_WriteData(0x00);
Lcd_WriteIndex(0x44);
Lcd_WriteData(0x00);
Lcd_WriteIndex(0x11);
delay_ms (120);
Lcd_WriteIndex(0x29);
//Lcd_WriteIndex(0x2c);

Lcd_WriteIndex(0x2A); //Set Column Address 
Lcd_WriteData(0x00); 
Lcd_WriteData(0x18); 
Lcd_WriteData(0x00); 
Lcd_WriteData(0x67); 
Lcd_WriteIndex(0x2B); //Set Page Address 
Lcd_WriteData(0x00);
Lcd_WriteData(0x00); 
Lcd_WriteData(0x00); 
Lcd_WriteData(0x9f); 
Lcd_WriteIndex(0x2c); 
}

/*************************************************
º¯ÊýÃû£ºLCD_Set_Region
¹¦ÄÜ£ºÉèÖÃlcdÏÔʾÇøÓò£¬ÔÚ´ËÇøÓòдµãÊý¾Ý×Ô¶¯»»ÐÐ
Èë¿Ú²ÎÊý£ºxyÆðµãºÍÖÕµã
·µ»ØÖµ£ºÎÞ
*************************************************/
void Lcd_SetRegion(unsigned int x_start,unsigned int y_start,unsigned int x_end,unsigned int y_end)
{

	Lcd_WriteIndex(0x2a);
	Lcd_WriteData(0x00);
	Lcd_WriteData(x_start+Xoffset);
	Lcd_WriteData(0x00);
	Lcd_WriteData(x_end+Xoffset);

	Lcd_WriteIndex(0x2b);
	Lcd_WriteData(0x00);
	Lcd_WriteData(y_start+Yoffset);
	Lcd_WriteData(0x00);
	Lcd_WriteData(y_end+Yoffset);
	Lcd_WriteIndex(0x2c);
}


void PutPixel(uint x_start,uint y_start,uint color)
{
	Lcd_SetRegion(x_start,y_start,x_start+1,y_start+1);
	LCD_WriteData_16Bit(color);

}



void dsp_single_colour(int color)
{
 	uchar i,j;
	Lcd_SetRegion(0,0,80-1,160-1);
 	for (i=0;i<160;i++)
    	for (j=0;j<80;j++)
        	LCD_WriteData_16Bit(color);
}

//²ÉÓÃÉèÖô°¿Ú·½·¨Ìî³ä×Ö¿âÊý¾Ý£¬Ïà±ÈGui_DrawFont_GBK16¸ü¿ìËÙ
void Fast_DrawFont_GBK16(uint x, uint y, uint fc, uint bc, uchar *s)
{
	unsigned char i,j;
	unsigned short k;
	uint HZnum;
	HZnum=sizeof(hz16)/sizeof(typFNT_GBK16);
	while(*s)
	{
		if((*s) >= 128)
		{
			for (k=0;k<HZnum;k++)
			{
			  if ((hz16[k].Index[0]==*(s))&&(hz16[k].Index[1]==*(s+1)))
			  { 	Lcd_SetRegion(x,y,x+16-1,y+16-1);
				    for(i=0;i<16*2;i++)
				    {
						for(j=0;j<8;j++)
				    	{
							if(hz16[k].Msk[i]&(0x80>>j))	LCD_WriteData_16Bit(fc);
							else
							{
							if (fc!=bc) LCD_WriteData_16Bit(bc);
							}
						}
					}


				}
			}
		s+=2;x+=16;
		}


		else
		s+=1;

	}
}
//´Ë·½·¨Ãè»æºº×Ö½ÏÂý
void Gui_DrawFont_GBK16(uint x, uint y, uint fc, uint bc, uchar *s)
{
	unsigned char i,j;
	unsigned short k,x0;
	x0=x;

	while(*s)
	{
		if((*s) >= 128)
		{
			for (k=0;k<hz16_num;k++)
			{
			  if ((hz16[k].Index[0]==*(s))&&(hz16[k].Index[1]==*(s+1)))
			  {
				    for(i=0;i<16;i++)
				    {
						for(j=0;j<8;j++)
							{
						    	if(hz16[k].Msk[i*2]&(0x80>>j))	PutPixel(x+j,y+i,fc);
								else {
									if (fc!=bc) PutPixel(x+j,y+i,bc);
								}
							}
						for(j=0;j<8;j++)
							{
						    	if(hz16[k].Msk[i*2+1]&(0x80>>j))	PutPixel(x+j+8,y+i,fc);
								else
								{
									if (fc!=bc) PutPixel(x+j+8,y+i,bc);
								}
							}
				    }
				}
			  }
			s+=2;x+=16;
		}
		else
		s+=1;

	}
}

void Font_Test(void)
{//ÖÐÎÄÏÔʾ²âÊÔ½ðÒݳ¿µç×Ó»¶Ó­ÄúÒòΪרҵËùÒÔ×¢
	dsp_single_colour(WHITE);
	Fast_DrawFont_GBK16(8,10,BLUE,YELLOW,	"ÖÐÎIJâÊÔ");
	Fast_DrawFont_GBK16(0,30,RED,WHITE,	"½ðÒݳ¿µç×Ó");
	Fast_DrawFont_GBK16(16,50,BLUE,WHITE,	"»¶Ó­Äú");
	Fast_DrawFont_GBK16(8,70,WHITE,BLUE, 	"ÒòΪרע");
	Fast_DrawFont_GBK16(8,90,WHITE,BLUE,	"ËùÒÔרҵ");

	delay_ms(1800);
}

main()
{
#ifdef MCU_STC12
	P3M1 &= ~(1<<2),	P3M0 |=  (1<<2);	//P3.2 set as push-pull output mode
#endif
	initial();
	bl=1;
  while(1)
  {
Font_Test();
dsp_single_colour(0xf800);//RED
dsp_single_colour(0x07e0);//GREEN
dsp_single_colour(0x001f);//BLUE
delay_ms(3500);
    }
 }



TFT_INVERSION_ON has NO effect on my display. Same as the latest photos I sent

TFT_INVERSION_ON works on my Panel (and any others)

It might be simplest to just pop a display in the mail.
Alternatively I convert the 8051 code for you.

Personally, I don't believe that 8051 code. I think it will have a "missing area".

I will PM you with my address. But I will possibly just post an Arduino version of your 8051 code later today.

David.

Just to update:
I looked very closely at the display while covering the active area... the scanlines that you can
sort of see in the undriven area in my pics ARE there faintly and they change with the color.

Here is an Arduino version of the Chinese 8051 program.
I have omitted the Font tests. But added some nested rectangles.
Edit CS, DC, ... etc for your wiring.

Please let me know if you see the colours and rectangles properly.

#include <SPI.h>

#define CS  10
#define DC  9
#define RST 8
#define BL  7

#define uchar unsigned char
#define uint  unsigned int
#define Xoffset 24
#define Yoffset 0

#define RED         0xf800
#define GREEN       0x07e0
#define BLUE        0x001f
#define WHITE       0xffff
#define BLACK       0x0000
#define YELLOW  0xFFE0
#define GRAY0   0xEF7D
#define GRAY1   0x8410
#define GRAY2   0x4208


void  Contrast_Adjust();

//code uint typFNT_GBK16 hz16[];

void Output_Pixel(uint x, uint y);

void delay_ms(uint time)
{
    delay(time);
}

void  SPI_WriteData(uchar Data)
{
    SPI.transfer(Data);
}

void  Lcd_WriteIndex(uchar Data)
{
    digitalWrite(CS, LOW);
    digitalWrite(DC, LOW);
    SPI_WriteData(Data);
    digitalWrite(CS, HIGH);
}
//ÏòÒº¾§ÆÁдһ¸ö8λÊý¾Ý
void  Lcd_WriteData(uchar Data)
{
    digitalWrite(CS, LOW);
    digitalWrite(DC, HIGH);
    SPI_WriteData(Data);
    digitalWrite(CS, HIGH);
}
//ÏòÒº¾§ÆÁдһ¸ö16λÊý¾Ý
void  LCD_WriteData_16Bit(unsigned int Data)
{
    digitalWrite(CS, LOW);
    digitalWrite(DC, HIGH);
    SPI_WriteData(Data >> 8);   //дÈë¸ß8λÊý¾Ý
    SPI_WriteData(Data);            //дÈëµÍ8λÊý¾Ý
    digitalWrite(CS, HIGH);
}

void Reset()
{
    digitalWrite(RST, LOW);
    delay_ms(100);
    digitalWrite(RST, HIGH);
    delay_ms(100);
}

//////////////////////////////////////////////////////////////////////////////////////////////
//Òº¾§ÆÁ³õʼ»¯
void initial(void)
{

    Lcd_WriteIndex(0xfe);
    Lcd_WriteIndex(0xfe);
    Lcd_WriteIndex(0xfe);
    Lcd_WriteIndex(0xef);

    Lcd_WriteIndex(0xb3);
    Lcd_WriteData(0x03);

    Lcd_WriteIndex(0x36);
    Lcd_WriteData(0xd8);

    Lcd_WriteIndex(0x3a);
    Lcd_WriteData(0x05);

    Lcd_WriteIndex(0xb6);
    Lcd_WriteData(0x11);
    Lcd_WriteIndex(0xac);
    Lcd_WriteData(0x0b);

    Lcd_WriteIndex(0xb4);
    Lcd_WriteData(0x21);

    Lcd_WriteIndex(0xb1);
    Lcd_WriteData(0xc0);

    Lcd_WriteIndex(0xe6);
    Lcd_WriteData(0x50);
    Lcd_WriteData(0x43);
    Lcd_WriteIndex(0xe7);
    Lcd_WriteData(0x56);
    Lcd_WriteData(0x43);

    Lcd_WriteIndex(0xF0);
    Lcd_WriteData(0x1f);
    Lcd_WriteData(0x41);
    Lcd_WriteData(0x1B);
    Lcd_WriteData(0x55);
    Lcd_WriteData(0x36);
    Lcd_WriteData(0x3d);
    Lcd_WriteData(0x3e);
    Lcd_WriteData(0x0);
    Lcd_WriteData(0x16);
    Lcd_WriteData(0x08);
    Lcd_WriteData(0x09);
    Lcd_WriteData(0x15);
    Lcd_WriteData(0x14);
    Lcd_WriteData(0xf);

    Lcd_WriteIndex(0xF1);

    Lcd_WriteData(0x1f);
    Lcd_WriteData(0x41);
    Lcd_WriteData(0x1B);
    Lcd_WriteData(0x55);
    Lcd_WriteData(0x36);
    Lcd_WriteData(0x3d);
    Lcd_WriteData(0x3e);
    Lcd_WriteData(0x0);
    Lcd_WriteData(0x16);
    Lcd_WriteData(0x08);
    Lcd_WriteData(0x09);
    Lcd_WriteData(0x15);
    Lcd_WriteData(0x14);
    Lcd_WriteData(0xf);

    Lcd_WriteIndex(0xfe);
    Lcd_WriteIndex(0xff);

    Lcd_WriteIndex(0x35);
    Lcd_WriteData(0x00);
    Lcd_WriteIndex(0x44);
    Lcd_WriteData(0x00);
    Lcd_WriteIndex(0x11);
    delay_ms (120);
    Lcd_WriteIndex(0x29);
    //Lcd_WriteIndex(0x2c);

    Lcd_WriteIndex(0x2A); //Set Column Address
    Lcd_WriteData(0x00);
    Lcd_WriteData(0x18);
    Lcd_WriteData(0x00);
    Lcd_WriteData(0x67);
    Lcd_WriteIndex(0x2B); //Set Page Address
    Lcd_WriteData(0x00);
    Lcd_WriteData(0x00);
    Lcd_WriteData(0x00);
    Lcd_WriteData(0x9f);
    Lcd_WriteIndex(0x2c);
}

void Lcd_SetRegion(unsigned int x_start, unsigned int y_start, unsigned int x_end, unsigned int y_end)
{

    Lcd_WriteIndex(0x2a);
    Lcd_WriteData(0x00);
    Lcd_WriteData(x_start + Xoffset);
    Lcd_WriteData(0x00);
    Lcd_WriteData(x_end + Xoffset);

    Lcd_WriteIndex(0x2b);
    Lcd_WriteData(0x00);
    Lcd_WriteData(y_start + Yoffset);
    Lcd_WriteData(0x00);
    Lcd_WriteData(y_end + Yoffset);
    Lcd_WriteIndex(0x2c);
}

void PutPixel(uint x_start, uint y_start, uint color)
{
    Lcd_SetRegion(x_start, y_start, x_start + 1, y_start + 1);
    LCD_WriteData_16Bit(color);
}

void fillRect(uint x, uint y, uint w, uint h, uint color)
{
    Lcd_SetRegion(x, y, x + w - 1, y + h - 1);
    for (int row = 0; row < h; row++) {
        for (int col = 0; col < w; col++) {
            LCD_WriteData_16Bit(color);
        }
    }
}

void drawRect(uint x, uint y, uint w, uint h, uint color)
{
    fillRect(x, y,         w, 1, color);
    fillRect(x, y + h - 1, w, 1, color);
    fillRect(x,         y, 1, h, color);
    fillRect(x + w - 1, y, 1, h, color);
}

void dsp_single_colour(int color)
{
    fillRect(0, 0, 80, 160, color);
    drawRect(0, 0, 80, 160, WHITE); //outer rectangle
    drawRect(8, 8, 64, 144, BLACK); //inner rectangle
    delay(1000);
}

void setup()
{
    SPI.begin();
    pinMode(CS, OUTPUT);
    pinMode(DC, OUTPUT);
    pinMode(RST, OUTPUT);
    pinMode(BL, OUTPUT);
    digitalWrite(BL, HIGH);
    Reset();
    initial();
}

void loop(void)
{
    //Font_Test();
    dsp_single_colour(0xf800);//RED
    dsp_single_colour(0x07e0);//GREEN
    dsp_single_colour(0x001f);//BLUE
    delay_ms(5000);
}

#if 0
{
    // my style of init table: (cmd), N, data... 
    (0xfe), 0,
    (0xfe), 0,
    (0xfe), 0,
    (0xef), 0,
    (0xb3), 1, 0x03,
    (0x36), 1, 0xd8,
    (0x3a), 1, 0x05,
    (0xb6), 1, 0x11,
    (0xac), 1, 0x0b,
    (0xb4), 1, 0x21,
    (0xb1), 1, 0xc0,
    (0xe6), 2, 0x50, 0x43,
    (0xe7), 2, 0x56, 0x43,
    (0xF0), 12, 0x1f, 0x41, 0x1B, 0x55, 0x36, 0x3d, 0x3e, 0x0, 0x16, 0x08, 0x09, 0x15, 0x14, 0xf,
    (0xF1), 12, 0x1f, 0x41, 0x1B, 0x55, 0x36, 0x3d, 0x3e, 0x0, 0x16, 0x08, 0x09, 0x15, 0x14, 0xf,
    (0xfe), 0,
    (0xff), 0,
    (0x35), 1, 0x00,
    (0x44), 1, 0x00,
    (0x11), 0,
    delay_ms (120);
    (0x29), 0,
    /*** (0x2c), 0,***/
    (0x2A), 4, /***Set Column Address***/ 0x00, 0x18, 0x00, 0x67,
    (0x2B), 4, /***Set Page Address***/ 0x00, 0x00, 0x00, 0x9f,
    (0x2c), 0,
};
#endif

The link allows me to purchase one but it does not give technical information.

It works... correct color cycle (R->G->B) and the geometry looks good...
fill with color, white outer rect, black inner rect

Great work David, thanks.

Now, can can this be integrated into the TFT_eSPI? Does it mean a new BLUTAB for example,
and custom command arrays in ST7735_init.h ?

Thanks again,

Tim

Yeah, I did get some 8051 code from the seller and had partial success (see below).

OK, an update for anyone following this thread who cares...

David helped me by translating the 8051 code to Arduino and his test works (I did have to specify the MOSI and SCK pins of course).

Next I wanted to try the init() code from the 8051 conversion into the ST7735_init.h driver file under TFT_eSPI. That works too, in that I can finally drive the entire height (160) of the display, but now I get an offset of 30% in the width (80) dimension. I should mention that I need the display to work in portrait mode and this was a big step... but not complete... See pic:

Suggestions welcome, I am probably overlooking something in the TFT_eSPI driver code.